PowerShell Deployement toolkit Uninstallation not triggering

Hi,

I’m using Deployment Toolkit for MS Visio installation and uninstallation. However my installation is working fine but not uninstallation.

Below is the code I’m using for uninstallation.

##*===============================================
		##* 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>

        $code64= "{90150000-0053-0000-1000-0000000FF1CE}"

        if( (Test-Path -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$code64) -eq $true)

        {
          
          Start-Process -FilePath "$DirFiles\Visio2013\Setup.exe" -ArgumentList "/Uninstall VisStd /config ""$DirFiles\Visio2013\visstd.ww\config.xml""" -Wait 


        }

Can anyone help me here why above code is not executing the uninstallation.

Try this…

Start-Process -FilePath "$DirFiles\Visio2013\Setup.exe" -ArgumentList "/Uninstall VisStd /config" , "$DirFiles\Visio2013\visstd.ww\config.xml" -Wait 

or this…

Start-Process -FilePath "$DirFiles\Visio2013\Setup.exe" -ArgumentList "/Uninstall VisStd /config `"$DirFiles\Visio2013\visstd.ww\config.xml`"" -Wait 

You could use Office Scrub 2013 (offscrub13.vbs) also to uninstall visio. This will remove all of the artifacts and registry keys. Download the offscrub.vbs script and place into your Visio2013 folder.

Execute-Process -Path “cscript.exe” -Parameters “"$DirFiles\Visio2013\OffScrub13.vbs” VisStd /S /Q /NoCancel" -WindowStyle Hidden