General discussion

Locked

Execute DOS batch file from ASP?

By Mike@IHS ·
Is it possible to call or execute a DOS batch file command within an ASP page!?
Is there a system call property or Object!?

Appreciate your feedback!
Thank you!

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Execute DOS batch file from ASP?

by Peter Ritchie In reply to Execute DOS batch file fr ...

There's no default way to execute a BAT file from an ASP script (or VBScript/JScript script for that matter).

You'd have to write--or find--and object that performed this for you that you could simply call from your ASP script.

If you don't care where the BAT file is run you can setup IIS so that BAT files are run like CGI applications. But, that would be completely separate from ASP.

Collapse -

Execute DOS batch file from ASP?

by Mike@IHS In reply to Execute DOS batch file fr ...

Poster rated this answer

Collapse -

Execute DOS batch file from ASP?

by BeerMonster In reply to Execute DOS batch file fr ...

I've never tried embedding this vbscript in an asp page, but I don't see why it shouldn't work...
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("cmd /c myscript.cmd")
Set WshShell = nothing

Hope it goes OK...

Collapse -

Execute DOS batch file from ASP?

by Mike@IHS In reply to Execute DOS batch file fr ...

Poster rated this answer

Collapse -

Execute DOS batch file from ASP?

by Mike@IHS In reply to Execute DOS batch file fr ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums