Adding Global Printer

  • Thread starter Thread starter Daniel
  • Start date Start date
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
 
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.
 
Back
Top