Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Group policy Issue

Reply
Thread Tools Display Modes

Group policy Issue

 
 
George Spiro
Guest
Posts: n/a

 
      10-22-2008
Hello,

Wondering if someone could help me. I am having trouble with some new
workstations I am deploying and using a group policy / login script. The
problem is that I get a error that the print spooler stops and says that
my script is incorrect. I did notice that if I open the command prompt
and type Cscript its then starts working. Could someone tell me why is
this not working by default?

This is the script:

Dim multiPrinter, UNCpath1, UNCpath2
UNCpath1 = "\\SRV2\A2CU01P"
UNCpath2 = "\\SRV2\C6800PCL"
UNCpath3 = "\\SRV2\A2CU03P"
Set multiPrinter = CreateObject("WScript.Network")
multiPrinter.AddWindowsPrinterConnection UNCpath1
multiPrinter.AddWindowsPrinterConnection UNCpath2
multiPrinter.AddWindowsPrinterConnection UNCpath3
WScript.Quit
' End of example VBScript

Thank you for your help,

George.
 
Reply With Quote
 
 
 
 
James Yeomans BSc, MCSE
Guest
Posts: n/a

 
      10-23-2008
Hi, you would be best to add printers using the con2prt.exe utility. This is
a very simple utility to use via logon script and is the best way i have
found of mapping printers. See:
http://www.justaskjames.co.uk/default.asp?link=107
James.

--
James Yeomans, BSc, MCSE
Ask me directly at: http://www.justaskjames.co.uk


"George Spiro" wrote:

> Hello,
>
> Wondering if someone could help me. I am having trouble with some new
> workstations I am deploying and using a group policy / login script. The
> problem is that I get a error that the print spooler stops and says that
> my script is incorrect. I did notice that if I open the command prompt
> and type Cscript its then starts working. Could someone tell me why is
> this not working by default?
>
> This is the script:
>
> Dim multiPrinter, UNCpath1, UNCpath2
> UNCpath1 = "\\SRV2\A2CU01P"
> UNCpath2 = "\\SRV2\C6800PCL"
> UNCpath3 = "\\SRV2\A2CU03P"
> Set multiPrinter = CreateObject("WScript.Network")
> multiPrinter.AddWindowsPrinterConnection UNCpath1
> multiPrinter.AddWindowsPrinterConnection UNCpath2
> multiPrinter.AddWindowsPrinterConnection UNCpath3
> WScript.Quit
> ' End of example VBScript
>
> Thank you for your help,
>
> George.
>

 
Reply With Quote
 
George Spiro
Guest
Posts: n/a

 
      10-23-2008
My script is fine. I just need to understand why I need to type cscript
for the first time on the workstation for it to work.

Also find it a waste to deploy another application to do something that
windows does out of the box.

James Yeomans BSc wrote:
> Hi, you would be best to add printers using the con2prt.exe utility. This is
> a very simple utility to use via logon script and is the best way i have
> found of mapping printers. See:
> http://www.justaskjames.co.uk/default.asp?link=107
> James.
>

 
Reply With Quote
 
James Yeomans BSc, MCSE
Guest
Posts: n/a

 
      10-24-2008
Hi George I understand what you're saying, however con2prt.exe is a free
microsoft utility that sits on the server and is called from the logon
scrips. There's nothing to actualy install and its completely transparent.
With regards to cscript, its a script host and needs initializing before a
script can run:
http://www.microsoft.com/technet/scr...in/ss1006.mspx

Sometimes the way you want to do things isn't the best way of doing them.

James.
--
James Yeomans, BSc, MCSE
Ask me directly at: http://www.justaskjames.co.uk


"George Spiro" wrote:

> My script is fine. I just need to understand why I need to type cscript
> for the first time on the workstation for it to work.
>
> Also find it a waste to deploy another application to do something that
> windows does out of the box.
>
> James Yeomans BSc wrote:
> > Hi, you would be best to add printers using the con2prt.exe utility. This is
> > a very simple utility to use via logon script and is the best way i have
> > found of mapping printers. See:
> > http://www.justaskjames.co.uk/default.asp?link=107
> > James.
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Group policy issue Daniel Server Networking 11 09-28-2007 10:40 PM
Group Policy Issue! Robert Windows Server 0 08-14-2006 04:53 PM
Group policy issue Jagminder Chugh Windows Server 0 01-24-2006 09:16 AM
Group Policy issue Sun Update Services 0 08-31-2005 09:39 PM
Group Policy Issue Art Luciano Windows Small Business Server 4 07-11-2005 12:25 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59