Install Multiple msi files consecutively
I have just recently started using (and learning how to) script. I am using Powershell ISE and am trying to create a script that can be run on a new computer to install multiple/various programs. I have the programs in both .exe and .msi and want the programs to install silently, and consecutively. Again I am a beginner, but have put together the script below to get this done. I am trying to find out what variable/command will ensure that the programs install one by one.
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
I originally started this as a .bat file, and can run it to install the .exe files just fine, however they all run at the same time. Therefore, I figured creating a script (rather than a .bat file) would be my best bet. Any and all input and or help is greatly appreciated!
powershell batch-file install
add a comment |
I have just recently started using (and learning how to) script. I am using Powershell ISE and am trying to create a script that can be run on a new computer to install multiple/various programs. I have the programs in both .exe and .msi and want the programs to install silently, and consecutively. Again I am a beginner, but have put together the script below to get this done. I am trying to find out what variable/command will ensure that the programs install one by one.
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
I originally started this as a .bat file, and can run it to install the .exe files just fine, however they all run at the same time. Therefore, I figured creating a script (rather than a .bat file) would be my best bet. Any and all input and or help is greatly appreciated!
powershell batch-file install
3
take a look atGet-Help Start-Process -Parameter wait
for one way to do that. [grin]
– Lee_Dailey
Jan 2 at 15:35
1
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enterStart /?
, you can see the usage information for one possible thing to try; i.e.Start
with its/Wait
option.
– Compo
Jan 2 at 15:37
add a comment |
I have just recently started using (and learning how to) script. I am using Powershell ISE and am trying to create a script that can be run on a new computer to install multiple/various programs. I have the programs in both .exe and .msi and want the programs to install silently, and consecutively. Again I am a beginner, but have put together the script below to get this done. I am trying to find out what variable/command will ensure that the programs install one by one.
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
I originally started this as a .bat file, and can run it to install the .exe files just fine, however they all run at the same time. Therefore, I figured creating a script (rather than a .bat file) would be my best bet. Any and all input and or help is greatly appreciated!
powershell batch-file install
I have just recently started using (and learning how to) script. I am using Powershell ISE and am trying to create a script that can be run on a new computer to install multiple/various programs. I have the programs in both .exe and .msi and want the programs to install silently, and consecutively. Again I am a beginner, but have put together the script below to get this done. I am trying to find out what variable/command will ensure that the programs install one by one.
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
msiexec.exe /q /i '\ServerFolderApplicationsmsi filesfile.msi'
I originally started this as a .bat file, and can run it to install the .exe files just fine, however they all run at the same time. Therefore, I figured creating a script (rather than a .bat file) would be my best bet. Any and all input and or help is greatly appreciated!
powershell batch-file install
powershell batch-file install
asked Jan 2 at 15:28


Leesa MooreLeesa Moore
83
83
3
take a look atGet-Help Start-Process -Parameter wait
for one way to do that. [grin]
– Lee_Dailey
Jan 2 at 15:35
1
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enterStart /?
, you can see the usage information for one possible thing to try; i.e.Start
with its/Wait
option.
– Compo
Jan 2 at 15:37
add a comment |
3
take a look atGet-Help Start-Process -Parameter wait
for one way to do that. [grin]
– Lee_Dailey
Jan 2 at 15:35
1
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enterStart /?
, you can see the usage information for one possible thing to try; i.e.Start
with its/Wait
option.
– Compo
Jan 2 at 15:37
3
3
take a look at
Get-Help Start-Process -Parameter wait
for one way to do that. [grin]– Lee_Dailey
Jan 2 at 15:35
take a look at
Get-Help Start-Process -Parameter wait
for one way to do that. [grin]– Lee_Dailey
Jan 2 at 15:35
1
1
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enter
Start /?
, you can see the usage information for one possible thing to try; i.e. Start
with its /Wait
option.– Compo
Jan 2 at 15:37
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enter
Start /?
, you can see the usage information for one possible thing to try; i.e. Start
with its /Wait
option.– Compo
Jan 2 at 15:37
add a comment |
2 Answers
2
active
oldest
votes
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
add a comment |
Windows Installer: the msiexec.exe
engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd
and run):
msiexec.exe /i MySetup.msi /L*V C:MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'
). Then you will find a new MSI-log file with a random name in the system's %TEMP%
folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f54008974%2finstall-multiple-msi-files-consecutively%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
add a comment |
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
add a comment |
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
You cannot run multiple .msi files all at once if that's what you're wanting. If you want to run them consecutively it would look like this in Powershell:
If it's an msi:
Start-Process msiexec.exe -Wait -ArgumentList '/I ProgramName.msi /quiet'
If it's an exe:
Start-Process programname.exe -Wait -ArgumentList '/I /quiet'
And basically the -Wait parameter will wait until the windows installer closes until it proceeds to the next line of code. Some msi's do have different ways of classifying args depending on the developer. Sometimes it's /q, /qn or /quiet.
answered Jan 2 at 22:59
rad_rad_
445
445
add a comment |
add a comment |
Windows Installer: the msiexec.exe
engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd
and run):
msiexec.exe /i MySetup.msi /L*V C:MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'
). Then you will find a new MSI-log file with a random name in the system's %TEMP%
folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.
add a comment |
Windows Installer: the msiexec.exe
engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd
and run):
msiexec.exe /i MySetup.msi /L*V C:MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'
). Then you will find a new MSI-log file with a random name in the system's %TEMP%
folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.
add a comment |
Windows Installer: the msiexec.exe
engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd
and run):
msiexec.exe /i MySetup.msi /L*V C:MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'
). Then you will find a new MSI-log file with a random name in the system's %TEMP%
folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.
Windows Installer: the msiexec.exe
engine should wait for your installation to complete before it exits. I suspect your command lines are wrong and that is why it looks like they all run and exit simultaneously.
Sample Command Line: Maybe try this command line (maybe put in MyTest.cmd
and run):
msiexec.exe /i MySetup.msi /L*V C:MyLog.log /qn ADDLOCAL=ALL REBOOT=ReallySuppress ALLUSERS=1
Repeat command line for each MSI you need to install.
Logging:The log files should have unique names, obviously. You can enable logging for all MSI installations (section 'Globally for all setups on a machine'
). Then you will find a new MSI-log file with a random name in the system's %TEMP%
folder after each MSI operation. Sort by change date to find the latest one. To find errors in MSI logs, try searching for "value 3".
More information available on request. Please do NOT add your own answer, edit your original question instead. Just add more info, delete or whatever you need. We have versioning so we can find what you delete as well if need be.
edited Jan 3 at 2:22
answered Jan 3 at 2:15


Stein ÅsmulStein Åsmul
22.6k1458123
22.6k1458123
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f54008974%2finstall-multiple-msi-files-consecutively%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
3
take a look at
Get-Help Start-Process -Parameter wait
for one way to do that. [grin]– Lee_Dailey
Jan 2 at 15:35
1
A bat file is a script! You should be using doublequotes, not single quotes. If you open a Command Prompt window and enter
Start /?
, you can see the usage information for one possible thing to try; i.e.Start
with its/Wait
option.– Compo
Jan 2 at 15:37