Bluebeam Revu Uninstall Package
I have the following package:
<AdminArsenal.Export Code="PDQDeploy" Name="PDQ Deploy" Version="19.3.440.0" MinimumVersion="15.0">
<Package>
<CurrentLibraryPackageVersionId value="null"/>
<PackageDefinition name="Definition">
<Conditions type="list">
<PackageStepCondition>
<Architecture>Both</Architecture>
<Version>All</Version>
<TypeName>OperatingSystem</TypeName>
</PackageStepCondition>
<PackageStepCondition>
<IsUserLoggedOn>AlwaysRun</IsUserLoggedOn>
<TypeName>LoggedOnUser</TypeName>
</PackageStepCondition>
<PackageStepCondition>
<ConditionMode>None</ConditionMode>
<InventoryCollectionId value="null"/>
<InventoryCollectionName/>
<TypeName>Collection</TypeName>
</PackageStepCondition>
</Conditions>
<CopyMode>Pull</CopyMode>
<DelayedApprovalTimeSpan>7.00:00:00</DelayedApprovalTimeSpan>
<DownloadApprovalMode>Manual</DownloadApprovalMode>
<InventoryScanProfileId value="null"/>
<IsDownloadApprovalModeInherited value="true"/>
<ScanAfterDeployment value="null"/>
<Steps type="list">
<PowerShellStep>
<CustomCommandLine/>
<Files/>
<Script>ForEach ( $Architecture in "SOFTWARE", "SOFTWARE\Wow6432Node" ) { $UninstallKeys = "HKLM:\$Architecture\Microsoft\Windows\CurrentVersion\Uninstall" if (Test-path $UninstallKeys) { $GUIDKey = Get-ItemProperty -Path "$UninstallKeys\*" | Where-Object -FilterScript { ($_.DisplayName -like "Bluebeam Revu*") -and ($_.Publisher -like "Bluebeam, Inc.") } $GUIDRealKey = $GUIDKey | select-object PSChildName -ExpandProperty PSChildName If ( $GUIDkey -ne $null ) { Get-Process | Where-Object { @( "Revu", "Revu32" ) -contains $_.Name } | Stop-Process -Force -Verbose Start-Sleep 5 $GuidRealKey | ForEach-Object { $GUID = $_ Write-Output "Uninstalling: $(( Get-ItemProperty "$UninstallKeys\$GUID" ).DisplayName) " Start-Process -Wait -FilePath "MsiExec.exe" -ArgumentList "/X$GUID /qn /norestart" } } Else { Write-Output "No Bluebeam Revu installation detected in: $UninstallKeys" } } }</Script>
<SuccessCodes>0</SuccessCodes>
<RunAs value="null"/>
<Conditions type="list">
<PackageStepCondition>
<Architecture>Both</Architecture>
<Version>All</Version>
<TypeName>OperatingSystem</TypeName>
</PackageStepCondition>
<PackageStepCondition>
<IsUserLoggedOn>AlwaysRun</IsUserLoggedOn>
<TypeName>LoggedOnUser</TypeName>
</PackageStepCondition>
<PackageStepCondition>
<ConditionMode>None</ConditionMode>
<InventoryCollectionId value="null"/>
<InventoryCollectionName/>
<TypeName>Collection</TypeName>
</PackageStepCondition>
</Conditions>
<ErrorMode>StopDeploymentFail</ErrorMode>
<Title>Uninstall Older BB_Revu Versions</Title>
<TypeName>PowerShell</TypeName>
<IsEnabled value="true"/>
<IsPostStep value="false"/>
<IsPreStep value="false"/>
</PowerShellStep>
</Steps>
<Timeout value="60"/>
<UseCustomTimeout value="false"/>
<RunAs value="null"/>
</PackageDefinition>
<Description/>
<NewLibraryPackageVersionId value="null"/>
<OriginalId value="null"/>
<Version/>
<IsAutoDownload value="false"/>
<FolderId value="1"/>
<LibraryPackageVersionId value="null"/>
<Name>Uninstall Old Bluebeam</Name>
<Path>Packages\Uninstall Old Bluebeam</Path>
<PackageDisplaySettings name="DisplaySettings">
<DisplayType>Normal</DisplayType>
<IconKey>Icon-Package</IconKey>
<SortOrder value="7"/>
</PackageDisplaySettings>
</Package>
</AdminArsenal.Export>
It has a moderate success rate in working. I tend to find that it has trouble uninstalling Revu version 16, especially 16.5.2. Is there a best practice that I am missing that will increase the success rate?
0
Comments
It's odd that this works on some versions but not others. I recommend setting up a test machine with version 16.5.2 and get it to uninstall silently from an elevated command prompt running as the deploy user to see what is going on.