Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2003, 12:39 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
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.



Reply With Quote
  #2 (permalink)  
Old September 22nd, 2003, 12:40 PM
Registered User
 
Join Date: Sep 2003
Location: , , .
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.


Reply With Quote
  #3 (permalink)  
Old September 23rd, 2003, 03:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
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')">
Reply With Quote
  #4 (permalink)  
Old September 23rd, 2003, 01:48 PM
Authorized User
 
Join Date: Jun 2003
Location: Aalst, Vlaanderen, Belgium.
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 ...
Reply With Quote
  #5 (permalink)  
Old September 23rd, 2003, 01:50 PM
Authorized User
 
Join Date: Jun 2003
Location: Aalst, Vlaanderen, Belgium.
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 ?
Reply With Quote
  #6 (permalink)  
Old September 23rd, 2003, 05:42 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: , , .
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?
Reply With Quote
  #7 (permalink)  
Old September 24th, 2003, 07:10 AM
Authorized User
 
Join Date: Jun 2003
Location: Aalst, Vlaanderen, Belgium.
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].
Reply With Quote
  #8 (permalink)  
Old April 17th, 2007, 09:58 AM
Registered User
 
Join Date: Apr 2007
Location: Iowa, Iowa, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:12 PM.


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