Failed to start a program by script



Hi,

I used the following script lines to start a program by a schedule batch
program:

Dim AppCmd
Set AppCmd = "start /d c:\rdata c:\swapplic\chsp\bin\dldbridge.exe"
Dim oProcesses, ErrResult, iID
Set oProcess = GetObject("winmgmts:\\" & sName &
"\root\cimv2:Win32_Process")
ErrResult =
oProcess.Create(WScript.Arguments.Named("AppCmd"),Null,Null,iID)

However, the script failed with ErrResult=8.

I recently increase the memory from 1G to 2G and sill have 10G free space in
hard disk. What is going wrong? Please Help!

--
Andy Mar
.



Relevant Pages

  • Re: Failed to start a program by script
    ... I used the following script lines to start a program by a schedule batch ... Dim AppCmd ... Dim oProcesses, ErrResult, iID ...
    (microsoft.public.scripting.vbscript)
  • Re: Failed to start a program by script
    ... Andy Mar ... I used the following script lines to start a program by a schedule batch ... Dim AppCmd ... Dim oProcesses, ErrResult, iID ...
    (microsoft.public.scripting.vbscript)
  • Re: Failed to start a program by script
    ... OK, so now post the code that you actually ran, as the one with "set appcmd ... I used the following script lines to start a program by a schedule ... Dim AppCmd ... Dim oProcesses, ErrResult, iID ...
    (microsoft.public.scripting.vbscript)
  • Re: Failed to start a program by script
    ... I used the following script lines to start a program by a schedule batch ... Dim AppCmd ... Dim oProcesses, ErrResult, iID ... I wonder what the point is to use the Task Scheduler to launch ...
    (microsoft.public.scripting.vbscript)
  • RE: New to VB scripting - Need help with script not looping
    ... RenameFile strNextLine ... Wscript.Echo errResult ... I am new to vb scripting and I am having trouble with a vb script not ... Set colFiles = objWMIService.ExecQuery _ ...
    (microsoft.public.windows.server.scripting)