472,954 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

AspExec - Run batch file from ASP page

hi everyone,
I searched in faq's but couldn't find and solution...
so here I post the popular question..

Env: Win2003 server / IIS6.0
Simple ASP page that runs a batch file.

When I run the asp page, I see some command line window pop-up on my screen
for a second [may be the "cmd" is triggered without any parameters]. But the
batch file is not executed. I gave 'IUSR_*' account 'full control'.
-----------------------CODE----------------------------
Set objExecutor = Server.CreateObject("ASPExec.Execute")
objExecutor.Application = "cmd.exe"
objExecutor.Parameters = "/c c:\test.bat"
objExecutor.ShowWindow = True
strResult = objExecutor.ExecuteWinApp
response.write "<p>" & strResult & "</p>"
-----------------------CODE----------------------------
On running the ASP page I see output as "Ok", with no errors. But the batch
file is not executed.

Interestingly, when I tried "WScript.Shell", same exact thing happennd
[command pop-up for a second, with no executing of batch file.]

I have this exact setup running on a Win2000/IIS 5 running for over a
year.....

Any suggestions are appreciated...
thanks,
May 12 '06 #1
1 5049
Ben
It seams, many people have this problem with IIS6 / Windows 2003 - but nobody has a solution?
May 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Karmens | last post by:
which is better to use? dim wsh set wsh = Server.CreateObject("WScript.Shell") wsh.run "c:\build.exe", 1, True set wsh = nothing --or--
14
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command...
9
by: Doug at SAU | last post by:
I need to run a batch file on a remote machine from an ASP page. I dummied up a test ASP page as follows: <% Set WshShell = Server.CreateObject("Wscript.Shell") wshshell.run...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
3
by: KRK | last post by:
I am having one batch file and using this I can start my Server. It will execute all exes while starting. Now my question is how to debug my exe using this batch file?? Is it possible to execute this...
3
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
0
by: northof40 | last post by:
Hi - I have a requirement to run a .EXE from within a ASP page. From reading the archives it seems like ASPExec.dll from serverobjects.com has been recommended in the past but this is not longer...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am doing a migration for our web program from IIS 5.0 to IIS 6.0 One thing I was baffled is aspexec component. I didn't change the code, but it seems the following code doesn't work...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.