launching the .msi twice in a row does an uninstall

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
john.banna
Posts: 6
Last visit: Tue Dec 22, 2020 1:16 pm

launching the .msi twice in a row does an uninstall

Post by john.banna »

To help you better we need some information from you.

*** Please fill in the fields below if you are currently using a Trial Version of the Product. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Sapien powershell studio version 5.6.169
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterpsise
32 or 64 bit OS: 64
Powershell Version : PSVersion 5.1.16299.1146


*** Please add details and screenshots as needed below. ***

I am trying to build an .MSI which is working perfectly.

My custom setting screen has an "install" as well as an "uninstall"
I have one powershell script to install my software, and one powershell script to uninstall my software.

Once I "build MSI", I get my <file>.msi
when I run the .msi ( double click ) the powershell script to "install" my software works perfectly.
When I go to "add or remove programs" I am able to see the new program.

If I run the .msi ( double click ) AGAIN, the powershell script to "uninstall" my software runs and
actually uninstalls my software ??????
When I go to "add or remove programs" I am still able to see the new program.



DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Attachments
uninstall.PNG
uninstall.PNG (54.96 KiB) Viewed 19591 times
install.PNG
install.PNG (57.39 KiB) Viewed 19591 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: launching the .msi twice in a row does an uninstall

Post by Alexander Riedel »

License information deleted by moderator. Please note where it says "DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM"
If we detect any suspicious use of your license, we may have to lock this license. Please contact sales@sapien.com if that happens.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: launching the .msi twice in a row does an uninstall

Post by Alexander Riedel »

This is a normal operation. All created MSIs are configured to uninstall/install if a newer or same version is detected.
That way software gets reliably updated or repaired.
So what you see is normal. There is an uninstall, followed by a re-install and you still see the software in the "Add / Remove Programs" panel.
Alexander Riedel
SAPIEN Technologies, Inc.
john.banna
Posts: 6
Last visit: Tue Dec 22, 2020 1:16 pm

Re: launching the .msi twice in a row does an uninstall

Post by john.banna »

Hi Alexander,

Other co-workers get a pop-up stating that a version is already installed when you try to install twice in a row.

Also, When I install twice in a row, my uninstall script runs, but my install script does not run.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: launching the .msi twice in a row does an uninstall

Post by Alexander Riedel »

So the MSI is behaving differently on your machine than on other machines, is that what you are saying?
You will need to run the MSI the first and second time with logging. That should probably give you a clue as to what is happening.
You can also try to do a manual uninstall and then start at a defined state. There are tools on Microsoft's site to clean up errant installer information.
Please understand that we cannot diagnose MSI (Microsoft Installer) issues on your machine.
Alexander Riedel
SAPIEN Technologies, Inc.
john.banna
Posts: 6
Last visit: Tue Dec 22, 2020 1:16 pm

Re: launching the .msi twice in a row does an uninstall

Post by john.banna »

Hi Alexander,

Can you give me more detail on how to turn on/off logging?

when I turn on"use a simple UI when installing" I get this ( see enclosure ) the second time I attempt to install.
Attachments
UI_2.PNG
UI_2.PNG (61.31 KiB) Viewed 19288 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: launching the .msi twice in a row does an uninstall

Post by Alexander Riedel »

Alexander Riedel
SAPIEN Technologies, Inc.
john.banna
Posts: 6
Last visit: Tue Dec 22, 2020 1:16 pm

Re: launching the .msi twice in a row does an uninstall

Post by john.banna »

log.txt
(5.68 KiB) Downloaded 132 times
Hi Alex,

I ran msiexec /I <file.msi> /L ./log.txt from the command line
I have enclosed the log file for your review.
john.banna
Posts: 6
Last visit: Tue Dec 22, 2020 1:16 pm

Re: launching the .msi twice in a row does an uninstall

Post by john.banna »

Hi Alex,

Another thing I discovered is that if I do not make any changes to my code or any
settings, but simply launch a build, then I get the following pop up when I attempt
to install it the second time.
steps
Install : works
rebuild : generate an .msi
Install again
Attachments
another.PNG
another.PNG (45.77 KiB) Viewed 19267 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: launching the .msi twice in a row does an uninstall

Post by Alexander Riedel »

Yes, this is how MSI works. You must increase your version number for a new build. Please understand that while PrimalScript and PowerShell Studio can generate MSI (Microsoft Installer) file, we do not not provide support or training in regards to Windows features. Please consult with Microsoft documentation and/or direct questions regarding Windows Installer to Microsoft directly.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.