WSH in a web page??The best way to describe an HTA is a DHTML page running locally is a stripped down version of IE (actually mshta.exe) with no UI elements (no menubars, toolbars, etc.) and essentially no security restrictions. For all intents and purposes, it has all the access to client resources that a desktop application has.
HTML Applications Overview
http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
--
Michael Harris
MVP - Windows Script
Hi Michael,
Can you give some more explanation about HTA (how it works or any reference)? I would appreciate this.
Thanks
Bart
All "WScript.blahblah" objects are "unsafe" for use within the browser. Switching to a "Low" security will at least prompt the user. You have to use a custom level to enable use of "unsafe" objects without prompting.
If this an Intranet situation, that *might* be a reasonable thing to do, but *every* user has to do this. If this is local HTML then you're better off making it an HTA.
--
Michael Harris
How can I create a WScript object on a web page? For example:
<html>
<head>
<script language="vbscript">
Set objNet = CreateObject("WScript.Network")
Sub test_OnClick
WScript.echo "Hello " & objNet.Username & " !!!"
End Sub
</script>
</head>
<input type="button" name="test" value="Please Click Me!">
</html>
I'm running IE 5, and the above code would give an error message stating that it couldn't support the WScript object. If you know how to do this in JScript, that would work just as well. Any suggestions???