Recommended Free Tools
To inspect or automate a Windows Installer package from a standalone VBScript or JScript, use Windows Script Host (WSH) to create the COM automation object with the ProgID WindowsInstaller.Installer. That workflow is different from a script custom action: the installer runs such actions itself, without WSH, so the WScript object is unavailable. For package customization, first consider public properties or a transform; use script where those mechanisms do not meet the requirement.
Choose the right scripting context
“Windows Installer scripting” can mean two different things. One is an external WSH script that automates Windows Installer through COM. The other is a VBScript or JScript custom action embedded in, or installed for, an MSI package and invoked during installation. The host, available objects, timing, and security constraints differ.
| Workflow | Who runs the script | Windows Script Host objects | Typical use |
|---|---|---|---|
| External WSH automation | WScript.exe or CScript.exe |
WSH provides its scripting host object model; the script can create the Installer COM object. | Inspect products or databases, run administrative automation, or perform package-related tasks outside an installation. |
| Installer script custom action | Windows Installer during package processing | WScript is unavailable. Creating some other WSH model objects may be possible with CreateObject, subject to action type and security restrictions. |
Perform a package-specific operation during installation when standard actions and package configuration mechanisms are insufficient. |
Microsoft states that “The installer runs script custom actions directly and does not use the Windows Script Host.” See its Windows Installer Scripts reference. Do not copy an external WSH script into a custom action assuming that objects such as WScript.Echo or WScript.Arguments will work.
Use the Installer COM automation object from WSH
The automation entry point is an Installer object created with the ProgID WindowsInstaller.Installer. Microsoft describes it as loading automation support and exposing methods and top-level objects. See the Installer object reference and About the Automation Interface.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
WSH supplies two hosts: CScript.exe for command-line execution and WScript.exe for a desktop script host. In VBScript, create a COM object with CreateObject; JScript can use ActiveXObject or WScript.CreateObject. The host choice does not change the Installer ProgID, but it does affect how the script is launched and interacts with the user. Microsoft documents COM use in WSH in Using COM Objects in Windows Script Host.
Minimal VBScript entry point
Set installer = CreateObject("WindowsInstaller.Installer")
This creates the automation object; it is not, by itself, a complete package operation. The next step depends on the task: for example, use a documented automation member to access a product or database, then handle errors and any required inputs explicitly. Launch a saved VBScript with CScript.exe for command-line use or WScript.exe for the desktop host.
What external automation can do
Microsoft’s Windows SDK scripting examples illustrate a range of automation tasks. The examples are reference material, not supported tools or a guarantee that a particular script is appropriate for a current deployment.
WiLstPrd.vbslists products, properties, features, and components.WiImport.vbsandWiExport.vbsimport and export files.WiStream.vbsmanages binary streams.WiGenXfm.vbsandWiUseXfm.vbsgenerate and apply a transform.WiRunSQL.vbsexecutes SQL statements against Installer databases.
The examples require Windows Script Host. Microsoft explicitly says the samples are unsupported and are provided only as potentially useful reference material. See Windows Installer Scripting Examples for the sample descriptions.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsRank #3
Prefer package configuration mechanisms when they fit
Not every customization needs a script. Windows Installer best-practice guidance recommends public properties and customization transforms for configurable package values. A transform can apply package changes without adding custom script logic; Microsoft refers to Msitran.exe for creating customization transforms. Check the package’s design and the relevant Installer guidance before editing or redistributing it.
Repackaging deserves particular care: a tool that treats Installer configuration data as ordinary files or registry state can misunderstand the package’s own configuration. Use documented package mechanisms where suitable, and reserve custom actions for requirements they genuinely address. Microsoft notes that standard actions are sufficient in most cases; custom actions are intended for specific needs, such as calling functions or deferring work. See Windows Installer Best Practices and Custom Actions.
Rank #4
- Used Book in Good Condition
When a script custom action is necessary
A custom action runs as part of package processing, so its timing and execution context are part of the installation design—not merely a different way to launch a standalone script. Choose the action type and scheduling based on the operation, its relationship to installer transactions, and the privileges and security constraints involved. Consult the custom-action reference for the supported types and sequencing behavior rather than relying on an external script’s assumptions.
Windows Installer documents script custom actions in VBScript and JScript. A 64-bit script custom action must be marked as a 64-bit custom action. Test the package and action in the target environment: legacy examples and references do not establish behavior or support for every current Windows deployment configuration.
Best Value
A practical decision path
- Define the job. If you need to inspect products, query or modify a database, or automate work outside an installation, begin with external WSH automation and the Installer COM object.
- Check package-native options. If the change is a configurable value, determine whether a public property or customization transform meets the requirement.
- Use a custom action only for an installation-time need. Confirm that standard actions and package configuration cannot do the job, then select an action type appropriate to the required timing and execution conditions.
- Match code to its host. External scripts can use WSH; installer-hosted script actions cannot use the
WScriptobject. Review any object creation and security assumptions for the action type. - Validate architecture and environment. Mark a 64-bit script custom action accordingly and test on the Windows versions, package architecture, and deployment conditions that matter to your organization.
Documentation scope and support
The Microsoft Learn pages on scripts, scripting examples, the automation-interface overview, and custom actions were marked updated January 7, 2021. They document the interfaces and workflows described above, but should not be read as a blanket compatibility guarantee for every present-day Windows deployment. The Installer object reference also has page-specific operating-system requirements; verify those requirements against the intended environment. No performance or adoption statistic is established by these technical references.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




