Message6162
Here is a small test.bat which handles both quoted and unquoted %COMSPEC% variables:
test.bat
--------
:finish
set _UNQUOTED_COMSPEC=%COMSPEC:"=%
"%_UNQUOTED_COMSPEC%" /c exit /b %E%
and then using it:
C:\test>set ComSpec=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>test.bat
C:\test>set _UNQUOTED_COMSPEC=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>"C:\Program Files (x86)\Copy of cmd\cmd.exe" /c exit /b
C:\test>
C:\test>set ComSpec="C:\Program Files (x86)\Copy of cmd\cmd.exe"
C:\test>test.bat
C:\test>set _UNQUOTED_COMSPEC=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>"C:\Program Files (x86)\Copy of cmd\cmd.exe" /c exit /b
C:\test>
I think this could solve the issue |
|
Date |
User |
Action |
Args |
2010-10-10 10:01:08 | otmarhumbel | set | messageid: <1286704868.98.0.887602534974.issue1661@psf.upfronthosting.co.za> |
2010-10-10 10:01:08 | otmarhumbel | set | recipients:
+ otmarhumbel, pjenvey, zyasoft, stuaxo |
2010-10-10 10:01:08 | otmarhumbel | link | issue1661 messages |
2010-10-10 10:01:08 | otmarhumbel | create | |
|