This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Shell-Here Explorer context menu


Have you ever wanted to simply click on a directory in the Windows explorer
and open a bash shell in that directory, well now you can. Save the
attached file as ShellHere.inf, then right click on it and select Install.
This then makes a few registry changes and the next time that you right
click on a directory or a drive on explorer you will see a "Shell Prompt
Here" option. Voila.

I took the concept from the Microsoft Dos-Here powertoy and then adapted it
to work with bash, though the idea could easily be extended to work with
any shell.

Hopefully someone else will find this useful, if anyone wants to put this
on a web site so that it remains generally available then please go ahead.

Guy

;
; "Bash Shell Prompt Here" PowerToy
;
; Modified by Guy Gascoigne - Piggford
; from the original DosHere powertoy
; Copyright 1996 Microsoft Corporation
;

[version]
signature="$CHICAGO$"

[ShellHereInstall]
CopyFiles = ShellHere.Files.Inf
AddReg    = ShellHere.Reg

[DefaultInstall]
CopyFiles = ShellHere.Files.Inf
AddReg    = ShellHere.Reg.NT

[DefaultUnInstall]
DelFiles  = ShellHere.Files.Inf
DelReg    = ShellHere.Reg.NT

; [DefaultUnInstall.ntx86]
DelFiles  = ShellHere.Files.Inf
DelReg    = ShellHere.Reg.NT

[SourceDisksNames]
55="DOS Prompt Here","",1

[SourceDisksFiles]
ShellHere.INF=55

[DestinationDirs]
ShellHere.Files.Inf = 17

[ShellHere.Files.Inf]
ShellHere.INF

[ShellHere.Reg.NT]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%ShellHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\ShellHere.inf"
HKCR,Directory\Shell\ShellHere,,,"%ShellHereAccel%"
HKCR,Directory\Shell\ShellHere\command,,,"%11%\cmd.exe /k cd ""%1"" && bash && exit"
HKCR,Drive\Shell\ShellHere,,,"%ShellHereAccel%"
HKCR,Drive\Shell\ShellHere\command,,,"%11%\cmd.exe /k cd ""%1"" && bash && exit"

[Strings]
ShellHereName="Shell Prompt Here"
ShellHereAccel="Shell P&rompt Here"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\ShellHere"

-- 
'The time has  come,'  the Walrus said,  'To  talk of many things:
Of shoes - and ships - and sealing wax - Of cabbages - and kings -
And why the sea is  boiling hot  -  And  whether pigs have wings.'
Lewis Carroll, The Walrus and the Carpenter 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]