none
Passing parameters in logon script in GPO failed

    Question

  • I have a VBScript and call it as a logon script via GPO in domain controller.
    The script is running at a logon but the parameters are not passed.
    Any ideas why not?

    On technet they say

    In Script Parameters, type the parameters you want to use as you would type them on the command line. For example, if your script included parameters called //logo (display banner) and //I (interactive mode), type: //logo //I.

    So it should be possible the way i do it, right?

    But I dont get any parameters ( I also tried //logo but it there is nothing passed)

    Tuesday, July 14, 2015 10:03 AM

All replies

  • > The script is running at a logon but the parameters are not passed.
    > Any ideas why not?
     
    Please show exactly what you entered in the two input fields for the
    script, and if possible share the related (commandline parsing) script code.
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Tuesday, July 14, 2015 10:06 AM
  • There is one field for the scriptname:

    \\testdomain.local\SysVol\testlab.local\scripts\WMI-Script_Testdomain.vbs

    And one for the parameters:

    test_group test_domain

    And I check for the params:

    On Error Resume Next
    Err.Clear
    MsgBox WScript.Arguments(0)
    If Err.Number <> 0 Then
    MsgBox Err.Description
    End If
    On Error Resume Next
    Err.Clear
    MsgBox WScript.Arguments(1)
    If Err.Number <> 0 Then
    MsgBox Err.Description
    End If


    • Edited by npit Tuesday, July 14, 2015 11:02 AM
    Tuesday, July 14, 2015 10:13 AM
  • Looks ok so far. Out of luck for me - never seen such behavior... ?!?
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Thursday, July 16, 2015 1:25 PM