From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Peter B. West" To: gnu-win32@cygnus.com Subject: Starting bash from Explorer Date: Mon, 04 Aug 1997 19:36:00 -0000 Message-id: <3.0.2.32.19970805123718.00699e4c@dingo.cc.uq.edu.au> X-SW-Source: 1997-08/msg00061.html One and all, My apologies if this has been mentioned before, but I haven't seen it in a few months. I have modified the file Doshere.inf, part of the power toys package from MS. Doshere installs in the right-button menu of Explorer, and offers to open a Dos box in the specified directory. bashhere.inf makes a similar offer of a bash shell. I find it useful. Your faithfully, Peter ; "bash prompt here" by Peter West ; Based on:- ; "Command Prompt Here" PowerToy ; ; Parts Copyright 1996 Microsoft Corporation ; ; NOTES: ; This setup is currently working under Windows 95. My configuration includes ; Service Pack 1 and a number of recent fixes downloaded from MS. Mail me if ; you need more info on this. ; ; This file is based directly on the PowerToys doshere.inf, which installs ; entries in the registry to allow startup, via right-clicking on a directory ; in Explorer, of a console window rooted in the selected directory. After ; installation of doshere.inf, the menu entry - ; Command _Prompt Here ; appears in the right-click menu. ; ; In this case (bashhere.inf), the menu item is ; bash shel_L here ; ; I experienced some frustration in trying to get the "cd" to work ; properly, until I decided to experiment from a bare-bones bash console. I ; set the command entry to what you see below: ; %BashWinBin%\bash.exe ; and it worked! By default, the bash window was cd'd to the selected directory. ; Another bonus is that long file names are preserved. ; ; *** REMEMBER to define %BashWinBin% appropriately for your system *** ; ; **WARNING* I have not attempted to do this in NT (I don't have NT), so I have ; NO idea whether it will work. ; ; SETUP: ; From wherever you download the file, right-click on the file in Explorer, ; and select Install. The new entry will appear in the Explorer right-click ; menu list when you select a drive or directory. ; ; This .inf file is copied to the \windows\inf directory, and entries, as detailed ; below, are made in the registry. ; ; UNINSTALLING: ; Use Control Panel|Add/Remove Programs ; [version] signature="$CHICAGO$" [BashHereInstall] CopyFiles = BashHere.Files.Inf AddReg = BashHere.Reg [DefaultInstall] CopyFiles = BashHere.Files.Inf AddReg = BashHere.Reg ; WARNING - untested [DefaultInstall.ntx86] CopyFiles = BashHere.Files.Inf AddReg = BashHere.Reg.NT [DefaultUnInstall] DelFiles = BashHere.Files.Inf DelReg = BashHere.Reg ; WARNING - untested [DefaultUnInstall.ntx86] DelFiles = BashHere.Files.Inf DelReg = BashHere.Reg.NT [SourceDisksNames] 55="BASH Prompt Here","",1 [SourceDisksFiles] BASHHERE.INF=55 [DestinationDirs] BashHere.Files.Inf = 17 [BashHere.Files.Inf] BASHHERE.INF [BashHere.Reg] HKLM,%UDHERE% HKLM,%UDHERE%,DisplayName,,"%BashHereName%" HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\BashHere.inf" HKCR,Directory\Shell\BashHere,,,"%BashHereAccel%" HKCR,Directory\Shell\BashHere\command,,,"%BashWinBin%\bash.exe" HKCR,Drive\Shell\BashHere,,,"%BashHereAccel%" HKCR,Drive\Shell\BashHere\command,,,"%BashWinBin%\bash.exe" ; WARNING -untested [BashHere.Reg.NT] HKLM,%UDHERE% HKLM,%UDHERE%,DisplayName,,"%BashHereName%" HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\BashHere.inf" HKCR,Directory\Shell\BashHere,,,"%BashHereAccel%" HKCR,Directory\Shell\BashHere\command,,,"%BashWinBin%\bash.exe" HKCR,Drive\Shell\BashHere,,,"%BashHereAccel%" HKCR,Drive\Shell\BashHere\command,,,"%BashWinBin%\bash.exe" [Strings] BashHereName="bash prompt here Power Toy" BashHereAccel="bash shel&L here" UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\BashHere" ; ***** N.B. ***** Remember to redefine this for your system BashWinBin="E:\gnu-w32\H-i386-cygwin32\bin"