siddhs Level: Professor Registered: 02-03-2003 Posts: 92
VBScript Error
Hi Guysss
I am trying to work out the following script but it gives me an error :
--> ActiveX component cant create object :"Wscript.Shell"
Guys I am just testing it ...its not client-server application ..it just reads a particular key ...thats it ...its urgent ..can anyone help me ?? btw i am running Win XP.. I will write the code:
<HTML>
<HEAD>
<SCRIPT language="VBScript" type="text/VBScript">
Function getProxy()
dim sh,Mypath
set sh=CreateObject("WScript.Shell")
Mypath = sh.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\path")
DefProxy = Mypath
WScript.echo DefProxy
document.write (DefProxy + "<br>")
End Function
</SCRIPT>
<TITLE>testing</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<BODY>
<TR> <TD><INPUT type = "button" value = "" name = "click here to create key" onClick = "Call getproxy()">
</BODY>
</HTML>