I apologize in advance if this problem is more sysadmin than programming, but since my actual problem involves getting the browser to run my code I figured I'd post it here first.
I am using IE's Content Advisor to create a white list of websites for specific computers.
I would like the home page of these computers to contain a list of all the links to the allowed web sites. I created a VB script that pulls the URLs of allowed web pages from the registry but IE won't run the script.
Error: "ActiveX component can't create object: 'GetObject'
If I rename the file to .hta it will run, but of course that doesn't function well as a home page. There is no local web server that I can use to host the file, so how can I get IE to run the script with the file located on the local computer?
Thanks!
<html>
<body>
<script type="text/vbscript">
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Ratings\PICSRules\.Default _
\0\PRPolicy"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
index = 0
document.write("<p> <font color=""green""><h1>Unrestricted Web Sites:</h1></font>")
For Each subkey In arrSubKeys
strKeyURLPath = strKeyPath & "\" & index & "\PRPPolicySub\0"
strKeyValue = "PRBUUrl"
objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyURLPath, strKeyValue, strValue
document.write("<p> <a href=""http://" & strValue & """>" & strValue & "</a>")
index = index + 1
Next
</script>
</body>
</html>