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 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:

Set objShell = CreateObject("WScript.Shell")
      objShell.Exec "C:\WINDOWS\system32\winmine.exe"
Set objShell = Nothing
But when I tried adding parameters, I always fail..
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..
Old July 11th, 2011, 07:12 AM
Friend of Wrox
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

Please check the following link which might help you:
Om Prakash Pant
Click the "Thanks" button if this post helped you.
The Following User Says Thank You to om_prakash For This Useful Post:
jovhenni19 (July 11th, 2011)
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

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
Old July 12th, 2011, 01:52 AM
Registered User
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts

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!!

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 08:32 AM
Running exe from iis asp.net page mnazirkhalid@hotmail.com Classic ASP Components 2 February 21st, 2005 10:41 PM
Running .exe on client side from a .asp page kashyap_thaker Classic ASP Basics 2 November 28th, 2003 06:48 PM
running exe on asp Sarah Classic ASP Components 1 October 7th, 2003 10:53 PM

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