run msiexec to uninstall an app during install - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

toosensitive
Posts: 30
Joined: Wed Dec 07, 2011 8:27 pm

run msiexec to uninstall an app during install

Hi,
I need uninstall another application in my installer (built from AI)
I created a RemoveStandAlone.exe (console project), which basicall does "msiexec /x {EC749096-0B4E-4848-B72E-18619741C704} /qn"
I created an attached custom action and called the exe in InstallFinalize as sychronous, ignore return code, "Not installed",
I can see the command window but it did not uninstall.

How to make my installer uninstall the other application?

Thanks
Last edited by toosensitive on Tue Mar 13, 2012 10:31 pm, edited 1 time in total.
toosensitive
Posts: 30
Joined: Wed Dec 07, 2011 8:27 pm

Re: run msiexec to uninstall an app during install

Note the application to uninstall is built from VS setup project so it is msi.
I also tried add its upgrade code in "Upgrades" section, but it does not work, either

thanks
toosensitive
Posts: 30
Joined: Wed Dec 07, 2011 8:27 pm

Re: run msiexec to uninstall an app during install

I tried the section in AI help file "How do I uninstall another MSI package when my application is uninstalled?"
It does not work either.
I got the error see attached picture which says "Another program is being installed. Please wait until that installation is complete, and then try installing this software again"
Attachments
Error.png
Error.png (13.66 KiB) Viewed 9630 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: run msiexec to uninstall an app during install

Hello,

When implementing the article, did you schedule the custom functionality after "InstallFinalize" standard action as mentioned?
If so, please send us a sample project with the attempt to implement the article so we can review your settings.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
toosensitive
Posts: 30
Joined: Wed Dec 07, 2011 8:27 pm

Re: run msiexec to uninstall an app during install

Yes, I did. Pls find aip file attached. thanks

This is part of log when I test with bat file

MSI (s) (8C:34) [13:20:40:411]: Set LastUsedType to: n.
MSI (s) (8C:34) [13:20:40:437]: Set LastUsedIndex to: 1.
MSI (s) (8C:34) [13:20:40:462]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=19659549)
MSI (s) (8C:34) [13:20:45:490]: An error occured while refreshing environment variables updated during the installation of ''. Some users logged on to the machine may not see these changes until they log off and then log back on.

Action ended 13:20:45: InstallExecute. Return value 1.
MSI (s) (8C:34) [13:20:45:556]: Doing action: viewer.exe_3
Action start 13:20:45: viewer.exe_3.
MSI (s) (8C:34) [13:20:45:606]: Note: 1: 2262 2: CustomAction 3: -2147287038
MSI (s) (8C:34) [13:20:45:634]: Transforming table CustomAction.

MSI (s) (8C:34) [13:20:45:686]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (s) (8C:34) [13:20:45:716]: Transforming table Binary.

MSI (s) (8C:34) [13:20:45:740]: Note: 1: 2205 2: 3: MsiPatchCertificate
MSI (s) (8C:34) [13:20:45:764]: LUA patching is disabled: missing MsiPatchCertificate table
Action ended 13:20:45: viewer.exe_3. Return value 1.
MSI (s) (8C:34) [13:20:45:907]: Skipping action: AI_DeleteLzma (condition is false)
MSI (s) (8C:34) [13:20:45:956]: Doing action: InstallFinalize
Action start 13:20:45: InstallFinalize.
MSI (s) (8C:34) [13:20:46:014]: Running Script: C:\Windows\Installer\MSIE0CD.tmp
MSI (s) (8C:34) [13:20:46:042]: User policy value 'DisableRollback' is 0
MSI (s) (8C:34) [13:20:46:072]: Machine policy value 'DisableRollback' is 0
MSI (s) (8C:34) [13:20:46:103]: Executing op: Header(Signature=1397708873,Version=500,Timestamp=1080978071,LangId=1033,Platform=589824,ScriptType=1,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)
MSI (s) (8C:34) [13:20:46:132]: Executing op: ProductInfo(ProductKey={34DB579B-29CA-4822-B4DA-C924514F7D91},ProductName=Morningstar Commodity Add-In 2.4.0,PackageName=CommodityAddIn2.4.0.x64.msi,Language=1033,Version=33816576,Assignment=1,ObsoleteArg=0,ProductIcon=CommodityAdd_In_1.exe,,PackageCode={969F0C4D-9101-474B-9EDD-BFEE9EE7A2DE},,,InstanceType=0,LUASetting=0,RemoteURTInstalls=0,ProductDeploymentFlags=3)
MSI (s) (8C:34) [13:20:46:156]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (s) (8C:34) [13:20:46:181]: Executing op: DialogInfo(Type=1,Argument=Morningstar Commodity Add-In 2.4.0)
MSI (s) (8C:34) [13:20:46:207]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,,CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
MSI (s) (8C:34) [13:20:46:230]: Executing op: SetBaseline(Baseline=0,)
MSI (s) (8C:34) [13:20:46:256]: Executing op: SetBaseline(Baseline=1,)
MSI (s) (8C:34) [13:20:46:280]: Executing op: ActionStart(Name=viewer.exe_3,,)
MSI (s) (8C:34) [13:20:46:306]: Executing op: CustomActionSchedule(Action=viewer.exe_3,ActionType=3202,Source=BinaryData,Target="C:\Program Files (x86)\Morningstar\Commodity Add-In\Test.bat",)
MSI (s) (8C:34) [13:20:46:340]: Executing op: ActionStart(Name=InstallFinalize,,)
MSI (s) (8C:34) [13:20:46:381]: Executing op: CleanupTempFiles(TempFiles=C:\Windows\Installer\63c96667.mst)
MSI (s) (8C:34) [13:20:46:405]: Scheduling file 'C:\Windows\Installer\63c96667.mst' for deletion during post-install cleanup (not post-reboot).
MSI (s) (8C:34) [13:20:46:443]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=0)
MSI (s) (8C:B0) [13:20:49:715]: Running as a service.
CustomAction viewer.exe_3 returned actual error code 1618 (note this may not be 100% accurate if translation happened inside sandbox)
1: viewer.exe_3 2: 1603
Action ended 13:20:49: InstallFinalize. Return value 1.
Action start 13:20:49: CalledInInstaller.exe.
Action ended 13:20:50: CalledInInstaller.exe. Return value 1.
Last edited by toosensitive on Thu Mar 15, 2012 4:53 pm, edited 1 time in total.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: run msiexec to uninstall an app during install

