Posted by (0) Comment
Acresso Software has announced the release of their latest version of Windows Setup Authoring tool InstallShield 2009. InstallShield 2009 includes beta support for Windows Installer 4.5 and many of it’s new features are directly related to new features in MSI 4.5 e.g. Managed Code Custom Action support, Installation Chaining, and Installing Multiple Product instances. In addition to above, the product also has support for .Net Framework 3.5 and built-in integration with Visual Studio 2008.
You can get more information about InstallShield 2009 by joining their Marketing & Sales Webinar on InstallShield 2009 at http://mktg.acresso.com/mk/get/WHATSNEWIS2009?mc=www&link_id=topPromo
Posted by (0) Comment
Microsoft has finally released the long awaited version of Windows Installer 4.5 that will support pre-vista Operating systems such as Windows XP and Windows 2003. In addition to features packed in MSI 4.0, MSI 4.5 also includes the following enhancements -
More information on MSI 4.5 can be found below -
Windows Installer 4.5 Blog on MSDN
How to Set/Get a property via a VBScript Custom Action?
You can either use the Session object or simply use the ‘Property’ keyword to set a property via a vbscript custom action:
e.g Session.Property(“ARPNOCOMPONENT”)=”1″
Property(“REINSTALL”)=”ALL”
To get the value of a property, you can use the following e.g.
dim myvar
myvar = Property(“INSTALLDIR”)
MsgBox(myvar)
How to Set ‘INSTALLDIR’ property via a VBScript CA?
You will not be able to set the value of INSTALLDIR by using the ‘Property’ keyword through vbscript as the package uses the directory table to store the value of INSTALLDIR. Thus you will have to use the ‘TargetPath’ method of the ‘Session’ Object to achieve this. Follow the example below to reset the value of INSTALLDIR via your custom action:
dim myvar
myvar = “C:\newpath\newfolder”
Session.TargetPath(“INSTALLDIR”)=myvar
Note: When changing the value of INSTALLDIR in the UI Sequence, be sure to place the above custom action after the CostFinalize Standard Action.
How to Enable Logging inside an msi package?
In msi 3.1 and older, you can create a vbscript custom action to enable logging within the package. You can use the EnableLog Method of the Session object to achieve this. However, do remember that this custom action should be placed in the UI Sequence of the package in order for logging to take place. Thus if the package is run in silent mode, the log file will not be created as the custom action will be skipped. Following is an example that shows you how to achieve this:
Set Installer = CreateObject(“WindowsInstaller.Installer”)
Installer.EnableLog “wearcmpvo”, “C:\temp\setup.log”