BlueSkies.online
Menu
  • Home
  • Application Packaging
  • Tutorials
      • List of Tutorials
  • Scripts
      • VBScript
      • PowerShell
  • Wallpapers
      • Abstract
      • Animals
      • Astronomy
      • Computing
      • Gaming
      • Industrial
      • Macabre
      • Microscopic
      • Music
      • Nature
      • Popular Culture
      • Science Fiction
      • Vehicles
  • Profile

Latest Article

Delete Folder on Uninstall of MSI

Problem: Application remnants remain after uninstall.

After uninstalling a particular MSI some remnants remain of the application files in the ProgramFiles folder.

Reason: Application is updated in situe.

The application is a standard client/server setup with application updates being applied to the server which then disseminate to all clients which means files are present on the client that weren't put there by the MSI itself. Natively an MSI will only remove files that were installed by itself...............or if they've been added to the removefiles table, however we have no idea of the name of the files that will need to be removed so we need a catch all solution.

Fix: Script the removal of the folder during uninstall.

I decided on a vbscript in a custom action to the remove the folder and all it's contents, triggered when the application is uninstalled.


Create a VBScript Custom Action that is stored within the CA and complete as per below, you can find the VBScript here.

*Action*  
Return Processing
Synchronous (Check exit code)
In-Script Execution Deferred Execution in System Context
Key Installer\Products\<GUID>
Name Transforms
Component ISRegistryValue
*Sequence* - Install Exec After RemoveFolders
Install Exec Condition
REMOVE="ALL"
Details
Written by Blue Skies
Category: Application Packaging
Published: 15 August 2016
  • Packaging
  • MSI
  • InstallShield
  • CustomAction

Page 3 of 10

  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • ...
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
  • End

Popular Articles

  • Visual C++ 2012 for Enterprise Deployment
  • Remove Registry VALUE on Install in Basic MSI
  • Lync 2013 Basic Deployment
  • Delete Folder on Uninstall of MSI
  • Variable VBScript Shortcut Launcher

Popular Tags

Windows script.vbs Packaging script.ps1 Tutorial Debian Linux MSI InstallShield Microsoft

© 2025 BlueSkies.online

  • Facebook
  • Twitter
  • Google
  • Youtube
  • Linkedin
  • RSS Feed
Go Top