Install windows drivers using python -
i'm trying automate driver installation using python script, using batch file same task, since i'm building gui using python i'd incorporate python.
i using pnputil.exe install driver: 'pnputil -i -a path_to_inf' reason can't make work in python, i've tried subprocess.call, os.system, nothing works, kind of error, using os.system can run registry commands read/write/add/remove keys, pnputil gives me errors.
os.system error = 'pnputil' not recognized internal or external command, operable program or batch file.
subprocess.call error = subprocess.popen(['pnputil -i -a path_to_inf'], shell=true) = filename, directory name or volume label syntax incorrect.
you have use whole address of pnputil.exe execute in python..
try this
subprocess.popen(['c:\\windows\\system32\\pnputil.exe -i -a path_to_inf'], shell=true)
or
subprocess.popen(['c:\\windows\\sysnative\\pnputil.exe -i -a path_to_inf'], shell=true)
either should work, because based on 32-bit , 64-bit version
Comments
Post a Comment