Creating an ActiveX object in Autoproxy script failing in Xp SP2

J

james.a.owens

We are using a javascript for our Autoproxy, but because of a legacy
problem with how our domains were configured, we need to determine the
Active Directory Domain of machines to know which proxies to send them
to. The following code worked great in XP SP1, but we are testing in
XP SP2, and it's failing. This would run in the "Local Intranet"
security zone in IE, where all ActiveX is allowed and enabled. Anyone
have any ideas on how to do this differently, or somewhere in
configuration to re-enable this type of object creation?

bKey = GetComputerDomain();
if (shExpMatch(bKey,"MTESTNET"))
return FindProxyForURLMTESTNET(url, host);

function GetComputerDomain()
{
Sh = new ActiveXObject("WScript.Shell");
bKey = (Sh.RegRead
("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Winlogon\\DefaultDomainName"));
return bKey;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top