Wrox Programmer Forums

Need to download code?

View our list of code downloads.

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 Display Modes
  #1 (permalink)  
Old July 11th, 2011, 06:27 AM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Question Running exe on ASP

I've manage to make this code work:

Code:
Set objShell = CreateObject("WScript.Shell")
      objShell.Exec "C:\WINDOWS\system32\winmine.exe"
Set objShell = Nothing
But when I tried adding parameters, I always fail..
Code:
dim arr(3)
arr(0) = "inc"
arr(1) = "contacts"
arr(2) = "inc_ChineseTranslation"
arr(3) = "inc_ChineseTranslation2"
dim f
f = Join(arr,"|")
dim zip
zip = "desktop"

Set objShell = CreateObject("WScript.Shell")
 
		objshell.Exec("C:\Program Files\XStandard\Bin\ConsoleApplication2.exe """&f&""" """& zip &""" ""C:\Documents and Settings\joshua\Desktop""")
Set objshell = Nothing
Can someone tell me what am I doing wrong?..
Thank you in Advance!!

Last edited by jovhenni19; July 11th, 2011 at 06:46 AM.
Reply With Quote
  #2 (permalink)  
Old July 11th, 2011, 07:12 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following link which might help you:
http://classicasp.aspfaq.com/general...-from-asp.html
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
Reply With Quote
The Following User Says Thank You to om_prakash For This Useful Post:
jovhenni19 (July 11th, 2011)
  #3 (permalink)  
Old July 11th, 2011, 10:29 PM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs up

om_prakash
Thank you for the link! I studied it, and rewrote my code. And its working now. I wonder where is the Thanks button.

Oh!, there it is
Reply With Quote
  #4 (permalink)  
Old July 12th, 2011, 01:52 AM
Registered User
 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Aww men..

Why can't I make this work?..

objShell.Run (cmd,0,True)

but this one works..

objShell.Run (cmd)

This line of code is inside a Sub, when I browse the asp page, it says there's an error in the page.

Type mismatch 'RunMe'

RunMe is the name of the Sub.

So what exactly am I doing wrong?...

Thank you in Advance!!
Reply With Quote
Reply


Thread Tools
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
Running an .exe from an ASP.Net application Laggin ASP.NET 1.0 and 1.1 Professional 22 June 3rd, 2007 12:46 AM
running .exe file in asp.net hotshot_21 ASP.NET 1.0 and 1.1 Basics 0 January 9th, 2006 07:32 AM
Running exe from iis asp.net page mnazirkhalid@hotmail.com Classic ASP Components 2 February 21st, 2005 09:41 PM
Running .exe on client side from a .asp page kashyap_thaker Classic ASP Basics 2 November 28th, 2003 05:48 PM
running exe on asp Sarah Classic ASP Components 1 October 7th, 2003 10:53 PM



All times are GMT -4. The time now is 04:07 AM.


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