Powershell Uninstall Msiexecanimationsupport

  1. Powershell Uninstall Msiexec Animation Support Usb
  2. Powershell Uninstall Msiexec Animation Support Windows 10
  3. Powershell Uninstall Msiexec Animation Support Command
  4. Powershell Uninstall Msiexec Animation Support Downloads

Do you want to uninstall EXE applications with PowerShell App Deployment Toolkit (PSADT)?
Then you should read this article, as i will learn you how to do exactly that.

This should work if was an msi installer (powershell 5.1). Powershell 7 does not support msi or programs providers. Get-package.softwarename. uninstall-package Or with the programs provider, you could probably see the uninstallstring, but have to add more for a silent uninstall, like '/S'. Scroll down and locate the Windows PowerShell entry. Uncheck the PowerShell feature. Save and apply your changes. Restart your Windows 10 computer.

If you are a frequent user of PowerShell App Deployment Toolkit (PSADT), you might know
the command Remove-MSIApplications , which can be used to remove MSI applications by searching the registry for their display name or GUID. However this will not work for EXE installed applications.

So how do i create a EXE uninstaller with PSADT?

I’m sure that it can be done in a lot of ways, but here i will show you two methods that i use myself.

The first one is very simple, and requires that you know where the uninstaller is, and that it is at the same location every time.

The second one, will search for the application in the registry and use the uninstall string as path to the uninstaller.

In this article i will use a real world example, the “Final Media Player”.

Simple uninstall

With the simple uninstall you simply use the Execute-Process command, the command for my use is the following:

As you can see this will require the uninstall file to be at the exact same location, and same filename on every computer.

I like to make my scripts dynamic, so lets take a look at the advanced method.

Advanced Uninstall

With the advanced uninstall, we grap a the application(s) using the Get-InstalledApplication command.
I add this to a list, because it can return multiple results, if it finds more then one match. So i want to make my script support that.
After the list, we use a ForEach to loop it through. Then we use the UninstallString from the Get-InstalledApplication to set our path for the uninstaller EXE.
As the last, i know my UninstallString includes a pair of in the name. PSADT do not like that, so i have added a -replace command, to remove it.

The final uninstall script looks like below.
Remember that you, would add the below script to the # <Perform Uninstallation tasks here> part of your Deploy-Application.ps1 script

If you have any questions or feedback, then please leave a comment!
(For code comments, please use www.pastebin.com)

Download PSADT: http://psappdeploytoolkit.com/

Powershell Uninstall Msiexecanimationsupport

When you're deploying an application, you'll usually want to start by removing any previous installations of it. With MSI files, this is often less trivial than at first it appears.

Typically you have two options if you're going to script this on the command line: either you uninstall the MSI by ProductCode, or you uninstall it by pointing to the previous MSI file and running msiexec /x. So far, all well and good. You will however run into problems in the following situations:

- The previous media is no longer available at the expected location

- The ProductCode has changed

- Because of changes to your UpgradeCode, you now have multiple copies of your MSI installed

- You made a mistake with an Instance Transform

Most of these issues can be resolved by manually uninstalling the MSI in question from 'Add/Remove Programs.' To do it programmatically is a bit harder.

Let's suppose you have a product called 'Dunedin Software Distribution Service', and you want to remove any existing instances prior to redeploying. There's a very easy way to do this, in which you search for installed products by *name* rather than by ProductCode. The following line will achieve what you want:

Get-WmiObject -Class Win32_Product -Filter '(Caption = 'Dunedin Software Distribution Service' )' |% { $_.Uninstall() }

But that's not the whole story, and this is the reason I'm writing today. This code runs like a dog, and, when run locally, appears to thrash the machine on which it's running. The less prescriptive the caption (and therefore the more matching products it locates), the slower it runs. Search for installed MSIs containing the letter 'a', and you could be waiting minutes for it to complete on a fairly well-specified Windows Server. To be clear, I'm not talking about the time it takes to uninstall the application(s) in question; I'm simply talking about the performance of the product search itself.

Here's something I've come up with that performs a lot better. It relies upon the fact every installed MSI gets a Registry entry with an installation string. That's how you can Remove or Repair it in the ARP. So all we need to do is make sure we search both the 64-bit as well as the 32-bit hive, and we should be able to pull out command lines we can then customise to uninstall any MSI that matches our filter.

# Uninstall product matching a specified filter

$filterSpec = '<Partial or complete DisplayName for your MSI>'

$hives = @('HKLM:SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall', 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionUninstall')

$hives |% {

Write-Host 'Checking for products in hive: $_'

$keys = gci $_ -Recurse

$subkeys = $keys |% {

$displayName = [string]$_.GetValue('DisplayName')

$uninstallString = ([string]$_.GetValue('UninstallString')).ToLower().Replace('/i', ').Replace('msiexec.exe', ')

if ($displayName.StartsWith($filterSpec)) {

Write-Host 'Uninstalling product: $displayName'

Write-Host '$uninstallString'

start-process 'msiexec.exe' -arg '/X $uninstallString /qn' -Wait

}

}

}

I've also put this script into an Octopus Deploy Step template, the JSON for which you can import below. Just copy and paste, and I hope you find it useful.

{

'Id': 'ActionTemplates-229',

'Name': 'Uninstall MSI',

'Description': null,

'ActionType': 'Octopus.Script',

Powershell Uninstall Msiexec Animation Support Usb

'Version': 3,

'Properties': {

'Octopus.Action.Script.ScriptBody': 'rn# Uninstall product matching a specified filterrn$filterSpec = $OctopusParameters['Filter']rn$hives = @('HKLM:SOFTWAREWow6432NodeMicrosoft

WindowsCurrentVersionUninstall', 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionUninstall')rnrn$hives |% { rn Write-Host 'Checking for products in hive: $_'rn $keys = gci

$_ -Recursern $subkeys = $keys |% { rn $displayName = [string]$_.GetValue('DisplayName')rn $uninstallString = ([string]$_.GetValue('UninstallString')).ToLower().Replace('/i',

').Replace('msiexec.exe', ')rn if ($displayName.StartsWith($Filter)) { rn Write-Host 'Uninstalling product: $displayName'rn Write-Host '$uninstallString'rn

start-process 'msiexec.exe' -arg '/X $uninstallString /qn' -Waitrn }rn }rn}'

},

Powershell Uninstall Msiexec Animation Support Windows 10

'SensitiveProperties': {},

'Parameters': [

{

'Name': 'Filter',

'Label': 'Filter product',

'HelpText': 'Specify either the full Display Name for the product you want to uninstall, or the first few letters if you want to match multiple products. The script will perform a

string.StartsWith() comparison, and uninstall any products matching the specified filter',

'DefaultValue': 'IE',

'DisplaySettings': {

'Octopus.ControlType': 'SingleLineText'

}

}

],

'LastModifiedOn': '2014-12-22T16:30:45.503+00:00',

'LastModifiedBy': 'AHildyard@ie.com',

Powershell

'$Meta': {

'ExportedAt': '2014-12-22T16:47:49.298Z',

'OctopusVersion': '2.5.12.666',

'Type': 'ActionTemplate'

}

}

Powershell Uninstall Msiexec Animation Support Command

Posted on Tuesday, January 13, 2015 12:51 AM | Back to top

Powershell Uninstall Msiexec Animation Support Downloads