|
-
Jul 2nd, 2001, 04:25 AM
#1
Thread Starter
Addicted Member
How can I start the command prompt...
Hi,
Just wondering if there is a way to start the command prompt (cmd.exe, Win2K), input a command with switches (-a, /s, etc.) and execute it from my program?
It would also be a big help if there was a way to keep the window open. (The results of the command appear in the window of cmd.exe, but it will close if done from the RUN applet.) My program is a front end to a Console application.
I have given myself a headache trying to figure it out, so any help is VERY much appreciated!!
Thanks,
Scott
-
Jul 2nd, 2001, 08:52 AM
#2
Junior Member
By using
Just use the Shell command
But the window won't stay open after the end of the process
Shell MyPrompt,Constant
where MyPrompt is a string containing your command line
ex : "c:\program files\MyDosApp\MyDosApp.exe -a -b -c"
You will be prompted the possible values for Constant after typing the ,
or use
Dim dummy as long
dummy=Shell(MyPrompt,Constant)
This works the same, I don't know the difference
BTW, I also give myself headaches trying to make a graphical interface
Black Rose of the Artist Clan
-
Jul 4th, 2001, 03:54 PM
#3
Addicted Member
Actully shell doesn't have to return anything if you aren't concerned if it was a successful load or not...
You could do:
VB Code:
Shell "c:\windows\notepad.exe", vbNormalFocus
Michael
Application/Web Developer
Visual Basic 6.0 SP5
Active Server Pages
Oracle 9i
- I'm going to live forever, or die trying!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|