running DOS commands in a windows app

hitechoutlaw

Regular
Joined
Mar 22, 2003
Messages
77
Location
USA
i have this program call UHARC, maybe ya'll have heard of it?, newayz it's a compression tool (very good one at that) and its DOS only. i want to be able to run DOS commands from my program.

i want to make a GUI for it and befor i start, i need to know if u can run DOS commands with VB and if so, how?

thanks

-Hitech

EDIT: as of right now, there is no .dll version for ppl that want to make a GUI
 
Last edited:
i can make the program start but to make archives and extract them u have to do DOS commands.

i.e.: one way to make an archive called files.uha and inslude all files in the directory:

uharc a -ed+ -d2 -mx -mm+ -r+ files.uha *.*
 
You could just automate the command line, for example you display a file list, the user chooses the files they want and click compress, you then use the command line of the utility to compress the specified files
 
quwiltw already showed you the Process class - was there something specific that that class doesn't have?
 
if u just use the process class and start it with out the parameters it does nothing but start, say "nothing to do", and ends. if u can add parameters to the Process.Start, then will u tell me how?
 
One of the overloads of it accepts command line parameters.
Or you can use:
Visual Basic:
Dim proc As New System.Diagnostics.ProcessStartInfo("filename")
And then you can set process properties,arguments and all that.
And then you just do this:
Visual Basic:
System.Diagnostics.Process.Start(proc)
 
Or you can also use the overload which takes two arguments, the exe to run and the arguments to pass:

C#:
System.Diagnostics.Process.Start("notepad.exe", "myfile.ext");
 
ok i sat here and thought about it and ur right it does work. now i have another question:
i have "uharc.exe" hardcoded into the program, how, if its possible, do i get it to use that one and not the one out of the program?
 
Back
Top