
Launch an application from a webpage.
Download the WSH docs (HTMLHelp format)
http://download.microsoft.com/download/winscript56/Install/5.6/W982KM...
and look up the WshShell.Run method, but for IE use...
Note: You may get a prompt rather than a failure but this issues are the same. Also, JScript's new ActiveXObject and VBScript's CreateObject are equivalent.
Q195826 - PRB: CreateObject Fails from Client-Side Scripts
http://support.microsoft.com/support/kb/articles/Q195/8/26.ASP
You can use any COM object inside IE hosted script provided you want to deal with the hassles of the IE enforced security model regarding "unsafe ActiveX...". Whether the user allows this is strictly up to them. There is no way to do this silently without some prior acknowledgement and permission from the end user...
Or you can simply use HTAs instead - as simple as saving the file with .hta instead of .htm as the extension. .hta files are hosted by mshta.exe rather than iexplore.exe, and have a security model comparable to a conventional Windows desktop application. Of course accepting and executing an HTA is also up to the end user...
--
Michael Harris
Microsoft.MVP.Scripting
--
Please do not email questions - post them to the newsgroup instead.
--
Quote:
> I am attempting to write a webpage that will allow me to launch "PC
> Anywhere" by clicking a button...
> The browser client will always be IE 5+
> Normally in VB, onclick of the button, I would just call the "SHELL"
> function like so
> retval = shell(C:\program files\symantec\pcanywhere\awrem32.exe
> c:\connect.chf /C192.168.123.10",1)
> but apparently VBScript does not support the shell function...
> Any help would be appreciated.
> Steven Allen (dybrn)