 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 22nd, 2003, 12:39 PM
|
|
Registered User
|
|
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to run desktop .exe from asp ?
What is the syntax to run an .exe on a client desktop from asp
script ? This would be a dot net exe on the client desktop, but old
pre-dot-net asp.
|
|

September 22nd, 2003, 12:40 PM
|
|
Registered User
|
|
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I should have given more detail in my question:
These are our customers who trust us. They will set the security
settings of their browser any way we tell them to. The .exe on their client is something we wrote that will already be there on there computer. How do we start it from an asp page ?
Again, the .exe is vb dot net. The asp page is old style, pre dot net.
|
|

September 23rd, 2003, 03:52 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
ASP will not help you here because it runs on the server, so any ASP code which spawns an exe will run that exe on the server.
You need some client-side script. Here is a simple bit of VBS which uses the Windows Scripting Host objects to run an exe:
<script language="vbscript">
Sub RunExe(sPathToExe)
set wshell = createobject("wscript.shell")
wshell.run sPathToExe
set wshell = nothing
End Sub
</script>
you can call it like this:
<input type="button" onclick="RunExe('path to your exe')">
|
|

September 23rd, 2003, 01:48 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That's working fine, is there also a way you can skip the following message ? :
"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction ?"
Is there a way we can make the interaction secure automatically. For example in a secure Intranet, would it be possible to set this option, to launch an app automatically ?
Thanks for your advice ...
|
|

September 23rd, 2003, 01:50 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry, I mean without the need to change the IE security settings on every individual machine ?
|
|

September 23rd, 2003, 05:42 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It depends what the exe is doing. There are registry keys that can be included with ActiveX controls to declare them as script safe, but first you have to determine if they are script safe. What does the exe do?
|
|

September 24th, 2003, 07:10 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, let's say we want to simply launch an application stored on the client his PC and check whether the application is installed on the C-drive.[any application : Winword, Remedy, etc].
|
|

April 17th, 2007, 09:58 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Back to 9/22/2003, we had a discussion about how to run an .exe on a client desktop from asp. As pgtips indicated, client-side VBS script which uses the Windows Scripting Host objects can be used to run an exe.
That's working fine, is there also a way you can skip the following message ? :
"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction ?"
Thanks
James
james
|
|
 |