Solved

to create a automatci script to uncheck Authentication tab on "Enable IEEE 802.1x authentication".

Posted on 2011-03-03
4
1,413 Views
Last Modified: 2012-05-11
Hi this script is able to uncheck the authenication tab for windows xp SP2 but it cannot do so for SP3. Please advice is there is any workaround solution, thank you.



Option Explicit
 
 ' EAPOL "Enable"
  EAPOL "Disable"
 
 Sub EAPOL(strAction)
     ' define HK Local Machine constant
     Const HKLM = &H80000002
     ' to be used if no values exist already
     Dim arrEnable : arrEnable = Array(05,00,00,00,00,00,00,00,00,00,00,192,13,00,00,00,32, _
                                 00,00,00,17,34,51,17,34,51,17,34,51,17,34,51,17,34,51,17, _
                                 34,51,17,34,51,17,34,51,17,34,51,17,34,51,17,34,13,00,00, _
                                 00,40,00,00,00,00,00,00,00,40,00,00,00,05,00,00,00,00,00, _
                                 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, _
                                 00,00,00,00,00,00,00,00,00,00,00)
     Dim arrDisable: arrDisable = Array(05,00,00,00,00,00,00,00,00,00,00,64,13,00,00,00,32, _
                                 00,00,00,17,34,51,17,34,51,17,34,51,17,34,51,17,34,51,17, _
                                 34,51,17,34,51,17,34,51,17,34,51,17,34,51,17,34,13,00,00, _
                                 00,40,00,00,00,00,00,00,00,40,00,00,00,05,00,00,00,00,00, _
                                 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, _
                                 00,00,00,00,00,00,00,00,00,00,00)
     
     ' make WMI connection to modify the registry
     Dim objReg : Set objReg = GetObject("winmgmts:\\.\root\default:StdRegProv")
     
     ' define path to key that contains the GUIDs for interfaces
     Dim strGenKeyPath : strGenKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\General"
     Dim strName : strName = "InterfaceList"
     Dim strValue ' will hold the value retrieve through GetStringValue
     ' retrieve the value of the InterfaceList string
     objReg.GetStringValue HKLM, strGenKeyPath, strName, strValue
     ' split the string into an array to get each individual GUID
     Dim arrDevGUID : arrDevGUID = Split(Mid(strValue, 9), "\DEVICE\")
     Dim strBinName : strBinName = "1"
     Dim strDevGUID, strIntKeyPath, arrBinValue
     ' loop through GUID array to look under the Interfaces key
     For Each strDevGUID In arrDevGUID
         strIntKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\Interfaces\" & strDevGUID
         On Error Resume Next
     ' create key if it does not exist
         objReg.CreateKey HKLM, strIntKeyPath
     ' if there is no current value then create it
         Select Case UCase(strAction)
             Case "ENABLE"
                 objReg.SetBinaryValue HKLM, strIntKeyPath, strBinName, arrEnable
             Case "DISABLE"
                 objReg.SetBinaryValue HKLM, strIntKeyPath, strBinName, arrDisable
         End Select
         On Error GoTo 0
     Next
 End Sub
picture1.JPG
0
Comment
Question by:Shankar3003
4 Comments
 
LVL 11

Accepted Solution

by:
TheGorby earned 250 total points
ID: 35027728
I think this article might have the answer to your problem:

http://support.microsoft.com/kb/950725
0
 

Author Comment

by:Shankar3003
ID: 35033066
Hi Guru,

           Thank you for the reply. This was what i was looking for. Please advice is there a way we can create a script to disable the wired autoconfig script, thank you.
0
 
LVL 14

Assisted Solution

by:canali
canali earned 250 total points
ID: 35106958
to disable Wired AutoConfig

REM --- disableWiredAC.cmd
sc stop DOT3SVC
REM --- End
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Synchronize a new Active Directory domain with an existing Office 365 tenant
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question