Page 1 of 1

Opening 2 different things with 1 command button?

Posted: Mon May 02, 2005 1:00 pm
by Cheech|N|Chong
Command button opens
"C:\Program Files\Microsoft Games\Halo\halo.exe"

so the code looks like this

Code: Select all

Private Sub Command1_Click()
Shell "C:\Program Files\Microsoft Games\Halo\halo.exe"
End Sub
but halo wont run without config.txt (it gives me an error when i start it up.
So i have to run halo.exe and config.txt at the same time so i did this

Code: Select all

Private Sub Command1_Click()
Shell "C:\Program Files\Microsoft Games\Halo\config.txt"
Shell "C:\Program Files\Microsoft Games\Halo\halo.exe"
End Sub
But theres an error, any ideas how to launch halo.exe and config.txt at the same time by clicking ONE cmd button?

Posted: Mon May 02, 2005 4:51 pm
by [CL]9mm-Man
Ooh I just relised why it doesnt work on my program, for the same reason. Emm. Have you tried placing the .exe in the halo root directory?

This one looks easy but never works the easy way.

Posted: Mon May 02, 2005 6:12 pm
by Cheech|N|Chong
place the halo config.txt into C:\Program Files\Microsoft Visual Studio\VB98

and try to run halo from the cmd button now..i got a missing (shaders\vsh.bin) error see if you get the same thing plz

Posted: Fri May 06, 2005 11:32 pm
by kaptainkommie
Why don't you just change the working directory to your Halo directory before attempting to start Halo. This will fix your problem in locating config.txt.