Using Asp to execute a command in a .exe file

This is a discussion on "Using Asp to execute a command in a .exe file" within the Classic ASP section. This forum, and the thread "Using Asp to execute a command in a .exe file are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 4th, 2008, 17:57
Up'n'Coming Member
Join Date: Jul 2007
Location: Barry
Age: 22
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Using Asp to execute a command in a .exe file

how do i make an asp form execute a command to a .exe file?
Reply With Quote

  #2 (permalink)  
Old Jan 7th, 2008, 03:32
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Using Asp to execute a command in a .exe file

I don't have any experience with this thing before but having Google in my fingertips, I found some nice article for you here.

How do I execute a DOS command / batch file / exe from ASP?

Hope that's what you are looking for.
Cheers..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #3 (permalink)  
Old Jan 7th, 2008, 05:20
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Using Asp to execute a command in a .exe file

It depends on whether you just want an exe to run or use functions from a program.
To do the latter you can include .DLL files and execute the code inside them.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #4 (permalink)  
Old Jan 7th, 2008, 08:53
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,479
Blog Entries: 13
Thanks: 1
Thanked 19 Times in 17 Posts
Re: Using Asp to execute a command in a .exe file

this works for me:
Code: Select all
<% 

Dim batchFile
Dim oShell

batchFile = "C:\SafariSetup.exe"

Set oShell = CreateObject("WScript.Shell")

oShell.Run batchFile,3,false

Set oShell = Nothing

If Err.Number <> 0 Then
    If oShell <> Nothing Then Set oShell = Nothing
End If
%>
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #5 (permalink)  
Old Jan 8th, 2008, 00:21
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Using Asp to execute a command in a .exe file

So welshstew, you know ASP huh? Great!

Your link is almost the same like the link I found! That means I found the right link
Could I ask you guys what is this "thing" for?

Thanks.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #6 (permalink)  
Old Jan 11th, 2008, 07:13
Up'n'Coming Member
Join Date: Jul 2007
Location: Barry
Age: 22
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using Asp to execute a command in a .exe file

thanks for the help guys welshstews seems to work atm and im taking he is a welsh man like myself ill use that bit fo code
Reply With Quote
  #7 (permalink)  
Old Jan 11th, 2008, 07:30
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Using Asp to execute a command in a .exe file

What do you use this code for? What is the purpose?
Thanks..

I am learning new code too.. Like this one!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #8 (permalink)  
Old Jan 11th, 2008, 09:44
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Using Asp to execute a command in a .exe file

I'm welsh too! sorry, had to say.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid and update command Mitsuki ASP.NET Forum 0 May 16th, 2006 05:06
Execute external program via PHP ktsirig PHP Forum 1 Oct 1st, 2005 23:08
Need help with document.write command MojoP JavaScript Forum 0 Aug 15th, 2005 18:15
server.execute error..help me tulip4heaven Classic ASP 2 Apr 26th, 2004 17:59


All times are GMT. The time now is 05:10.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43