Deployment for Uninstallation software by Guid or Name

Hello,

My target is to remove all software named “NetWorker” for any version (I don’t know all versions previously installed… the software has been stopped 3 years ago!!)
I have copying the AppDeployToolkit to a Tools folder.
Now I am trying to execute locally first for testing purpose of the package the script which will be used.
I have filled up two spots in Deploy-Application.ps1:


##===============================================
##
VARIABLE DECLARATION
##*===============================================

Variables: Application

[string]$appVendor = ‘’
[string]$appName = ‘NetWorker’
##[string]$appVersion = ‘’
##[string]$appArch = ‘’
##[string]$appLang = ‘’
##[string]$appRevision = ‘’
##[string]$appScriptVersion = ‘’
##[string]$appScriptDate = ‘09/24/2015’
##[string]$appScriptAuthor = ‘Duchemin’
##===============================================

##
===============================================
##* UNINSTALLATION
##*===============================================
[string]$installPhase = ‘Uninstallation’

Handle Zero-Config MSI Uninstallations

If ($useDefaultMsi) {
[hashtable]$ExecuteDefaultMSISplat = @{ Action = ‘Uninstall’; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add(‘Transform’, $defaultMstFile) }
Execute-MSI @ExecuteDefaultMSISplat
}

<Perform Uninstallation tasks here>

Remove this version of Networker

Execute-MSI -Action Uninstall -Path ‘3EB2C626C9BC4D118811000972CCA7DF’

Execute-MSI -Action Uninstall -Path ‘2827A1B508153D114831000A9C877BD1’

Execute-MSI -Action Uninstall -Path ‘1D09C7743451200439D99949BD5A9F1E’

Execute-MSI -Action Uninstall -Path ‘3793D30B866E43739CBC6E33311729A4’

Execute-MSI -Action Uninstall -Path ‘1ACDA42675234DA3BFAA96113EFE2507’

Execute-MSI -Action Uninstall -Path ‘474B6C6FDCA64E3A8BEC811F51619E61’

##===============================================
##
POST-UNINSTALLATION
##*===============================================

I have tried with all Guids active but as it was failing I now spot the one I am sure is installed on the test machine…

But I am getting an error on the PATH parameter…
Cannot validate argument on parameter ‘Path’, … value 3EB2C626C9BC4D118811000972CCA7DF" did not return true.

How should be set the path?
Thanks,
Dom

You didn’t include the curly brace around the product GUID. Look at one of the examples for the function and you will see how the GUID should be specified.

Thanks a lot it is the issue

Apparently with this syntax it works:
Execute-MSI -Action Uninstall -Path ‘{3EB2C626-C9BC-4D11-8811-000972CCA7DF}’
Execute-MSI -Action Uninstall -Path ‘{2827A1B5-0815-3D11-4831-000A9C877BD1}’
Execute-MSI -Action Uninstall -Path ‘{1D09C774-3451-2004-39D9-9949BD5A9F1E}’
Execute-MSI -Action Uninstall -Path ‘{3793D30B-866E-4373-9CBC-6E33311729A4}’
Execute-MSI -Action Uninstall -Path ‘{1ACDA426-7523-4DA3-BFAA-96113EFE2507}’
Execute-MSI -Action Uninstall -Path ‘{474B6C6F-DCA6-4E3A-8BEC-811F51619E61}’

let me try more…

Thanks,

Dom,