Can not Install application using batch file
if am using this batch file it is working fine for my PC, but we are running it on main system so we can install package on all PCs but its not working fine in case. here is the Batch file code..
@ECHO OFF
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
ECHO.
ECHO Installing...
msiexec /i C:xyz.msi /qn
ECHO.
CLS
EXIT
windows command-line powershell batch-file installer
add a comment |
if am using this batch file it is working fine for my PC, but we are running it on main system so we can install package on all PCs but its not working fine in case. here is the Batch file code..
@ECHO OFF
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
ECHO.
ECHO Installing...
msiexec /i C:xyz.msi /qn
ECHO.
CLS
EXIT
windows command-line powershell batch-file installer
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing themsiexec /i C:xyz.msi /qn
to point to a SMB share, e.g.msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your.msi
on the client localC:
, which won't exist, unless you're copying the file to local computers elsewhere?
– Kinnectus
Feb 6 at 11:35
1
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
ChangeCLS
toPAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).
– JosefZ
Feb 10 at 16:39
add a comment |
if am using this batch file it is working fine for my PC, but we are running it on main system so we can install package on all PCs but its not working fine in case. here is the Batch file code..
@ECHO OFF
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
ECHO.
ECHO Installing...
msiexec /i C:xyz.msi /qn
ECHO.
CLS
EXIT
windows command-line powershell batch-file installer
if am using this batch file it is working fine for my PC, but we are running it on main system so we can install package on all PCs but its not working fine in case. here is the Batch file code..
@ECHO OFF
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
ECHO.
ECHO Installing...
msiexec /i C:xyz.msi /qn
ECHO.
CLS
EXIT
windows command-line powershell batch-file installer
windows command-line powershell batch-file installer
edited Feb 6 at 11:13
Romeo Ninov
1,87321014
1,87321014
asked Feb 6 at 9:09
user994752user994752
1
1
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing themsiexec /i C:xyz.msi /qn
to point to a SMB share, e.g.msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your.msi
on the client localC:
, which won't exist, unless you're copying the file to local computers elsewhere?
– Kinnectus
Feb 6 at 11:35
1
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
ChangeCLS
toPAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).
– JosefZ
Feb 10 at 16:39
add a comment |
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing themsiexec /i C:xyz.msi /qn
to point to a SMB share, e.g.msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your.msi
on the client localC:
, which won't exist, unless you're copying the file to local computers elsewhere?
– Kinnectus
Feb 6 at 11:35
1
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
ChangeCLS
toPAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).
– JosefZ
Feb 10 at 16:39
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing the
msiexec /i C:xyz.msi /qn
to point to a SMB share, e.g. msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your .msi
on the client local C:
, which won't exist, unless you're copying the file to local computers elsewhere?– Kinnectus
Feb 6 at 11:35
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing the
msiexec /i C:xyz.msi /qn
to point to a SMB share, e.g. msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your .msi
on the client local C:
, which won't exist, unless you're copying the file to local computers elsewhere?– Kinnectus
Feb 6 at 11:35
1
1
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
Change
CLS
to PAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).– JosefZ
Feb 10 at 16:39
Change
CLS
to PAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).– JosefZ
Feb 10 at 16:39
add a comment |
0
active
oldest
votes
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%2f1402585%2fcan-not-install-application-using-batch-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1402585%2fcan-not-install-application-using-batch-file%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
Are you trying to run the script from a server on network connected clients? If you are then you'll need to look at, at least, changing the
msiexec /i C:xyz.msi /qn
to point to a SMB share, e.g.msiexec /i \serverxyz.msi /qn
. The script, as is, will attempt to locate your.msi
on the client localC:
, which won't exist, unless you're copying the file to local computers elsewhere?– Kinnectus
Feb 6 at 11:35
1
Please provide some additional clarification, "but it's not working fine in case", does not tell us what is wrong with your script. Please provide this necessary required information as an edit to your question instead of a comment.
– Ramhound
Feb 6 at 12:10
Change
CLS
toPAUSE
. Then you can see all outputs incl. potential error messages. Please edit the question and clarify that vague it's not working fine in case (add output from the elevated command prompt).– JosefZ
Feb 10 at 16:39