hitechoutlaw Posted April 26, 2003 Posted April 26, 2003 (edited) 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 Edited April 26, 2003 by hitechoutlaw Quote
Leaders quwiltw Posted April 26, 2003 Leaders Posted April 26, 2003 (edited) Look into... [msdn]System.Diagnostics.Process[/msdn].Start() Edited April 27, 2003 by quwiltw Quote --tim
hitechoutlaw Posted April 26, 2003 Author Posted April 26, 2003 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 *.* Quote
AndreRyan Posted April 27, 2003 Posted April 27, 2003 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 Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
hitechoutlaw Posted April 27, 2003 Author Posted April 27, 2003 thats exactly what i want to do...but how do i get it to run the command though the vb code? Quote
*Gurus* divil Posted April 27, 2003 *Gurus* Posted April 27, 2003 quwiltw already showed you the Process class - was there something specific that that class doesn't have? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
hitechoutlaw Posted April 27, 2003 Author Posted April 27, 2003 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? Quote
Guest mutant Posted April 27, 2003 Posted April 27, 2003 One of the overloads of it accepts command line parameters. Or you can use: 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: System.Diagnostics.Process.Start(proc) Quote
*Gurus* divil Posted April 27, 2003 *Gurus* Posted April 27, 2003 Or you can also use the overload which takes two arguments, the exe to run and the arguments to pass: System.Diagnostics.Process.Start("notepad.exe", "myfile.ext"); Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
hitechoutlaw Posted April 27, 2003 Author Posted April 27, 2003 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? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.