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 →
This post describes the process of compressing files into an external .CAB using WiMakCab.vbs. WiMakCab.vbs is part of the Windows SDK, and can be used to compress external files into a .CAB file. We recently used this approach to compress … 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 →
This is a cleaned-up version of a post I made a while ago on ITNinja (http://www.itninja.com/question/guide-to-signing-unsigned-drivers). I’ve also incorporated a few changes for Windows 7 etc (using a later version of the WDK) and thanks goes to Rowan Heuvel over at … Continue reading →
Many packagers wonder how they can create a shortcut to a network location when they dont have access to it during the packaging process. Here’s how: Step 1 Set up a property called WkDir (if you call it something else, … Continue reading →
The problem was that we needed to remove part (i.e., not all of it for obvious reasons!!) of the PATH environment variable during installation (long story, but this path was junk left behind from another install). As an example, we only … 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 →