Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Printers using printui.dll
#1
This works when executed from run:
rundll32 printui.dll,PrintUIEntry /if /b "Non PostScript Printer" /m "HP DeskJet 310" /f %windir%\inf\ntprint.inf /r "lpt1:"

So, this should work but doesn't:
run "rundll32" "printui.dll,PrintUIEntry /if /b ''Non PostScript Printer'' /m ''HP DeskJet 310'' /f %windir%\inf\ntprint.inf /r ''lpt1:''"

Get "Pinters" error message saying, "Operation could not be completed."

Am I missing something? Or is there something wrong.
#2
This works:
Function Function91
Code:
Copy      Help
str path="%windir%\inf\ntprint.inf"
path.expandpath
str param=
;printui.dll,PrintUIEntry
;/if
;/b "Non PostScript Printer"
;/m "HP DeskJet 310"
;/r "lpt1:"
;/f
param+path
run "rundll32" param
out "Done"

Any other way?
#3
I think everything is correct.


Forum Jump:


Users browsing this thread: 1 Guest(s)