Adding Global Printer

D

Daniel

Hello,

I have the following batch that I run on my network to add printers
globally, since my users can't seem to grasp the concept of connecting to
the printers on their own.

@Echo off
rundll32 printui.dll,PrintUIEntry /ga /c\\%1 /n\\%2
start /wait sc \\%1 stop spooler
start /wait sc \\%1 start spooler

The batch name is addgprinter.cmd and is in the system32 dir. Usage:
c:\>addgprinter destcomp printserv\printershare

It works fine on XP machines, but when I run it on 2000 machines, it will
stop the spooler, but will not start it. I have to manually start it. Can
anyone help me?

Thanks,

Daniel
 
M

Mark V

In said:
Hello,

I have the following batch that I run on my network to add
printers globally, since my users can't seem to grasp the concept
of connecting to the printers on their own.

@Echo off
rundll32 printui.dll,PrintUIEntry /ga /c\\%1 /n\\%2
start /wait sc \\%1 stop spooler
start /wait sc \\%1 start spooler

The batch name is addgprinter.cmd and is in the system32 dir.
Usage: c:\>addgprinter destcomp printserv\printershare

It works fine on XP machines, but when I run it on 2000 machines,
it will stop the spooler, but will not start it. I have to
manually start it. Can anyone help me?

Just a suggestion. YMMV
...
start /wait sc \\%1 stop spooler
ping.exe -n 11 127.0.0.1 >nul
start /wait sc \\%1 start spooler

Please say if that helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top