List of reversible commands

The following commands, when a PPB package that contains one or more of the commands is uninstalled, are reversed. That is, the original action is undone as if it had never been performed. Therefore, you do not need to include the appropriate "reverse" command after the $BeginUninstallScript label, because the command is automatically executed when the installation part is processed:

Note: If you do not want one of the following commands to be inverted when uninstalling a package, perhaps because the files copied by the command during installation are still needed after uninstallation, you can prevent this by using the "Prevent uninstallation" button in the "Options" section of the "Start" tab.


Command

Reverse command

Add-PrinterConnection

Remove-PrinterConnection

Connect-SmbShare

Disconnect-SmbShare

Copy-File

Remove-File

Enable-WindowsFeature

Disable-WindowsFeature

Import-RegXml

Deletes the values or keys, if specified

Import-Registry

Deletes the values or keys, if specified

Install-Assembly

Remove-File / Uninstall-GacAssembly

Install-File

Remove-File

Install-FileList

Remove-FileList

Install-TTF

Uninstall-TTF

Install-MsiProduct

Uninstall-MsiProduct

Install-Win32Service

Uninstall-Win32Service

Invoke-PowerShellCode

Invoke-PowerShellCode (if specified on "Uninstall" tab)

New-Directory

Remove-Directory

New-InternetLink

Remove-Link

New-Link

Remove-Link

New-Share

Remove-Share

New-ShellFolder

Remove-ShellFolder

Stop-PdProcess

Processes are also terminated on uninstallation if the "Also execute on uninstallation" option is enabled.

Write-RegistryKey

Deletes the values or keys, if specified