How can i run a .exe-file with batch?
first off: i've been making batch-files before, but this time (i don't know how or why) I've got stuck with something simple. So I'm trying to make a program which starts a virtual disc and opens a game afterwards. Could you guys please help me? What is wrong with my program?
@echo off
title Diablo Starter
color 4a
:start
cls
echo (D)iablo / Diablo (L)oD
set /p choose=Was soll ausgefuehrt werden?
if %choose%==d goto simple
if %choose%==D goto simple
if %choose%==l goto exp
if %choose%==L goto exp
echo Bitte geben Sie entweder 'D' oder 'L' ein.
pause
goto start
:simple
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD2. PLAY DISC.ISO"
@ping -n 4 localhost> nul
start "C:ProgrammeDiablo IIDiablo II.exe"
exit
:exp
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO"
@ping -n 4 localhost> nul
start "C:Dokumente und EinstellungenUserStartmenüProgrammeDiablo IIDiablo II - Lord of Destruction"
windows-xp batch
add a comment |
first off: i've been making batch-files before, but this time (i don't know how or why) I've got stuck with something simple. So I'm trying to make a program which starts a virtual disc and opens a game afterwards. Could you guys please help me? What is wrong with my program?
@echo off
title Diablo Starter
color 4a
:start
cls
echo (D)iablo / Diablo (L)oD
set /p choose=Was soll ausgefuehrt werden?
if %choose%==d goto simple
if %choose%==D goto simple
if %choose%==l goto exp
if %choose%==L goto exp
echo Bitte geben Sie entweder 'D' oder 'L' ein.
pause
goto start
:simple
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD2. PLAY DISC.ISO"
@ping -n 4 localhost> nul
start "C:ProgrammeDiablo IIDiablo II.exe"
exit
:exp
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO"
@ping -n 4 localhost> nul
start "C:Dokumente und EinstellungenUserStartmenüProgrammeDiablo IIDiablo II - Lord of Destruction"
windows-xp batch
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43
add a comment |
first off: i've been making batch-files before, but this time (i don't know how or why) I've got stuck with something simple. So I'm trying to make a program which starts a virtual disc and opens a game afterwards. Could you guys please help me? What is wrong with my program?
@echo off
title Diablo Starter
color 4a
:start
cls
echo (D)iablo / Diablo (L)oD
set /p choose=Was soll ausgefuehrt werden?
if %choose%==d goto simple
if %choose%==D goto simple
if %choose%==l goto exp
if %choose%==L goto exp
echo Bitte geben Sie entweder 'D' oder 'L' ein.
pause
goto start
:simple
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD2. PLAY DISC.ISO"
@ping -n 4 localhost> nul
start "C:ProgrammeDiablo IIDiablo II.exe"
exit
:exp
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO"
@ping -n 4 localhost> nul
start "C:Dokumente und EinstellungenUserStartmenüProgrammeDiablo IIDiablo II - Lord of Destruction"
windows-xp batch
first off: i've been making batch-files before, but this time (i don't know how or why) I've got stuck with something simple. So I'm trying to make a program which starts a virtual disc and opens a game afterwards. Could you guys please help me? What is wrong with my program?
@echo off
title Diablo Starter
color 4a
:start
cls
echo (D)iablo / Diablo (L)oD
set /p choose=Was soll ausgefuehrt werden?
if %choose%==d goto simple
if %choose%==D goto simple
if %choose%==l goto exp
if %choose%==L goto exp
echo Bitte geben Sie entweder 'D' oder 'L' ein.
pause
goto start
:simple
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD2. PLAY DISC.ISO"
@ping -n 4 localhost> nul
start "C:ProgrammeDiablo IIDiablo II.exe"
exit
:exp
cls
start "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO"
@ping -n 4 localhost> nul
start "C:Dokumente und EinstellungenUserStartmenüProgrammeDiablo IIDiablo II - Lord of Destruction"
windows-xp batch
windows-xp batch
edited Feb 10 at 8:20
Tetsujin
15.8k53462
15.8k53462
asked Feb 9 at 21:21
Daniel GötterDaniel Götter
133
133
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43
add a comment |
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43
add a comment |
1 Answer
1
active
oldest
votes
Where it should start the game, it just opens a cmd prompt with the path of the exe
Please read the syntax for start
.
You have the program name in quotes (which are required because the program name contains spaces) but start
interprets this as the window title.
Provide an empty title string as follows:
start "" "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO".
Syntax
START "title" [/D path] [options] "command" [parameters]
...
Always include a TITLE this can be a simple string like "My Script" or
just a pair of empty quotes ""
According to the Microsoft documentation, the title is optional, but
depending on the other options chosen you can have problems if it is
omitted.
Source - Start - Start a program - Windows CMD - SS64.com
Further Reading
- An A-Z Index of the Windows CMD command line | SS64.com
- Windows CMD Commands (categorized) - Windows CMD - SS64.com
- Start - Start a program - Windows CMD - SS64.com
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403990%2fhow-can-i-run-a-exe-file-with-batch%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Where it should start the game, it just opens a cmd prompt with the path of the exe
Please read the syntax for start
.
You have the program name in quotes (which are required because the program name contains spaces) but start
interprets this as the window title.
Provide an empty title string as follows:
start "" "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO".
Syntax
START "title" [/D path] [options] "command" [parameters]
...
Always include a TITLE this can be a simple string like "My Script" or
just a pair of empty quotes ""
According to the Microsoft documentation, the title is optional, but
depending on the other options chosen you can have problems if it is
omitted.
Source - Start - Start a program - Windows CMD - SS64.com
Further Reading
- An A-Z Index of the Windows CMD command line | SS64.com
- Windows CMD Commands (categorized) - Windows CMD - SS64.com
- Start - Start a program - Windows CMD - SS64.com
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
add a comment |
Where it should start the game, it just opens a cmd prompt with the path of the exe
Please read the syntax for start
.
You have the program name in quotes (which are required because the program name contains spaces) but start
interprets this as the window title.
Provide an empty title string as follows:
start "" "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO".
Syntax
START "title" [/D path] [options] "command" [parameters]
...
Always include a TITLE this can be a simple string like "My Script" or
just a pair of empty quotes ""
According to the Microsoft documentation, the title is optional, but
depending on the other options chosen you can have problems if it is
omitted.
Source - Start - Start a program - Windows CMD - SS64.com
Further Reading
- An A-Z Index of the Windows CMD command line | SS64.com
- Windows CMD Commands (categorized) - Windows CMD - SS64.com
- Start - Start a program - Windows CMD - SS64.com
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
add a comment |
Where it should start the game, it just opens a cmd prompt with the path of the exe
Please read the syntax for start
.
You have the program name in quotes (which are required because the program name contains spaces) but start
interprets this as the window title.
Provide an empty title string as follows:
start "" "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO".
Syntax
START "title" [/D path] [options] "command" [parameters]
...
Always include a TITLE this can be a simple string like "My Script" or
just a pair of empty quotes ""
According to the Microsoft documentation, the title is optional, but
depending on the other options chosen you can have problems if it is
omitted.
Source - Start - Start a program - Windows CMD - SS64.com
Further Reading
- An A-Z Index of the Windows CMD command line | SS64.com
- Windows CMD Commands (categorized) - Windows CMD - SS64.com
- Start - Start a program - Windows CMD - SS64.com
Where it should start the game, it just opens a cmd prompt with the path of the exe
Please read the syntax for start
.
You have the program name in quotes (which are required because the program name contains spaces) but start
interprets this as the window title.
Provide an empty title string as follows:
start "" "C:Dokumente und EinstellungenUserDesktopHauptordnerDiablo II + LoD4. EXPANSION DISC.ISO".
Syntax
START "title" [/D path] [options] "command" [parameters]
...
Always include a TITLE this can be a simple string like "My Script" or
just a pair of empty quotes ""
According to the Microsoft documentation, the title is optional, but
depending on the other options chosen you can have problems if it is
omitted.
Source - Start - Start a program - Windows CMD - SS64.com
Further Reading
- An A-Z Index of the Windows CMD command line | SS64.com
- Windows CMD Commands (categorized) - Windows CMD - SS64.com
- Start - Start a program - Windows CMD - SS64.com
answered Feb 9 at 21:36
DavidPostill♦DavidPostill
106k26228263
106k26228263
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
add a comment |
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
oooh damnit. Thank you. Now it's working
– Daniel Götter
Feb 9 at 21:38
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403990%2fhow-can-i-run-a-exe-file-with-batch%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you tell us where it is going wrong we might be able to help ...
– DavidPostill♦
Feb 9 at 21:23
Oh sorry. Pfff, im useless today. The problem is that when it comes to the part where it should start the game, it just opens a cmd prompt with the path of the exe, as directory
– Daniel Götter
Feb 9 at 21:27
Please edit your question instead of submitting commentary
– Ramhound
Feb 9 at 23:43