VS2008 Command Prompt Shell Integration

Mar 14, 2008 at 4:00 AM
I built an INF file which can helps greatly with new VS 2008 feture - Open Project Folder command menu in solution explorer.
In integrates into explorer shell as a folder command, which actually opens selected folder in VS SDK or VS2005/2008 build environment itself
(you may need to modify the "Sdk" variable to specify location of your SDK or VS2005/VS2008 build environment - "setenv.cmd" "vsvars32.bat")

Oh, do not forget, that you can even install/uninstall it ordinal way using standart "Control Panel/Uninstall a program".

Cheers.

--- Sdk Here Power Toy .inf ---
; "x64 Debug Build Command Shell" PowerToy

version
signature="$CHICAGO$"

SdkHereInstall
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg

DefaultInstall
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg

DefaultInstall.ntx86
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg.NT

DefaultUnInstall
DelFiles = SdkHere.Files.Inf
DelReg = SdkHere.Remove.Reg

DefaultUnInstall.ntx86
DelFiles = SdkHere.Files.Inf
DelReg = SdkHere.Remove.Reg.NT

SourceDisksNames
55="x64 Debug Build Command Shell","",1

SourceDisksFiles
SDKHERE.INF=55

DestinationDirs
SdkHere.Files.Inf = 17

SdkHere.Files.Inf
SDKHERE.INF

SdkHere.Reg
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Directory\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""
HKCR,Drive\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Drive\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""

SdkHere.Reg.NT
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Directory\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""
HKCR,Drive\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Drive\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""

SdkHere.Remove.Reg.NT
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere
HKCR,Drive\Shell\SdkHere

SdkHere.Remove.Reg
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere
HKCR,Drive\Shell\SdkHere

Strings
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\SdkHere"
SdkHereName="x64 Debug Build Command Shell Power Toy"
SdkHereAccel="x64 Debug Build Command Shell"
Cmd="C:\Windows\System32\cmd.exe"
Sdk="C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SetEnv.Cmd"

--- Cut Here ---

What do you think? Does it helps you any way or not?
Mar 14, 2008 at 4:01 AM
; "x64 Debug Build Command Shell" PowerToy

[version]
signature="$CHICAGO$"

[SdkHereInstall]
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg

[DefaultInstall]
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg

[DefaultInstall.ntx86]
CopyFiles = SdkHere.Files.Inf
AddReg = SdkHere.Reg.NT

[DefaultUnInstall]
DelFiles = SdkHere.Files.Inf
DelReg = SdkHere.Remove.Reg

[DefaultUnInstall.ntx86]
DelFiles = SdkHere.Files.Inf
DelReg = SdkHere.Remove.Reg.NT

[SourceDisksNames]
55="x64 Debug Build Command Shell","",1

[SourceDisksFiles]
SDKHERE.INF=55

[DestinationDirs]
SdkHere.Files.Inf = 17

[SdkHere.Files.Inf]
SDKHERE.INF

[SdkHere.Reg]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Directory\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""
HKCR,Drive\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Drive\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""

[SdkHere.Reg.NT]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Directory\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""
HKCR,Drive\Shell\SdkHere,,,"%SdkHereAccel%"
HKCR,Drive\Shell\SdkHere\command,,,"""%Cmd%"" /E:ON /V:ON /K ""cd ""%1"" && ""%%Sdk%%"""""

[SdkHere.Remove.Reg.NT]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere
HKCR,Drive\Shell\SdkHere

[SdkHere.Remove.Reg]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%SdkHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\SdkHere.inf"
HKCR,Directory\Shell\SdkHere
HKCR,Drive\Shell\SdkHere

[Strings]
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\SdkHere"
SdkHereName="x64 Debug Build Command Shell Power Toy"
SdkHereAccel="x64 Debug Build Command Shell"
Cmd="C:\Windows\System32\cmd.exe"
Sdk="C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SetEnv.Cmd"