Print Page | Close Window

Executing DOS Commands

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5629
Printed Date: 30 March 2026 at 9:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Executing DOS Commands
Posted By: pmormr
Subject: Executing DOS Commands
Date Posted: 09 September 2003 at 2:08pm
Is there any way to execute DOS commands from ASP? Say 'defrag -a'...

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Replies:
Posted By: MorningZ
Date Posted: 09 September 2003 at 2:52pm
it requires a third parent component to open a shell

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: michael
Date Posted: 09 September 2003 at 3:26pm
Any easy though prob. not the most secure way would be to use Windows Scripting Host (WSH).

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: pmormr
Date Posted: 09 September 2003 at 5:00pm
i'm not worried about security, i just want to defrag my hard drive on a schedule... I can save it as VBScript and execute in the scheduled tasks.

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: MorningZ
Date Posted: 09 September 2003 at 6:09pm

Originally posted by pmormr pmormr wrote:

i'm not worried about security, i just want to defrag my hard drive on a schedule... I can save it as VBScript and execute in the scheduled tasks.

and you can't just make a DOS-based batch file and run that .bat file from the Scheduled Task area to run because why?

no reason to bring VBscript into the mix



-------------
Contribute to the working anarchy we fondly call the Internet



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net