Group policy Issue

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

  1. George Spiro

    George Spiro Guest


    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
    ' End of example VBScript

    Thank you for your help,

    George Spiro, Oct 22, 2008
    1. Advertisements

  2. James Yeomans BSc, MCSE, Oct 23, 2008
    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
  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:

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

    James Yeomans BSc, MCSE, Oct 24, 2008
    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.