User Guide
474
OLE Automation Function Reference
SetMediaOption
Changes media options through automation. Media options cover the type of output file
that is created, such as single-file .EXE or an .MSI with the file bits uncompressed
outside of the .MSI.
Valid media options:
The following are only valid for single-file .EXE builds:
VBScript Example (lines are numbered for clarity):
1. ' creates a single file .EXE build
2. installer.SetMediaOption "EXE Build", "1"
SetProperty
Used to set a property to a given value. Property names in Windows Installer are case-
sensitive.
Function Prototype BOOL SetFileSelfRegister(BSTR szFileKey, BOOL bRegister)
Parameters szFileKey: key of file row, returned by AddFile and
AddFileEx
bRegister: TRUE to add SelfReg row, FALSE to delete it
Return Value Nonzero if successful. Failure occurs if file key not found.
Function Prototype BOOL SetMediaOption(BSTR szOption, BSTR szValue)
Parameters szOption: media option to set (see valid types below)
szValue: value to which to set the option
PathType 0 for normal
1 for UNC paths
2 for relative paths
File Location 1 for files outside the installation
EXE Build 1 for create single-file .EXE
2 for create executable with .MSI outside of the .EXE
Filename Type 0 for long file names
1 for short file names
2 for .CAB files
Setup Password Password
Preinstall Suppress ORed values of:
1 for Windows 9x runtime
2 for Windows NT runtime
Remove Previous Remove previous version of product when installing