Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put Regread code to HTML 1

Status
Not open for further replies.

kshea

Technical User
May 31, 2002
60
CA
Hi All:

I’m trying to check the registry value when loading an html page. Is it possible to put VBScript - RegRead coding inside HTML page?

Thank you in advance
 
Hello kshea,

It depends on the security setting of your browser (IE). If it is trusted, you do it just like hosting .vbs in wsh only perhaps with some annoyance popup asking for permission.
Code:
<html>
<head>
<script language=vbscript>
<!--
sub window_onLoad()
	dim wsh
	set wsh=createobject(&quot;wscript.shell&quot;)
	sreg=wsh.regread(&quot;HKLM\Software\Microsoft\Windows Script Host\Settings\ActiveDebugging&quot;)
	msgbox &quot;Setting for ActiveDebugging = &quot; & sreg
	set wsh=nothing
end sub
'-->
</script>
</head>
<body>
</body>
</html>
Naming it .hta let you by-passing secrutiny of security in a completely trusted environment. There, you know better.

regards - tsuji
 
The short answer is yes, but this depends on the client side internet security settings.

Hope This Help
PH.
 
Thank you tsuji and PH. Your reply helps a lot.

kshea
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top