How come this command line does not work??

  • Thread starter Thread starter Patrick
  • Start date Start date
shell "c:\command.com /c c:\mcafee\sdat4295.exe /silent"

What does "shell" mean?
command.com is not located in c:\ but in %Systemdrive%\system32.
Because this path is included in %Path% you can delete "C:\"

Ciao, Walter
 
Assuming you mean the Shell method from VB6, the problem
is probably due to the fact that command.com is not
resident in the root directory. Even if it were it's just
not a good idea to code it that way. Use the %COMSPEC%
environment variable instead to reference the command
processor.

shell "%comspec% /c c:\mcafee\sdat4295.exe /silent"

Then it will work on any system, even those that have
Cmd.exe as a command processor, residing in the
WINNT\System32 folder.

Tom Lavedas
===========
 
Thanks for the quick reply. If I were to put the
mentioned shell statement in a batch file. Would it work?
 
Patrick said:
Thanks for the quick reply. If I were to put the
mentioned shell statement in a batch file. Would it work?

Shell is the VB6 Command

in a batch file could simply use:

"%comspec% /c c:\mcafee\sdat4295.exe /silent

hth
Matthias
 
Back
Top