I was trying to start/stop netsh trace in Windows10. Created a python and bat file to do the same.
When I try.bat file manually in command prompt it is working but not working using python subprocess call.
Python code:
subprocess.call([r'C:\Tools\Netsh\startTrace.bat'])
Bat File:
netsh trace start persistent=yes capture=yes tracefile=C:\Netsh\nettrace.etl
Any suggestion on the next step are welcome
Try:
subprocess.call((r"C:\Tools\Netsh\startTrace.bat") shell = True) or subprocess.Popen...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.