user3038168
user3038168

Reputation: 29

im having trouble launching an already made program with a batch file

I am trying to launch scp containment breach with a batch file, it opens the cmd.exe but won't launch the game here's what I have (I am a beginner)

Batch file code is as follows:

@echo off
REM Next command opens SCP - Containment Breach v0.7.4 
start /d "C:\SCP - Containment Breach v0.7.4\"
start "C:\SCP - Containment Breach v0.7.4\" 

Upvotes: 1

Views: 325

Answers (3)

Voltaire
Voltaire

Reputation: 93

Edit: My quoting last time was a failure. Here is a better one:

I don't know if the thing you're trying to open is a .exe file or a folder, but here you go:

OPEN FOLDER

@echo off
REM Next command opens SCP - Containment Breach v0.7.4 
start "" "C:\SCP - Containment Breach v0.7.4\"

OPEN EXECUTABLE

@echo off
REM Next command opens SCP - Containment Breach v0.7.4 
start "" "C:\SCP - Containment Breach v0.7.4\executable.exe"

Upvotes: 1

Mark
Mark

Reputation: 3700

There are a couple of issues here. First, if start is passed a quoted string, it treats that as the title of the window it opens, so you're opening a cmd.exe instance with a window title of C:\SCP - Containment Breach v0.7.4\.

If you're just trying to start a program, you can just pass that along by itself, without the need for start.

"C:\SCP - Containment Breach v0.7.4\scp.exe"

This assumes that the executable to start is called scp.exe so you'll need to change that bit if it's not.

Upvotes: 1

Void Star
Void Star

Reputation: 2521

I am unsure whether this will work for your situation since you didn't give very much information, but give this a try.

@echo off
cd C:\SCP - Containment Breach v0.7.4\
start SCP - Containment Breach v0.7.4.exe

Upvotes: 1

Related Questions