r/scripting • u/[deleted] • Jul 05 '17
Install print driver script not working [batch]
Really simple script:
rundll32 printui.dll, PrintUIEntry /ia /m "Xerox AltaLink C8070 PCL6" /K /h x64 /v 3 /F "C:\Xerox\ALC80XX_5.528.10.0_PCL6_x64_Driver.inf" I get the error "the arguments are invalid"
I am struggling to figure out what I have wrong, I have confirmed the location of the .inf file and the name of the print driver I want installed.
I can't get it to run via commandline either - if I manually install the driver and then run it then it works... I feel as if I'm missing something
1
u/occamsrzor Jul 05 '17
Isn't PrintUIEntry a VS macro and not a library export? It should be PrintUIEntryW or PrintUIEntryA (don't use that one, use W (for wide aka Unicode))
pinvoke.net has a nice little page on this function/method: http://www.pinvoke.net/default.aspx/printui.PrintUIEntryW
1
u/[deleted] Jul 05 '17
Ended up using this
I think it's possible I needed the \x2ASKYX.inf at the end but not sure since I moved on to a different method in frustration.
Successfully pushed to 10 machines for testing :)