Sometimes after installing a setup.exe with limited command line switches, we may want to clean up the Windows start menu. Usually as part of our Application Packaging best practises we remove ‘Uninstall’ shortcuts, ‘Update’ shortcuts, and shortcuts to readme’s and … Continue reading →
Description: This post describes how to access a Windows Installer property in a Deferred Custom Action. Deferred, commit, and rollback custom actions can only access a limited number of built-in Windows Installer properties – CustomActionData, ProductCode, and UserSID. In brief … Continue reading →
Description: This post shows how to use VBScript to amend the the Hosts/Services or any other text file. It contains two scripts to add/remove lines of text. This example adds to the C:\Windows\System32\drivers\etc\Services file. Source: N/A Script: Add to Services file … Continue reading →
Description: The Filesystem Object cannot create a nested folder structure in a single invocation of the CreateFolder method. For example, if we tried executing the following code it would return a ‘Path Not Found’ error unless c:\alkanesolutions\ already exists: objFSO.CreateFolder “c:\alkanesolutions\test\” The function below resolves … Continue reading →
Somebody over at ITNinja recently asked how they could run an executable stored in the binary table, from a VBScript Custom Action. Here’s an example I knocked up which describes how to extract an EXE from the binary table and … Continue reading →
Description: Sometimes in our Custom Actions we need to pause the script execution, for example when we’re manipulating processes. Since we can’t use Wscript.Sleep from a Custom Action we need another way of pausing the execution of a script. Here … Continue reading →
Description: Useful when we want to terminate processes during uninstall. Sometimes when processes are still running during uninstall it may cause the uninstall to fail or not remove all files. This script is an example of how to kill one … Continue reading →
Description: Useful when we want to delete folders which have been left behind after uninstall, but we first need to check that the folder is actually empty!! An example may be a folder named as the vendor (E.g, ‘Adobe’), where … Continue reading →
Description: This post describes how to delete a file from multiple user profiles (normal.dot in this example). Also has the ability to exclude certain profile folders. Could be easily combined with this script to delete folders/subdolfers and files from each profile: … Continue reading →
A script to delete a registry key and its subkeys via a Custom Action. Useful for when we want to delete junk registry which has been left behind post uninstall. Source: technet.microsoft.com Script: Option Explicit Dim intHive Dim strComputer Dim … Continue reading →