Group policy Issue

Discussion in 'Scripting' started by George Spiro, Oct 22, 2008.

  1. George Spiro

    George Spiro Guest

    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.
     
    George Spiro, Oct 22, 2008
    #1
    1. Advertisements

  2. James Yeomans BSc, MCSE, Oct 23, 2008
    #2
    1. Advertisements

  3. George Spiro

    George Spiro Guest

    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.
     
    George Spiro, Oct 23, 2008
    #3
  4. 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, Oct 24, 2008
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.