COMSPEC handling in switch and quietcmd.bat
Brought to you by:
youngmug
/bin/switch doesn't translate the drive letter portion
of COMPSEC into a cygwin path. For example, if
COMSPEC=C:\WTSRV\System32\cmd.exe, switch will attempt
to execute c:/WTSRV/System32/cmd.exe, and this actually
ought to be /cygdrive/c/WTSRV/System32/cmd.exe.
Also, quietcmd.exe uses a hardcoded path
c:\winnt\system32\cmd.exe, and really ought to use
%SystemRoot% or %COMSPEC%.
Anonymous
Logged In: YES
user_id=584133
As far as I know Switch is only created to decide (from the
first commands recieved) whether to give you the %comspec%
exe of the sh.exe as your shell.
If you are in the sh.exe shell then you can refer to either
c: or /cygdrive/c but it won't be translated for you.
I concur with your comment about quietcmd.bat.
I've created (using Michael Johnson's NSIS script as a base)
a new up to date release of Open SSH for Windows. I've
updated quietcmd.bat to use %comspec%.
This new release can be found at:
http://sshwindows.webheat.co.uk