Running an EXE...

jeremyyak
08-08-2004, 11:48 AM
I want my program so when i push a button i runs lets say C:\test.exe.
So when i push the button the application goes like normal. I DO NOT want to run using my application i just want it to run.

charlie
08-08-2004, 12:03 PM
Use Shell function for executing another programs.
What do you mean with "I DO NOT want to run using my application i just want it to run"??

MikeJ
08-08-2004, 01:44 PM
I think he means it should run standalone... The Shell function will do that just like charlie said - as long as you send the second parameter with vbNormalFocus. (Or you could go fancy and use ShellExecute)

jeremyyak
08-09-2004, 05:10 PM
I used that shell execute thing and it didn't work. I know i wrote the correc location of the file, but it still doesn't work...any ideas :/

MikeJ
08-09-2004, 08:51 PM
Define doesn't work. Also, can you show us what code you have? Again, Shell will work fine, ShellExecute is just to be fancy.

Rashka
08-09-2004, 09:53 PM
lol...Mike you love that ShellExecute, everytime I say Shell you come back with ShellExecute!
Well, this time, it's my turn

Private Sub Command1_Click()
Shell "C:\Program.exe", vbNormalFocus
End Sub

This will open the form, and bring it to the frnt.
KISS = Keep It Short and Simple
For some people Mike, you have to kiss

rajeeshun
08-09-2004, 09:57 PM
The fancy of the ShellExecute is no need to give the associate application name to run/open a program/File, it will take the default application to run the program/File. ShellExecute is more KISS

Rashka
08-09-2004, 10:14 PM
If its an .exe, then you only need the path to it, nothing else, it will run with just that....for a file, if you want to open it in its proper viewer, or specify one, then ShellExecute would be better. However in this case, its an .exe, so Shell works for him.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum