How to create MSI package which uninstalls other MSI via GPO - 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!

Maciejp
Posts: 3
Joined: Fri Jun 03, 2011 2:31 pm

How to create MSI package which uninstalls other MSI via GPO

Hi,

I'm new to Advanced Installer and i need to create MSI package which will be used over GPO. This MSi package should uninstall currently existing MSI package and once done it should uninstall itself (but this is optional).
I was able to archive that using vbs file which is running from MSI package but as soon as i try to run this MSI from the GPO it doesn't work. When i run the Msi manually it works properly. Why the same package does not work via GPO?
Is there any other way i could accomplish this? Any suggestions appriciated.

/Maciej
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create MSI package which uninstalls other MSI via GPO

Hello Maciej and welcome to the Advanced Installer Forums,

This is happening because, you cannot uninstall a .MSI deployed via GPO but through GPO only.

Here is a tutorial from our user guide that has the basics of GPO deployment. Please make sure everything else is set accordingly.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Maciejp
Posts: 3
Joined: Fri Jun 03, 2011 2:31 pm

Re: How to create MSI package which uninstalls other MSI via GPO

mihai.petcu wrote:Hello Maciej and welcome to the Advanced Installer Forums,
This is happening because, you cannot uninstall a .MSI deployed via GPO but through GPO only.
Hi Mihai

Thanks for your reply and for the link but I read it before. Do you mean to uninstall the MSi package using "Immediately uninstall the software from users and computers"? If yes then this is not an option for me as i need to uninstall certain MSi package from approx. 120 computers and not from all of them. (With GPO i can use differnet security settings for different MSI packages to archive selective installations/deinstallations)

And this was the reason why i was thinking to create another MSI package which will uninstall previously installed MSI package (I'm talking about two different MSI packages - one that i'd like to create and the other one which have been already deployed to client machines).
So i created a MSI package which is using VBS script to uninstall previously deployed MSI package. While i run the package manually the process works just fine but as soon as i try to assign this MSI package to computers over GPO the package does not work.

I also tried create another MSI where i tried to use "custom action" with "Install or repair a MSI". The "Custom Action wizard" has created InstallExecuteSequence in the Uninstall section with the proper "Product Code" and "REMOVE=ALL" option in the Properties section to be uninstalled but again, running the package locally works just fine. while i try to run the same package via GPO it doesn't work. I've double checked the GPO permissions, shares etc and i'm pretty sure it's nothing related to those as other GPO packages works just fine.

Is there any way i could troubleshoot the issue? Or maybe someone has any other ideas how to acomplish this task?
Maciejp
Posts: 3
Joined: Fri Jun 03, 2011 2:31 pm

Re: How to create MSI package which uninstalls other MSI via GPO

I've also enabled logging for MSI. This is what i get while i try to deploy the package over GPO.:

Code: Select all

=== Verbose logging started: 6/6/2011  12:28:11  Build type: SHIP UNICODE 3.01.4001.5512  Calling process: C:\WINDOWS\System32\svchost.exe ===
MSI (c) (14:E0) [12:28:11:687]: User policy value 'DisableRollback' is 0
MSI (c) (14:E0) [12:28:11:687]: Machine policy value 'DisableRollback' is 0
MSI (c) (14:E0) [12:28:11:687]: Executing op: Header(Signature=1397708873,Version=301,Timestamp=1053188651,LangId=1033,Platform=0,ScriptType=3,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=0)
MSI (c) (14:E0) [12:28:11:687]: Executing op: ProductInfo(ProductKey={A0DAAA5C-E2A3-4742-85CA-13BEB8814ED4},ProductName=Fix7,PackageName=Fix7.msi,Language=1033,Version=16777216,Assignment=1,ObsoleteArg=0,,,PackageCode={B4B7832E-F164-441F-B021-2717005E2980},,,InstanceType=0,LUASetting=0,RemoteURTInstalls=0)
MSI (c) (14:E0) [12:28:11:687]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (c) (14:E0) [12:28:11:703]: Executing op: DialogInfo(Type=1,Argument=Fix7)
MSI (c) (14:E0) [12:28:11:703]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,,CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
MSI (c) (14:E0) [12:28:11:703]: Executing op: ActionStart(Name=PublishFeatures,Description=Publishing Product Features,Template=Feature: [1])
MSI (c) (14:E0) [12:28:11:703]: Executing op: FeaturePublish(Feature=MainFeature,,Absent=0,)
MSI (c) (14:E0) [12:28:11:703]: Executing op: ActionStart(Name=PublishProduct,Description=Publishing product information,)
MSI (c) (14:E0) [12:28:11:703]: Executing op: CleanupConfigData()
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\C5AAAD0A3A2E247458AC31EB8B18E44D\Patches 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Executing op: ProductPublish(PackageKey={B4B7832E-F164-441F-B021-2717005E2980})
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:703]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D 3: 2 
MSI (c) (14:E0) [12:28:11:718]: Executing op: UpgradeCodePublish(UpgradeCode={3FD9687C-BEB2-44D5-8C63-2182240438DF})
MSI (c) (14:E0) [12:28:11:718]: Executing op: SourceListPublish(,,DiskPromptTemplate=[1],,NumberOfDisks=0)
MSI (c) (14:E0) [12:28:11:718]: Note: 1: 1402 2: UNKNOWN\Installer\Products\C5AAAD0A3A2E247458AC31EB8B18E44D\SourceList 3: 2 
MSI (c) (14:E0) [12:28:11:718]: Executing op: ProductPublishClient(,,)
MSI (c) (14:E0) [12:28:11:718]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=0)
MSI (c) (14:E0) [12:28:11:718]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (c) (14:E0) [12:28:11:718]: DoAdvertiseScript is returning: 0
=== Verbose logging stopped: 6/6/2011  12:28:11 ===
Any ideas or suggestions would be appriciated.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create MSI package which uninstalls other MSI via GPO

Hello,
If yes then this is not an option for me as i need to uninstall certain MSi package from approx. 120 computers and not from all of them.
Unfortunately this operation is not possible through GPO. In this case the only way would be:
  • uninstall for all users
  • create a new group policy that applies only for the 120 users
  • apply the policy
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”