How to run invisible a cmd.exe command,example:
Below is one example you may find works as you describe:
You will have the batch file with the below logic named tool.bat
@ECHO OFF
python "C:\Python27\tool.py"
EXIT /B
- You will have a VBS file with the below logic named
tool.vbs
Ensure the path below in the C:\tool.bat part is pointed to the correct path to the batch file
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\tool.bat" & Chr(34), 0
Set WinScriptHost = Nothing
- You will then execute the
tool.vbs file and your process should run hidden.
make it visible after a while?
To run python script with cmd and show output
CMD /K START "" "C:\Python27\tool.py"