Windows Installer Editor Reference
432
Macro Editor
The Macro Editor doesn’t let you save a .WBS file under a different name. To rename a
macro file, change the file name in Windows Explorer.
See also:
Creating, Editing, and Running a Macro
on page 432
About the Macro Editor Window
on page 434
Creating, Editing, and Running a Macro
The Macro Editor is similar to the Microsoft Visual Basic Editor. For information on Visual
Basic, visit
msdn.microsoft.com/vbasic/
.
To create a macro
1. Select Edit menu > Macros.
The Macro dialog box appears.
2. Complete the dialog box:
Macro Is Run
Select:
Manually to create a manually-run macro.
On Windows Installer Editor event to create a macro that runs on an
event.
Event Name
For a manually-run macro, enter a name for the new macro. Do not include
spaces in the name. For an event macro, select an event.
Pathname
When you create a new macro, it is added to the macro file displayed. To add
the new macro to a different .WBS file, browse to the file’s location. To create a
new .WBS file, click New and specify the file.
3. Click Create.
The Macro Editor window appears.
See
About the Macro Editor Window
on page 434.
4. In the script box, write the macro.
5. In the Macro Editor, select File menu > Save.
6. To create another macro, select Script menu > Add New Macro, enter a name for the
macro on the dialog box that appears, write the macro, and save it.
7. When finished, exit the Macro Editor.
To edit a macro
1. Select Edit menu > Macros.
The Macro dialog box appears.
2. From Macro Is Run, select:
Manually to edit a manually-run macro.
On Windows Installer Editor event to edit a macro that runs on an event.