EDN Admin
Well-known member
the code below checks whether IE enhanced security configuration installed or not on a server. this works for server 2003 but doesnt work on 2008 r2. it returns IE enhanced security configuration installed response when i know and have checked that its not.
Dim objReg = GetObject("winmgmts:" _<br/>
& "{impersonationLevel=impersonate}\" & svr & _<br/>
"rootdefault:StdRegProv")
Dim strKeyPath = "SOFTWAREMicrosoftActive SetupInstalled Components" _<br/>
& "{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"<br/>
Dim strValueName = "IsInstalled"<br/>
Dim intadmin<br/>
Dim intusers<br/>
objReg.GetDWORDValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, intadmin)
strKeyPath = "SOFTWAREMicrosoftActive SetupInstalled Components" _<br/>
& "{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"<br/>
strValueName = "IsInstalled"<br/>
objReg.GetDWORDValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, intusers)
Dim strConfiguration = intadmin & intusers<br/>
Select Case strConfiguration<br/>
Case "00"<br/>
logbox.AppendText("IE Enhanced Security Configuration is not installed on " & svr & NewLine)<br/>
Case "01"<br/>
logbox.AppendText("The use of Internet Explorer is restricted for the " _<br/>
& "administrators group on this server. The use of Internet " _<br/>
& "Explorer is not restricted for any other user group." & NewLine)<br/>
Case "10"<br/>
logbox.AppendText("The use of Internet Explorer is not restricted for the" _<br/>
& " administrators group on this server. The use of Internet " _<br/>
& "Explorer is restricted for any other user group." & NewLine)<br/>
Case "11"<br/>
logbox.AppendText("IE Enhanced Security Configuration is installed on " & svr & NewLine)<br/>
End Select
any help on getting this working for server 2008 r2 would be greatly appreicated
Leam
View the full article
Dim objReg = GetObject("winmgmts:" _<br/>
& "{impersonationLevel=impersonate}\" & svr & _<br/>
"rootdefault:StdRegProv")
Dim strKeyPath = "SOFTWAREMicrosoftActive SetupInstalled Components" _<br/>
& "{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"<br/>
Dim strValueName = "IsInstalled"<br/>
Dim intadmin<br/>
Dim intusers<br/>
objReg.GetDWORDValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, intadmin)
strKeyPath = "SOFTWAREMicrosoftActive SetupInstalled Components" _<br/>
& "{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"<br/>
strValueName = "IsInstalled"<br/>
objReg.GetDWORDValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, intusers)
Dim strConfiguration = intadmin & intusers<br/>
Select Case strConfiguration<br/>
Case "00"<br/>
logbox.AppendText("IE Enhanced Security Configuration is not installed on " & svr & NewLine)<br/>
Case "01"<br/>
logbox.AppendText("The use of Internet Explorer is restricted for the " _<br/>
& "administrators group on this server. The use of Internet " _<br/>
& "Explorer is not restricted for any other user group." & NewLine)<br/>
Case "10"<br/>
logbox.AppendText("The use of Internet Explorer is not restricted for the" _<br/>
& " administrators group on this server. The use of Internet " _<br/>
& "Explorer is restricted for any other user group." & NewLine)<br/>
Case "11"<br/>
logbox.AppendText("IE Enhanced Security Configuration is installed on " & svr & NewLine)<br/>
End Select
any help on getting this working for server 2008 r2 would be greatly appreicated
Leam
View the full article