Wrox Programmer Forums
|
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
 
Old September 22nd, 2003, 12:39 PM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.



 
Old September 22nd, 2003, 12:40 PM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


 
Old September 23rd, 2003, 03:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

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')">
 
Old September 23rd, 2003, 01:48 PM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ...
 
Old September 23rd, 2003, 01:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, I mean without the need to change the IE security settings on every individual machine ?
 
Old September 23rd, 2003, 05:42 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
 
Old September 24th, 2003, 07:10 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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].
 
Old April 17th, 2007, 09:58 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run an exe application from ASP vik_asp Classic ASP Components 5 March 8th, 2013 02:18 AM
run .exe in asp hostxxi Classic ASP Basics 0 June 18th, 2008 04:01 AM
how to run exe (vb) from asp annatg75 Classic ASP Basics 1 September 19th, 2006 07:26 AM
how to run exe file from ASP? Andraw Classic ASP Basics 1 September 23rd, 2005 06:32 AM
Regarding To run EXE from ASP vppatil_20 Classic ASP Components 1 September 9th, 2004 03:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.