This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Install MSI more than once without uninstalling...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2016
05:20 PM
Install MSI more than once without uninstalling...
We have a need to have a MSI do a particular set of tasks over and over again. We need to run it from a batch file in a single command line that is not conditional.
I have tried all versions of amus omus REINSTALLMODEs etc with no luck and searched and clicked many howtos without finding a solution...
example:
msiexec /i DoThisOverAndOver.MSI /qb
Has anyone ever got something like this to work?
I have tried all versions of amus omus REINSTALLMODEs etc with no luck and searched and clicked many howtos without finding a solution...
example:
msiexec /i DoThisOverAndOver.MSI /qb
Has anyone ever got something like this to work?
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2016
05:46 PM
Will you get an error because it is already installed... or is this just a test?
Do you want it to run forever... or until CTRL C pressed?
Or do you want it to run X number of times?
Just use a FOR loop from CMD line or in Bat file.
Post answers and I will provide a solution later if you don't have one by then.
Do something like this in bat file to execute test 100 times:
The "|| pause" will pause on error. Remove that if not desired.
Use single % if running from CMD line like this
Do you want it to run forever... or until CTRL C pressed?
Or do you want it to run X number of times?
Just use a FOR loop from CMD line or in Bat file.
Post answers and I will provide a solution later if you don't have one by then.
Do something like this in bat file to execute test 100 times:
@echo off
for /L %%a in (1,1,100) do echo %%a. & msiexec /i "DoThisOverAndOver.MSI" /qb || pause
pause
The "|| pause" will pause on error. Remove that if not desired.
Use single % if running from CMD line like this
for /L %a in (1,1,100) do echo %a. & msiexec /i "DoThisOverAndOver.MSI" /qb || pause
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2016
11:51 AM
Thanks for your help. Just need it to run each login, not in a looping type fashion.
And correct, currently we get an error because it thinks it is installed already. I can get it to re-install but that requires a different command line.
I need the MSI to run at every login, do what is in there regardless of if the stuff is already done. Basically like a batch file works, but via an MSI.
We have to use SCCM to push this thing and SCCM doesn't have conditional tasks.
Examples of stuff I tried:
- run the msi over again: Error product is already installed
- run the msi with reinstall modes: Error Installation only works for products that are already installed.
- uninstall the msi every time before installing it: (only works if msi is prev installed) Error application not not installed.
Errors kick an errorlevel back to SCCM which has no mechanism to ignore errors and the app shows failed - that is what we are trying to avoid.
There should be something i can set/do in installsheild that will let me set the msi to be able to either ignore install status or reinstall as a default action. Similar to the setting to pretend it is a ARPSystemComp so it won't show up in ARP...
And correct, currently we get an error because it thinks it is installed already. I can get it to re-install but that requires a different command line.
I need the MSI to run at every login, do what is in there regardless of if the stuff is already done. Basically like a batch file works, but via an MSI.
We have to use SCCM to push this thing and SCCM doesn't have conditional tasks.
Examples of stuff I tried:
- run the msi over again: Error product is already installed
- run the msi with reinstall modes: Error Installation only works for products that are already installed.
- uninstall the msi every time before installing it: (only works if msi is prev installed) Error application not not installed.
Errors kick an errorlevel back to SCCM which has no mechanism to ignore errors and the app shows failed - that is what we are trying to avoid.
There should be something i can set/do in installsheild that will let me set the msi to be able to either ignore install status or reinstall as a default action. Similar to the setting to pretend it is a ARPSystemComp so it won't show up in ARP...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2016
01:06 PM
Sounds like you are almost there. How are you determining what to use for an uninstall string?
1. Getting it out of the registry?
2. Using WMIC?
3. Just using a hard coded uninstall string?
If you are using 1 or 2 you can just conditionally uninstall to avoid error.
1. Getting it out of the registry?
2. Using WMIC?
3. Just using a hard coded uninstall string?
If you are using 1 or 2 you can just conditionally uninstall to avoid error.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 14, 2016
03:32 PM
Nope not so close....
For uninstall since it is just an msi - we use the standard msiexec /x switch.
and we can't do that every time since, well that is just plain silly and it will error with "This action is only valid for installed products" if it wasn't already installed.
Sounds like i need to clarify further... I have broken this down to a very simple msi to demonstrate what we need.
MSI writes a txt file to the C: Drive. That is all.
Need to run the msi so it writes the file every time the user logs in (no matter if the file is there already or not).
/i Works fine first time, second time it runs but doesn't write the file (cause it thinks it is installed already)
if I delete the txt file, it won't ever write it back with /i
/f If i repair it, that works but would error if trying to use /f as a first time run and would require a different command line for 1st and subsequent runs. Not an option.
What i am hoping is that there is a component setting or a setting in Property Manager that will ignore the fact that it is installed already and let me install it again with the /i
OR
Allow a /f for a first time AND subsequent installs.
There are a few component options ("Reevaluate Condition") and permutations of ReinstallModeTxt Property ("amus") in there that look like they should work to do what we need but don't do it.
I need to be able to double click the msi, have it write the file >> Then i manually delete the file >> then i need to be able to double click the msi and have it write it back again (no errors).
For uninstall since it is just an msi - we use the standard msiexec /x switch.
and we can't do that every time since, well that is just plain silly and it will error with "This action is only valid for installed products" if it wasn't already installed.
Sounds like i need to clarify further... I have broken this down to a very simple msi to demonstrate what we need.
MSI writes a txt file to the C: Drive. That is all.
Need to run the msi so it writes the file every time the user logs in (no matter if the file is there already or not).
/i Works fine first time, second time it runs but doesn't write the file (cause it thinks it is installed already)
if I delete the txt file, it won't ever write it back with /i
/f If i repair it, that works but would error if trying to use /f as a first time run and would require a different command line for 1st and subsequent runs. Not an option.
What i am hoping is that there is a component setting or a setting in Property Manager that will ignore the fact that it is installed already and let me install it again with the /i
OR
Allow a /f for a first time AND subsequent installs.
There are a few component options ("Reevaluate Condition") and permutations of ReinstallModeTxt Property ("amus") in there that look like they should work to do what we need but don't do it.
I need to be able to double click the msi, have it write the file >> Then i manually delete the file >> then i need to be able to double click the msi and have it write it back again (no errors).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 15, 2016
06:56 AM
so you just want something like this: https://community.flexerasoftware.com/showthread.php?76200-Creating-Install-without-Uninstall ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 16, 2016
09:25 AM
MrTree wrote:
so you just want something like this: https://community.flexerasoftware.com/showthread.php?76200-Creating-Install-without-Uninstall ?
Holy cow, all the way back to "The Year 2000..."? noted with a tip of the had to Conan... I didn't get all the way back there during my research 🙂 and would have probably dismissed it out of oldness even if i would have found it...
Thanks for trackin this down, I'll check it out and see if i can modernize the tip to see if it will do what we need in 2016. I'll post back if it works...