BigDaddyO Posted January 23, 2006 Share Posted January 23, 2006 Hello, I am trying to convert a TweakOmatic script for retrieving Internet explorer options. Ultimatilly I want to be able to retrieve all internet explorer options so I can match up settings between different computers if a problem occurs with a Web App. I'll be sending all the output to a single file then writing a compare utility to dump out differences between computers. Here is the VB Script that I am trying to convert from. ' Allow ActiveX components to connect to a different server to obtain data (Zone 3) On Error Resume Next HKEY_CURRENT_USER = &H80000001 strComputer = "." Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" ValueName = "1406" objReg.GetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue If IsNull(strValue) Then Wscript.Echo "Allow ActiveX components to connect to a different server to obtain data (Zone 3): The value is either Null or could not be found in the registry." Else Wscript.Echo "Allow ActiveX components to connect to a different server to obtain data (Zone 3): ", dwValue End If Here is what I have converted so far. It always fails on line 9 ;Allow ActiveX components to connect to a different server to obtain data (Zone 3) Dim $dwValue, $strValue $HKEY_CURRENT_USER = "&H80000001" $strComputer = "." $objReg = ObjGet("winmgmts:\\" & $strComputer & "\root\default:StdRegProv") $strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" $ValueName = "1406" $objReg.GetDWORDValue($HKEY_CURRENT_USER, $strKeyPath, $ValueName, $dwValue) If $strValue == "" Then MsgBox(0, "", "Allow ActiveX components to connect to a different server to obtain data (Zone 3): The value is either Null or could not be found in the registry.") Else MsgBox(0, "", "Allow ActiveX components to connect to a different server to obtain data (Zone 3): ", $dwValue) EndIf Any help is greatly appreciated Thanks, Mike Link to comment Share on other sites More sharing options...
GaryFrost Posted January 23, 2006 Share Posted January 23, 2006 $HKEY_CURRENT_USER = 0x80000001 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
BigDaddyO Posted January 23, 2006 Author Share Posted January 23, 2006 $HKEY_CURRENT_USER = 0x80000001Thanks a lot it works perfect now.If I ever get this whole thing working I'll be sure to post it in the Scripts and Scraps.Mike Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now