Articles

Install printer from print server with .bat

January 12, 2011 at 17:38:25
Specs: Windows XP

Hey there sorry if that is the wrong section for the forums.

I am trying to find a way to install a printer from a windows 2003 print server. But i need to have it set up so that all you have to do is run a batch file or something and it logs into the server with the user account that I pick and installs the printer. this is going to be for guests that come in and need to print some thing so that it is just one easy step for us to do.

if you can help thank you in advance.

Thanks, Solecs


See More: Install printer from print server with .bat

Report •


#1
January 24, 2011 at 04:12:24

This is something we use in a batch file.

the printers in printers.exe are stored like this

\\printvm\Colour Laser 1
\\printvm\Mono Laser 1
\\printvm\Colour Laser 2

so the batch code we use to import these printers for a user is

for %%a in (printers.txt) do RunDll32.EXE printui.dll,PrintUIEntry /in /n "%%a"

more specifically it is

RunDll32.EXE printui.dll,PrintUIEntry /in /n \\printvm\Mono Laser 1

As for the account it uses, running this command uses the account of the currently logged in user. For guests at our place of work we create what are known as Z accounts which are basically accounts that we create and set an expiry date of +24hrs from when they are created. usually the username is Z0000001, Z0000002 etc. You could use a similar system then place each of these accounts into an AD security group called "Temp Users" and then give this security group rights to the printers you need them to be able to install and use.

I hope this helps.

Thanks


Report •

#2
January 24, 2011 at 07:36:36

Just use Net Use...

http://ss64.com/nt/net_use.html

NET USE \\yourserver\sharedprintername


Report •

#3
January 24, 2011 at 14:31:34

I finally got it to work. I went with was the net use command because it can kick people out if they are idle for more than 15 minutes. Also so I don’t have to worry about creating an account everyday they have a meeting.

Thanks for both of your responses they helped a lot.


Report •

Related Solutions


Ask Question