Running commands on Windows [message #21832] |
Wed, 13 March 2002 09:10  |
Eclipse User |
|
|
|
The command miner runs commands on Windows NT, 2000 and XP fine, but fails
on Windows 95, 98 and ME. This is because Windows NT, 2000 and XP use
"cmd /C" to start a command shell, but Windows 95, 98 and ME use "start
/B". The following code for the command miner fixes this problem:
theShell = "cmd /C ";
if ((theOS.indexOf("95")>=0) ||
(theOS.indexOf("98")>=0) ||
(theOS.indexOf("ME")>=0))
{
theShell = "start /B ";
}
_theProcess = Runtime.getRuntime().exec(theShell + _invocation,
getEnvironment(_subject), theDirectory);
Don Yantzi
|
|
|
Re: Running commands on Windows [message #21877 is a reply to message #21832] |
Wed, 13 March 2002 13:59  |
Eclipse User |
|
|
|
Thanks Don,
The code has been added and is available in CVS. The next published build
will incorporate this.
Dave
yantzi@ca.ibm.com wrote:
> The command miner runs commands on Windows NT, 2000 and XP fine, but fails
> on Windows 95, 98 and ME. This is because Windows NT, 2000 and XP use
> "cmd /C" to start a command shell, but Windows 95, 98 and ME use "start
> /B". The following code for the command miner fixes this problem:
>
> theShell = "cmd /C ";
>
> if ((theOS.indexOf("95")>=0) ||
> (theOS.indexOf("98")>=0) ||
> (theOS.indexOf("ME")>=0))
> {
> theShell = "start /B ";
> }
> _theProcess = Runtime.getRuntime().exec(theShell + _invocation,
> getEnvironment(_subject), theDirectory);
>
> Don Yantzi
|
|
|
Powered by
FUDForum. Page generated in 0.03575 seconds