Link to home
Start Free TrialLog in
Avatar of Rinale
Rinale

asked on

Launching programs

Hey i am trying to internaly launch a program and adding parameters to the end of it i was wondering how i might do this because the shell command im trying isnt working

Example:
exe = hl.exe
want to make it launch: hl.exe -game cstrike +connect 202.123.12.123:7012
Avatar of hj2k3
hj2k3

use the Shell command, like so:
Shell "hl.exe -game cstrike +connect 202.123.12.123:7012"

hope this helps
...or if that doesn't work, use a batch file with the following contents:

@Echo off
hl.exe -game cstrike +connect 202.123.12.123:7012


save it in notepad at "LaunchCS.bat" or something, as long as it ends in ".bat", then use shell to excecute this, with
Shell "LaunchCS.bat"

the problem might be that you are running the exe but the current path is not correct. so, either use
Chdir "c:\counterstrike"  'or wherever hl.exe is

or to use the batch file, after creating it, right click on it, select properties, goto the 'Program' tab and change 'working' to the directory where hl.exe is in.
ASKER CERTIFIED SOLUTION
Avatar of SilentRage
SilentRage

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rinale

ASKER

thanks i was lookin 4 the api