General Question

roundsquare's avatar

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

Asked by roundsquare (5522points) May 23rd, 2012
1 response
“Great Question” (0points)

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.

Topics: , ,
Observing members: 0
Composing members: 0

Answers

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.

Mobile | Desktop


Send Feedback   

`