Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script help (for adding printer)

Status
Not open for further replies.

Bhavin78

IS-IT--Management
Oct 26, 2004
320
I want to create a script for users laptop which is not on the domain and want to use printer which is on the domain.

Users laptop gets IP address from DHCP Server (Linksys Router which is conntected to Internal Network)

how can I write a script with domain credential in it show that does not give access denied error.

 
They must have an account in the domain to be able to print.
They should know the username and password.
Then you could script it as follows:

rundll32 printUI.dll PrintUIEntry /in /n\\servername\printersharename

They would then get a popup screen that asked them for their username and password. When they're correct the printer would be installed.

Hope this helps.
 
are the printers centralized on a print server? or are they connected to via IP address?




Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
It's not possible to script in vb by hardcoding username and password.
 
Some of them are via IP and rest on print server
 

creat a batch/vbs file that would map to the desired printer

then use the CPAU program from this site to add the user cred's and est it up as a logon app

GL



Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
Thanks every one for all your help.
 
Cannot join laptop on domain as it belongs to other company domain but beign used by our employee.

net start \\servername\printer name (what about user credential with this)
 
What if you created a domain account for these users in your domain. If you are able to use the exact same username and password as they use on the other domain they shouldn't be asked for credentials. Of course you have to give the new domain users rights to the printer in question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top