Monday, September 14, 2009

How to specify MSI properties with Group Policy

Often you will find that vendors that have created Windows Installer files for their application only tell you how to change their settings from the command line. A typical example could be like this:

msiexec /i mypackage.msi ALLUSERS=1 LICENSE=a-key-here

This is very good as it makes it easy to automate installation. But what should I do if I want to automate using Group Policy???

I have mentioned Orca several times as a good tool to modify existing MSI installs.

What you have to do is to open the MSI file in Orca and create a new transform. Go then into the Property table. If you find the property you want to add, change the value there. If not, add a new row and enter your information. Your changes are recorded with green bars.

When done, save your transform. This transform can then be added to group policy.

Labels:

Thursday, July 23, 2009

List all installed product codes

If you ever need to retrieve the product code for installed Windows Installer products you can use the code below to retrieve it. Copy the code into a .vbs file and run it. It will produce an output file components.txt with all installed codes.

Option Explicit
Public installer, prod, a, fso

Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile("components.txt", True)

' Connect to Windows Installer object
Set installer = CreateObject("WindowsInstaller.Installer")
a.writeline ("Products")
For Each prod In installer.products
a.writeline (prod & " " & installer.productinfo (prod,"InstalledProductName") & " " & installer.productinfo (prod,
"VersionString") )
Next

Source of code was found in Acresso forums. The source file can also be downloaded from here.

Labels:

Tuesday, June 09, 2009

How to locate the cause of error code 1603 in a verbose MSI log file

Aaron Stebner's WebLog : How to locate the cause of error code 1603 in a verbose MSI log file: "How to locate the cause of error code 1603 in a verbose MSI log file"

Labels:

Monday, May 25, 2009

Where to download merge modules for visual basic 6 SP6

If you follow the link above you can download all merge modules that ships with Visual Basic 6.0 and Visual C++ 6.0 - updated to SP6.

Labels:

Where to find merge modules

Merge modules are nice to have when you create packages using common components. A good source for such merge modules can be found here.

Labels:

How to install to other folders than default folder

From time to time you want to install your Advanced Installer MSI file to another folder than the default folder as specified in the project.

Except from installing the MSI file by hand and specifying where to install the application there are two other ways to change the install dir.

  1. Install the application, specifying the target directory as the public property APPDIR. APPDIR is not listed as a public property, so you need to type it by hand.
  2. Create a transform file using Orca, a tool from Microsoft. (An example on how to do so can be found here.) As the property is not listed you will need to create a new transform, go into the PROPERTIES table and then create a new property called APPDIR.

Good luck!

Labels: ,

Thursday, March 12, 2009

Extract files from an MSI file

If you ever need to extract files from within MSI files, or add standalone cab files into an existing MSI file - here is the tool to do so.

Msidb.exe (Windows): "Msidb.exe uses MsiDatabaseImport and MsiDatabaseExport to import and export database tables and streams."

Labels:

Friday, February 06, 2009

Software deployment tools

In an enterprise there are many ways to deploy new software. With Windows 2000 server and client Microsoft made a new standard with the Windows Installer and Group Policy. Windows Installer (aka. Microsoft Installer) is a defined way to install applications on a computer and the group policy can be used to distribute applications to several computers at the same time.

Windows Installer

With Windows Installer you get files with several extensions. The most important extensions are;

Extension Use
.msi This is an application ready for installation on a target computer.
.mst This is a transform file. A transform basically allows you to change the behavior of an MSI file without actually changing the MSI file.
.msp Patch file - in case of big installations you can distribute patches instead of new installations.
.msm Merge module. A vendor can distribute common components in a merge module so other vendors can distribute the common component as part of their own installation - and still maintain integrity for the common component. Examples are the Visual Basic runtime.

Windows Installer came with Windows 2000 and was ported back to Windows NT 4.0, Windows 95, Windows 98 and Windows ME.

There are many tools to create MSI files. Read more here.

Deployment tools

I do not intend to talk much about the different tools here. Just list them up.

Tool Comment
Specops Deploy Group policy distribution on steroids. A simple tool and extends your group policy deployment with reporting and control. Not to expensive from what I can see.
Novell ZENworks We "grown up" people remember Novell as the creators of Netware - for its time the best network operating system. They also created some other good software, like ZENWorks that was the best deployment tool that existed for Netware environments. Now that Netware is dead they have removed all dependencies to Netware and now can run within a Windows only environment. Can create proprietary distributions or distribute/create MSI files.
System Center Configuration Manager (SCCM) Microsoft also have a tool for software deployment. This tool is loaded with features, not cheap and hard to deploy. But it will work for you when you have it up and running.
Group Policy  

Labels: ,

Thursday, February 05, 2009

MSI packaging software

Do you want to create MSI files for Windows Installer?

Here is a list of several tools to actually create MSI files. Please note that it is not easy to create good MSI packages.

Product Comment
AdvancedInstaller
Advanced Installer is the tool of my preference. It is cheap (compared to the options), often updated with new features and easy to use.
InstallShield InstallShield is the name you probably have seen the most (except from Nullsoft Installer) when you install applications. InstallShield started out long before MSI came around with their own installation software. They adapted to MSI and now can create native MSI installations.
Wise Installation Express For a long time ago Wise was a company of their own. Then they got eaten by Altiris before ending up as a Symantec product. A good editor. My favorite before I found AdvancedInstaller.

Labels:

Wednesday, January 23, 2008

How to set file permissions on an MSI package

Do you have MSI based applications where the user needs write permissions on the application directory. This is common in terminal services environments where the packaged application is not designed to work with terminal services.

Using ORCA you can either create a transform (MST file) or modify the MSI application.

To do this you need to modify a MSI table called LockPermissions. When you set permissions using this all inherited rights are removed and only SYSTEM + your rights are set.

To give all users full control on the application directory you have to fill out a row in the LockPermissions table as shown below.

LockObject Type APPDIR to set the application directory.
Table For directories type CreateFolder.
Domain Leave blank for current computer. If you want to match a domain group or user type in the domain name.
User Type Users to give all users full permissions. You can type in other user names or group names.
Permission Type 268435456 for full control. If you want more granular control use either AdvancedInstaller to calculate them or read the MSDN documentation.

ORCA screenshot

External links:

Labels: