[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2011-03-03
4
Medium Priority
?
1,460 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 11

Accepted Solution

by:
TheGorby earned 1000 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 1000 total points
ID: 35106958
to disable Wired AutoConfig

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

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

656 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