Launch an application from a webpage. 
Author Message
 Launch an application from a webpage.

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)



Mon, 22 Mar 2004 08:07:16 GMT  
 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)



Mon, 22 Mar 2004 08:47:11 GMT  
 Launch an application from a webpage.
Thank you to all who replied,
I think this solution will work for me right now...

BTW, I ran into a problem when trying to even use WSH thru a website...
I Kept getting an error:  "Object requred: 'WScript'"  Hmmm...

Steven Allen

"Jason Harrell" wrote in an email...

Quote:
>We had an issue similar to this prior to switching over to a terminal
>server environment. I think the "PCAnywhere Express" product is what you
>want. It's a fully scriptable ActiveX component. Will take you some
>searching to find at Symantec. Otherwise you'll want to look into the
>WSH object to implement things like "Shell"



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)



Tue, 23 Mar 2004 23:56:43 GMT  
 Launch an application from a webpage.
If wscript.exe or cscript.exe isn't the host for the script, then the "built-in" WScript object does not exist.  You wouldn't expect a standalone WSH hosted script to have access to the IE DOM would you?  Every host for the scripting engine is different and each exposes it's own (and *only* it's own) object model to script code.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> Thank you to all who replied,
> I think this solution will work for me right now...

> BTW, I ran into a problem when trying to even use WSH thru a website...
> I Kept getting an error:  "Object requred: 'WScript'"  Hmmm...

> Steven Allen

> "Jason Harrell" wrote in an email...
> >We had an issue similar to this prior to switching over to a terminal
> >server environment. I think the "PCAnywhere Express" product is what you
> >want. It's a fully scriptable ActiveX component. Will take you some
> >searching to find at Symantec. Otherwise you'll want to look into the
> >WSH object to implement things like "Shell"



> >> 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)



Wed, 24 Mar 2004 00:13:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Launch an application from a webpage.

2. Refresh TQuery

3. Borland - A little something in Local SQL?

4. Launch App from a Webpage.

5. Hyperlinks - launch browser - load webpage

6. Help: Launching an app using VBScript from a webpage

7. Launch Webpage from ActiveX

8. edatabase hellfire and brimstone

9. make does not pass through for lazarus win32

10. Personal Oracle & Delphi 1.0 C/S

11. Launching any local installed executable from a webpage

12. Launching Local Program via Webpage

 

 
Powered by phpBB® Forum Software