Network printer

D

Dan

I have an OU called Test with several Win2000 and XP
computers located within this OU. I am trying to run a
script through a group policy on the Test OU that will
connect a network printer to these computers when they
startup. I have tried the sample print script from
Microsoft's site,
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\printserver\prin
share"
WshNetwork.SetDefaultPrinter "\\printserver\printshare"
modified with my with my local printserver and shared
printer to no avail. I tried adding the script file to
the Computer Configuration>Windows
Settings>Scripts>Startup , but I receive the following
error when the computers startup, "The system cannot find
the file specified,". Any help would be appreciated.
 
S

Smelly

You can do this in a batch file:

rundll32 printui.dll,PrintUIEntry /in /n \\printserver\prin
 
C

Chriss3

This is one way=)

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300"
WshNetwork.SetDefaultPrinter \\PrintServer1\Xerox300

Microsoft Technet Script Center Printers:
http://www.microsoft.com/technet/tr.../scriptcenter/printing/default.asp?frame=true

Microsoft Technet Script Center
http://www.microsoft.com/technet/scriptcenter

--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
 
C

Charles Blair

Is the path that you entered in the policy pointing to a UNC share path so
that the client computers can connect to the script?

You can point to any share location or (what I typically do) when you click
on browse to add a script to the policy, you can just paste the script into
the browse window. By default it opens the domain controller's sysvol share
scripts folder and replicates with the rest of the domain controllers.

Charles
 
D

Dan

Yes,I enetered an UNC path \\printserver\printsharename
but when it executes the script file, it acts like it can
find the path.
 
C

Chriss3

Yes, it should run.

Go in to the command line, make sure you stand in same dir as the script are
in, and type the follow

cscript <scriptname>

--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
 

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