Sunday, October 30, 2005

"Run DOS Commands from .NET with Free msDOScommand Class"

Run DOS Commands from .NET with Free msDOScommand Class | developer.* Blogs

"The msDOScommand class, written in Visual Basic.Net, executes MS-DOS commands and provides both status and results.

Features:
* A guarantee that results are complete as a string from each of one or more MS-DOS commands. This is provided by terminating each MS-DOS command in a submitted batch with a dummy file create command. The existence of the dummy file (which is erased by default) proves when tested by msDOScommand that your prior commands executed...avoiding the very dangerous phenomenon of random failures in MS-DOS calls.

* Full thread safety which means that while one instance CANNOT issue more than one command for competing execution, you can access the Status property of this class while waiting for an MS-DOS job, and perform other work while waiting for the command.

You can download the msDOSCommand code here (2MB zip file).

...

...the class removes the VB programmer from having to code asynchronous calls to shell() to run MS-DOS commands.

The software as available comes with a comprehensive test form and application for Windows/.Net which allows you to create an msDOScommand instance, inspect it, test it, and so forth.

...

I do ask that msDOScommand be used ethically. It has no special code for preventing evil commands such as creation of unknown cookies or erasing files. Since you will have the source you can consider adding these safeguards."


Sounds kind of cool. Like it or not, sometimes you just need those old crusty DOS commands...

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...