General Question

roundsquare's avatar

How do I get pythonw run in the background in a .cmd file?

Asked by roundsquare (5527points) May 23rd, 2012

I have a .cmd file that has the following commands:

C:\Python27\pythonw.exe xyz.py 12
C:\Python27\pythonw.exe xyz.py 13

If I run these two commands in a .cmd window the first starts running in the background and then I can run the second. But when I do it in a .cmd file that doesn’t work. Is there a way I can get this to work? I need these to run in parallel.

Observing members: 0 Composing members: 0

1 Answer

XOIIO's avatar

Use a vbs file to run it invisibly, but you won’t be able to se it in task manager either. Should work with .cmd or anything else really.

Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “yourbatchfile.bat” & Chr(34), 0
Set WshShell = Nothing

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther