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.
john.banna
Posts: 6
Joined: Thu Oct 24, 2019 12:15 pm

launching the .msi twice in a row does an uninstall

Post by john.banna » Fri Nov 08, 2019 6:44 am

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 602 times
install.PNG
install.PNG (57.39 KiB) Viewed 602 times

User avatar
Alexander Riedel
Posts: 7107
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Fri Nov 08, 2019 7:50 am

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: 7107
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Fri Nov 08, 2019 8:23 am

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
Joined: Thu Oct 24, 2019 12:15 pm

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

Post by john.banna » Tue Nov 12, 2019 5:26 am

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: 7107
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Tue Nov 12, 2019 7:33 am

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
Joined: Thu Oct 24, 2019 12:15 pm

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

Post by john.banna » Wed Nov 13, 2019 6:34 am

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 299 times

User avatar
Alexander Riedel
Posts: 7107
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Wed Nov 13, 2019 7:49 am

Alexander Riedel
SAPIEN Technologies, Inc.

john.banna
Posts: 6
Joined: Thu Oct 24, 2019 12:15 pm

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

Post by john.banna » Wed Nov 13, 2019 11:32 am

log.txt
(5.68 KiB) Downloaded 6 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
Joined: Thu Oct 24, 2019 12:15 pm

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

Post by john.banna » Wed Nov 13, 2019 11:49 am

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 278 times

User avatar
Alexander Riedel
Posts: 7107
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Wed Nov 13, 2019 12:52 pm

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.