Sign in to follow this  
Followers 0
skippynz

creating a local printer

5 posts in this topic

does anyone have any ideas of how to create a local printer for a user that is not an admin ? ie setup the device and install the drivers that come with a HP 1022n laser printer

i have no idea where to start

thanks

Share this post


Link to post
Share on other sites



does anyone have any ideas of how to create a local printer for a user that is not an admin ? ie setup the device and install the drivers that come with a HP 1022n laser printer

i have no idea where to start

thanks

ok since this post i checked out the rundll32 commands for setting up a local printer and from dos its

rundll32 printui.dll,PrintUIEntry /ia /m "AGFA-AccuSet v52.3" /h "Intel" /v "Windows 2000 or XP" /f %windir%\inf\ntprint.inf

but how can i run that using DLLCALL ? totally new to the dll commands.

Share this post


Link to post
Share on other sites

ok since this post i checked out the rundll32 commands for setting up a local printer and from dos its

rundll32 printui.dll,PrintUIEntry /ia /m "AGFA-AccuSet v52.3" /h "Intel" /v "Windows 2000 or XP" /f %windir%\inf\ntprint.inf

but how can i run that using DLLCALL ? totally new to the dll commands.

actually i think this has been covered in the forums before; the printers are all in the registry, you can just write the registry key that's needed, and then refresh the update... search the forums and you'll find steps for both of those...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

actually i think this has been covered in the forums before; the printers are all in the registry, you can just write the registry key that's needed, and then refresh the update... search the forums and you'll find steps for both of those...

thanks but i ended up using this code to install the drivers and setup the printer.

#include <Process.au3>
#include <File.au3>
#include <Array.au3>

DirCreate("c:\temp\hp1022n\driver")

; file being installed here is a self extracting zip
FileInstall("driver.exe", "c:\temp\hp1022n\*.*")

RunAsSet("administrator",@ComputerName, "password here")

; extract files here
Runwait( "c:\temp\hp1022n\driver.exe /auto c:\temp\hp1022n\" )

; install the printer (must be connected for it to find the USB001 port.
_RunDOS( 'rundll32 printui.dll,PrintUIEntry /if /b"Portable - HP LaserJet 1022n" /r "usb001" /m "HP LaserJet 1022n" /f "c:\temp\hp1022n\driver\HPLJ1020.INF"')

; remove temp files
DirRemove("c:\temp\hp1022n" ,1 )
Edited by craig.gill

Share this post


Link to post
Share on other sites

thanks but i ended up using this code to install the drivers and setup the printer.

#include <Process.au3>
#include <File.au3>
#include <Array.au3>

DirCreate("c:\temp\hp1022n\driver")

; file being installed here is a self extracting zip
FileInstall("driver.exe", "c:\temp\hp1022n\*.*")

RunAsSet("administrator",@ComputerName, password here

; extract files here
Runwait( "c:\temp\hp1022n\driver.exe /auto c:\temp\hp1022n\" )

; install the printer (must be connected for it to find the USB001 port.
_RunDOS( 'rundll32 printui.dll,PrintUIEntry /if /b"Portable - HP LaserJet 1022n" /r "usb001" /m "HP LaserJet 1022n" /f "c:\temp\hp1022n\driver\HPLJ1020.INF"')

; remove temp files
DirRemove("c:\temp\hp1022n" ,1 )
good deal. thanks for posting the solution you went with so that this topic will help others.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0