Windows Installer Editor Reference
431
Chapter 18
Macro Editor
This chapter includes the following topics:
z
About the Macro Editor
on page 431
z
About Macro Files
on page 431
z
About the Macro Editor Window
on page 434
About the Macro Editor
The Macro Editor provides access to Wise Automation, which programmatically controls
Windows Installer Editor. Use Wise Automation to perform tasks that occur regularly and
require multiple steps in the user interface. Example: You can write Wise Automation in
the Macro Editor to automate daily builds. To view the Wise Automation Reference, open
WiseAutomation.chm, which is in the Technical Documentation subdirectory of this
product’s installation directory.
Warning
You should be familiar with macros and comfortable with Visual Basic to use this feature.
For information on Visual Basic, visit
msdn.microsoft.com/vbasic/
.
Note
You can use Wise Automation with Visual Studio or other scripting environments.
About Macro Files
Use the Macro Editor to create and edit macro files. The default macro file in the
Templates folder (Macros.wbs) contains sample macros. These samples are commented
out, which means that you can view the script in the Macro Editor but you can’t run the
macros unless you uncomment the script. You can add macros to Macros.wbs, and edit
and delete its macros.
Each new file you start in Windows Installer Editor has Macros.wbs attached. When you
open the Macro dialog box, you can attach a different macro file.
You can create the following types of macros:
z
Event macros that run when you fire the corresponding event.
z
Macros that you run manually.
If your .WBS files include event macros, you might encounter a situation in which you
want to create a new project that doesn’t run these macros. Example: You might have a
macro that runs on the New event and adds a specific set of files to a specific set of
directories every time you start a new project. To start a new project that does not
include these files and directories, you can create a new .WBS file that doesn’t contain
any macros. Then, attach this macro file to your project.