Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Group policy Issue

HTVi
TV Discussion Newsgroups

Group policy Issue
George Spiro <dsl55dsl[ at ]gmail.com> 10/22/2008 9:13:45 PM
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.
RE: Group policy Issue
James Yeomans BSc, MCSE 10/23/2008 4:18:01 PM
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:

[Quoted Text]
> 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.
>
Re: Group policy Issue
George Spiro <_[ at ]_.com> 10/23/2008 5:09:59 PM
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:
[Quoted Text]
> 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.
>
Re: Group policy Issue
James Yeomans BSc, MCSE 10/24/2008 1:22:00 PM
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/scriptcenter/resources/begin/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:

[Quoted Text]
> 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.
> >
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen