Re: Add Printer Startup Script
From: Radu (Radu_at_discussions.microsoft.com)
Date: 01/15/05
- Next message: Radu: "Microsoft sample script question"
- Previous message: tlviewer: "Re: Current URL for Mark Pryor's site"
- In reply to: Ben: "Re: Add Printer Startup Script"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 15 Jan 2005 12:11:02 -0800
Hi,
Also, you might find useful to enable "Wait for network on startup" setting
on group policy. It will stay longer on the screen "Preparing network
connections", but I think it will do the job. I have the same script on my
network and it works just fine, without any problems.
"Ben" wrote:
> OK thanks I'll give it a try.
>
> Just one thing, wouldn't there HAVE to be a network connection to run the
> script, as its being run from group policy on a domian controller?
>
> Cheers
>
> Ben
>
> "Jan" <bril@ja.nt> wrote in message
> news:euyu2uh%23EHA.3336@TK2MSFTNGP11.phx.gbl...
> > At the time you run the script there is probably no network available.
> >
> > You can try WScript.sleep at the beginning of your script to give the
> > computer some time to start the network connections. I myself use 45000
> > milliseconds to wait before making any connections.
> >
> > "Ben" <bjblackmore@nospam.hotmail.com> schreef in bericht
> > news:eE1pHIb%23EHA.3416@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > >
> > > I'm using the following script to add a printer when a computer starts
> up.
> > > As I want the printer assigned to the computer not the users I've added
> > > this
> > > to the the computer configuration section of the GP, (under "Windows
> > > Settings>Startup/Shutdown"), rather than the user configuration section.
> > > However when you reboot the machine you get an error on start up saying
> > > Error at line 4, char 1, error can not find file specified. But if you
> > > login
> > > and run the script manually it works fine. How do I get the script
> working
> > > correctly?
> > >
> > > Cheers
> > >
> > > Ben
> > >
> > > -=Script=-
> > > Option Explicit
> > > Dim oNetwork
> > > Set oNetwork = CreateObject("WScript.Network")
> > > oNetwork.AddWindowsPrinterConnection "\\PRINTSERVER-2K\CUST-ACCOUNTS"
> > > oNetwork.AddWindowsPrinterConnection "\\PRINTSERVER-2K\CUST-SERVICES"
> > > oNetwork.SetDefaultPrinter "\\PRINTSERVER-2K\CUST-ACCOUNTS"
> > > Set oNetwork = Nothing
> > >
> > >
> > >
> >
> >
>
>
>
- Next message: Radu: "Microsoft sample script question"
- Previous message: tlviewer: "Re: Current URL for Mark Pryor's site"
- In reply to: Ben: "Re: Add Printer Startup Script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|