RE: Win32_Process.Create -- not starting process

Discussion in 'Python' started by Tim Golden, Feb 16, 2006.

  1. Tim Golden

    Tim Golden Guest

    [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
    ________________________________________________________________________
    Tim Golden, Feb 16, 2006
    #1
    1. Advertising

  2. Tim Golden

    abcd Guest

    Tim Golden wrote:
    > 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...



    .....i used double slashes, i guess i didn't type it correctly here.
    Thanks for the reminder though.
    abcd, Feb 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. abcd
    Replies:
    1
    Views:
    742
    EShames
    Feb 17, 2006
  2. Tim Golden
    Replies:
    1
    Views:
    727
  3. Tim Golden
    Replies:
    1
    Views:
    724
  4. Matt Trivisonno
    Replies:
    1
    Views:
    352
  5. Junkone
    Replies:
    3
    Views:
    201
    Daniel Berger
    Mar 13, 2008
Loading...

Share This Page