Win32_Process.Create -- not starting process

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Feb 16 10:42:09 EST 2006


[abcd]

| Tim,
|     I am skipping using the batch file and only executing the python
| script directly...and so far it works fine.
| 
| So now I have:
| pid, retVal =
| wmi.WMI("1.2.3.4").new("Win32_Process").Create(CommandLine="c:
| \python\python.exe
| c:\some_script.py")
| 
| Thanks again...not sure why when using the batch file to start it
| wouldnt always work, but as long is it works now!

Thanks for letting me know. Hope it continues to work
for you.

BTW, I would recommend you either to use a raw string
for that command line (r"c:\python\python.exe c:\xx.py") or
to double up your slashes ("c:\\python\\python.exe c:\\xx.py").
As it happens \p has no special meaning that I'm
aware of, but better safe than sorry...

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list