Reputation: 11
Code snippets are as follows:
import os
a= "\\"
path=r"C:"+a+"Windows"+a+"System32"
print "\n path :",path
os.chdir('C:')
os.path.abspath(path)
os.chdir(path)
print os.getcwd()
os.system('PNPUTIL.exe')
Result :
path : C:\Windows\System32
C:\Windows\System32
'PNPUTIL.exe' is not recognized as an internal or external command,
operable program or batch file.
Though the utility is available its not geting identified,wat could be the problem?
Upvotes: 1
Views: 588
Reputation: 8873
This should work
import subprocess
subprocess.call(['C:\\Windows\\System32\\PNPUTIL.exe'])
Upvotes: 3