Hi,

The log fragment is not related to the .AIP you attached. From the log fragment the error is given by custom action "viewer.exe_3" which I assume is trying to launch another installer.
If you launch another MSI package while an MSI installation is in progress, you will always get this message. Note that if your package requires other software to be installed, you can use prerequisites or chained packages.

Also, the uninstall custom action is set according to the user guide and should work as expected.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
toosensitive
Posts: 30
Joined: Wed Dec 07, 2011 8:27 pm

Re: run msiexec to uninstall an app during install

Yes, the log is not from the aip b/c the aip attached does not work. So I went ahead to change it to use bat in custom action instead of systemFolder.
Now I changed it back, pls see attached file in this post.

Anyway, here is the log for the attached aip
When I install, it simply says "Another program is being installed. Please wait until that installation is complete, and then try installing this software again."

What I am trying to do is:
I have an addin component, its installer is built in VS setup project. Now we have included it in another comprehensive application .
We want to be able to uninstall the addin component during install of the comprehensive application(installer built in AI)
I understand you can't have more than 1 msi running at the same time.
According to your document, there is a way to do it, I follow the guide but it does not work for me.
So I must miss something or some setting is not correct in my AIP.
Will you please take a look?
thanks


Action ended 9:11:36: InstallFinalize. Return value 1.
MSI (s) (98:38) [09:11:36:761]: Doing action: SystemFolder
Action start 9:11:36: SystemFolder.
MSI (s) (98:38) [09:11:36:794]: Note: 1: 2262 2: CustomAction 3: -2147287038
MSI (s) (98:38) [09:11:36:814]: Transforming table CustomAction.

MSI (s) (98:38) [09:11:36:828]: Skipping action: CalledInInstaller.exe_2 (condition is false)
Action ended 9:11:36: SystemFolder. Return value 0.
MSI (s) (98:38) [09:11:36:844]: Doing action: CalledInInstaller.exe
Action start 9:11:36: CalledInInstaller.exe.
MSI (s) (98:38) [09:11:36:961]: Note: 1: 2262 2: CustomAction 3: -2147287038
MSI (s) (98:38) [09:11:36:988]: Transforming table CustomAction.

MSI (s) (98:38) [09:11:37:002]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (s) (98:38) [09:11:37:021]: Transforming table Binary.

Action ended 9:11:37: CalledInInstaller.exe. Return value 1.
MSI (s) (98:38) [09:11:37:153]: Skipping action: viewer.exe_2 (condition is false)
MSI (s) (98:38) [09:11:37:169]: Doing action: viewer.exe
Action start 9:11:37: viewer.exe.
MSI (s) (98:38) [09:11:37:203]: Note: 1: 2262 2: CustomAction 3: -2147287038
MSI (s) (98:38) [09:11:37:220]: Transforming table CustomAction.

MSI (s) (98:38) [09:11:37:235]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (s) (98:38) [09:11:37:254]: Transforming table Binary.
Attachments
AddIn2003.aip
(54.98 KiB) Downloaded 492 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: run msiexec to uninstall an app during install

Send us the entire failing installation log file.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”