473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Invoking Command Prompt

gauravgmbhr
107 100+
Hi All,

I am trying to run a bat file from ASP and I am new to asp.

Expand|Select|Wrap|Line Numbers
  1.     set wshell = CreateObject("WScript.Shell")
  2.              wshell.Run("c:\file.Bat")
  3.  
Nothing is happening in this code. Page is running fine but bat file is not running.
This bat file is trying to create a folder(My actual requirement is to interact with a application and not creating a folder).

But the folder is not getting created. I also tried other DOS commands in bat file but nothing happened.
Is their something I have to do to run bat files before using the above script?
Jul 31 '08 #1
5 1444
DrBunchman
979 Expert 512MB
If you try and run an exe like Excel using the code above does it work?

Dr B
Aug 1 '08 #2
gauravgmbhr
107 100+
If you try and run an exe like Excel using the code above does it work?

Dr B
Hi Dr B
I tried this code on my machine on excel, and worked fine.
But on machine which ASP and IIS is installed , MS-Ofiice is not installed to i cant say that its working on that machine or not.

Do i need some library?
Aug 4 '08 #3
DrBunchman
979 Expert 512MB
Has the machine got Notepad on or something else you can try? The point of the test is to determine whether the fault lies with the code that's calling the shell (which sounds like it is working) or something else.

Does the batch file have the desired result if you run it as normal?

Dr B
Aug 4 '08 #4
gauravgmbhr
107 100+
Has the machine got Notepad on or something else you can try? The point of the test is to determine whether the fault lies with the code that's calling the shell (which sounds like it is working) or something else.

Does the batch file have the desired result if you run it as normal?

Dr B
Yes the batch file is correct.
I tried invokin notpad also, its not working.
Is their any other way using which i can invoke command prompt?
Aug 4 '08 #5
DrBunchman
979 Expert 512MB
So the problem probably does lie in the code if notepad is not being executed.

Have you got any error trapping on your page (On Error Resume Next for example) which you could remove to see whether an error is being thrown?

Dr B
Aug 4 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: ~neil~ | last post by:
hello I'm fairly new to the language, and my problem is I'm trying to write a program to run a command from the DOS prompt "C:>". I don't know all the functions in "C", however there are a few...
4
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is...
14
by: Gio Galma | last post by:
how I can invoke the db2diag utility in a Windows environment? in my D:\Program Files\IBM\SQLLIB\BIN directory I can see only db2diag.dll, and it seems there isn't the command line version; which...
6
shoonya
by: shoonya | last post by:
hello all I am just started migrated from WAMP to WAPP can any body tell me how to run postgreSQL from command prompt?? shoonya
0
by: geet114 | last post by:
Hi, With the help of google and bytes I am able to launch(invoke) the commands(like dos commands), But the problem does end there, now I need launch(invoke) the command something like telnet in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.