none
how I can run a command line during the Windows Deployment Wizard before picking the Task Sequence RRS feed

  • Question

  • how I can run a command line during the Windows Deployment Wizard before picking the Task Sequence, I would like to run ipconfig /setclassid "Local Area Connection" XXXXX,, I know I can press F8 and run the command manually, but is there a way to make this process automatically.

    thank you

    Wednesday, January 22, 2014 2:53 PM

Answers

  • Create a UserExit.vbs script.

    Never had to change the class ID before.


    Keith Garner - keithga.wordpress.com

    Thursday, January 23, 2014 6:47 AM
    Moderator
  • Thank you for pointing me in the right direction,,  I Changed the vbs script an it works now,

    Function UserExit(sType, sWhen, sDetail, bSkip)
         If sWhen = "BEFORE" Then
          Dim WhsShell
     set WshShell= WScript.CreateObject("WScript.Shell")
     WshShell.Run "X:\Windows\System32\ipconfig /setclassid ""Ethernet"" INET",0,True
        
         Else '"AFTER"
              'Optional Code
         End If

         bSkip = [True|False]
         UserExit = [Success|Failure]

    End Function

     
    • Marked as answer by afernandez1027 Thursday, January 23, 2014 6:16 PM
    Thursday, January 23, 2014 6:04 PM

All replies

  • Create a UserExit.vbs script.

    Never had to change the class ID before.


    Keith Garner - keithga.wordpress.com

    Thursday, January 23, 2014 6:47 AM
    Moderator
  • Thank you for your reply Keith,  I have the following userexit.vbs

    Dim WhsShell

    set WshShell= WScript.CreateObject("WScript.Shell")

    WshShell.Run "C:\Windows\System32\ipconfig /setclassid ""Local Area Connection"" INET",0,True

    and I added the script to the CS.ini

    [Settings]
    Priority=TaskSequenceID,Default
    Properties=MyCustomProperty

    [Default]
    UserExit=userexit.vbs
    OSInstall=Y
    SkipCapture=YES
    SkipAdminPassword=YES
    SkipProductKey=YES
    SkipComputerBackup=YES
    SkipBitLocker=YES
    SkipUserData=YES
    SkipComputerName=NO
    ApplyGPOPacks=NO
    JoinWorkGroup=WORKGROUP
    SkipDomainMembership=YES
    SkipLocaleSelection=YES
    KeyboardLocale=0409:00000409
    UserLocale=en-US
    UILanguage=en-US
    SkipTimeZone=YES
    TimeZoneName=Eastern Standard Time
    SkipSummary=YES
    SkipFinalSummary=YES
    SkipApplications=YES
    SkipAppsOnUpgrade=YES

    But nothing happens is there something that i'm missing the reason we need this is because our dhcp server won't give dns until we set the classid, we do that for protection so unauthorized users won't plug their laptop in our network and browse the web.  

    Thank you again

    • Marked as answer by afernandez1027 Thursday, January 23, 2014 6:16 PM
    • Unmarked as answer by afernandez1027 Thursday, January 23, 2014 6:16 PM
    Thursday, January 23, 2014 2:30 PM
  • Thank you for pointing me in the right direction,,  I Changed the vbs script an it works now,

    Function UserExit(sType, sWhen, sDetail, bSkip)
         If sWhen = "BEFORE" Then
          Dim WhsShell
     set WshShell= WScript.CreateObject("WScript.Shell")
     WshShell.Run "X:\Windows\System32\ipconfig /setclassid ""Ethernet"" INET",0,True
        
         Else '"AFTER"
              'Optional Code
         End If

         bSkip = [True|False]
         UserExit = [Success|Failure]

    End Function

     
    • Marked as answer by afernandez1027 Thursday, January 23, 2014 6:16 PM
    Thursday, January 23, 2014 6:04 PM