Skip to content

Instantly share code, notes, and snippets.

@sinairv
Created September 27, 2012 12:19
Show Gist options
  • Save sinairv/3793707 to your computer and use it in GitHub Desktop.
Save sinairv/3793707 to your computer and use it in GitHub Desktop.
Visual Studio 2012 Developer Command Prompt Here
;
; "CMD Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
; Modified to launch VS.NET 2010 command prompt 5/6/03 MG
; Modified to launch VS.NET 2012 command prompt 9/4/12 KZU
; Modified to add context menu to a directory background 9/27/12 SinaIRV
[version]
signature="$CHICAGO$"
[VSNet2012CmdHereInstall]
CopyFiles = VS2012CmdHere.Files.Inf
AddReg = VS2012CmdHere.Reg
[DefaultInstall]
CopyFiles = VS2012CmdHere.Files.Inf
AddReg = VS2012CmdHere.Reg
[DefaultUnInstall]
DelFiles = VS2012CmdHere.Files.Inf
DelReg = VS2012CmdHereUninstall.Reg
[SourceDisksNames]
55="VS2012 CMD Prompt Here","",1
[SourceDisksFiles]
VS2012CmdHere.INF=55
[DestinationDirs]
VS2012CmdHere.Files.Inf = 17
[VS2012CmdHere.Files.Inf]
VS2012CmdHere.INF
[VS2012CmdHere.Reg]
HKLM,%UDHERE%,DisplayName,,"%VS2012CmdHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUnInstall 132 %17%\VS2012CmdHere.inf"
HKCR,Directory\Background\Shell\VS2012CmdHere,,,"%VS2012CmdHereAccel%"
HKCR,Directory\Background\Shell\VS2012CmdHere\command,,,"%11%\cmd.exe /k cd ""%V"" && ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat"""
HKCR,Directory\Shell\VS2012CmdHere,,,"%VS2012CmdHereAccel%"
HKCR,Directory\Shell\VS2012CmdHere\command,,,"%11%\cmd.exe /k cd ""%1"" && ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat"""
HKCR,Drive\Shell\VS2012CmdHere,,,"%VS2012CmdHereAccel%"
HKCR,Drive\Shell\VS2012CmdHere\command,,,"%11%\cmd.exe /k cd ""%1"" && ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat"""
[VS2012CmdHereUninstall.Reg]
HKLM,%UDHERE%
HKCR,Directory\Shell\VS2012CmdHere
HKCR,Drive\Shell\VS2012CmdHere
HKCR,Directory\Background\Shell\VS2012CmdHere
[Strings]
VS2012CmdHereName="Developer Command Prompt Here for VS2012"
VS2012CmdHereAccel="Developer Command Prompt"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\VS2012CmdHere"
@sinairv
Copy link
Author

sinairv commented Sep 27, 2012

Upon installation of Visual Studio 2012 a global environmental variable is created named %VS110COMNTOOLS% which contains the path to Visual Studio Common Tools Folder. However it seems that INF files do not have access to global environmental variables. Any Ideas for accessing that variable is greatly appreciated; since I hate the way the path to common tools is hard-coded there, and it would be wrong if you choose not to install it on the C drive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment