Archive for January, 2007

25
Jan

MSI 4.0, the latest version of windows installer service was released with Windows Vista recently. Most of the enhancements in msi 4.0 are in relation to features found in windows vista or Longhorn, e.g. the integration with Restart Manager, ability to communicate with UAC to ensure proper installation on Vista and Longhorn.

In addition to above, Microsoft has also introduced some new properties in msi 4.0 that facilitate setup authors during installation time. You can now set the MsiLogging property via the property table to automatically log the installation. The log file by default gets created in the temp directory on the system. You can change this by setting the MsiLogFileLocation property. A complete list of enhancements can be found on MSDN at : What’s New in Windows Installer 4.0.

Since the enhancements in MSI 4.0 are tied with new features found in Windows Vista and Longhorn, Microsoft is not releasing the redistributables to install msi 4.0 engine alone. Currently the windows installer 4.0 engine is only distributed with Windows Vista and Longhorn.

 

Category : MSI Engine | Blog
17
Jan

Microsoft has introduced a new security model called the UAC in Windows Vista. The UAC forces all users including administrators to run Windows Vista in a lock down environment. The UAC a.k.a User Access Control, locks the machine down and prompts the user to elevate privileges when a package is run.

Ideally the UI Sequence of the package is run in a locked down environment, however UAC will display a Shield icon dialog before running the Execute Sequence to ensure that the package has enough privileges to make modifications on the system. Windows Vista checks the Signature on a package when you run it. If the Signature is valid, it provides the appropriate UAC Prompt. If a package is not signed, the user gets a prompt that says the package is harmful.

MSI 4.0 Enhancements for Windows Vista

  1. Credential Free Patching – a.k.a Sticky ElevationWhile the install and uninstall require elevation of privileges for a per-machine installation, you can design the patch or upgrade to suppress the UAC prompt by performing a sticky elevation. In order to so, you will have to sign the msi package and its patch with the same certificate. The MSIPatchCertificate table in the msi package should be authored with the same certificate as the MSIPatchCertificate table in the patch or upgrade for this to work.
  2. Packages can be marked as not requiring elevated privileges. You can do this to per-user installs that do not need access to restricted components of the Windows OS.
  3. You can add “Shield” icon to your msi package to indicate that it requires elevated privileges.
  4. Elevation prompt is not displayed during a silent installation or upgrade.

Things to Keep in Mind when Creating packages for Windows Vista

Following are some of the things to keep in mind when creating msi packages for Windows Vista deployment.

  • AdminUser Property
    1. AdminUser property commonly used to check for admin rights will not work in UAC. Microsoft has decided to set this to TRUE by default for Application Compatability reasons.
    2. Use MSIUSEREALADMINDETECTION property instead
  • Custom Actions
    1. Custom Actions in the UI Sequence will run with standard user privileges
    2. For Custom actions requiring admin rights, mark custom action as Deferred – No Impersonate
  • ALLUSERS Property
    1. Set ALLUSERS to 1. Do not give the option to change it.
    2. Not setting ALLUSERS will make the package unmanaged and will disable a lot of UAC features
    3. Will not be able to perform Sticky Elevation if the msi package does not have the ALLUSERS property set in it
    4. Set the ALLUSERS property to 1 in the upgrades and patches
  • Creating a true Per User package
    1. Microsoft’s Click-Once Technology will enable you to create a true managed or per-user package.
    2. If you can not use Click-Once, then you can make your package not require elevated rights. Make the following required changes in your package to make to support a per-user install:
        1. Set the WordCountSummary property to Bit 3
        2. Do not set ALLUSERS (set it to 0 or nothing)
        3. Make sure the package only writes to user folders and HKCU registry keys.
        4. Do not add Custom Actions that require admin privileges to run on the machine
  • BootStrapper
    1. BootStrappers are detected by the Installer Detection (ID) and will receive a UAC Prompt
    2. Use a manifest file to ensure that the bootstrapper requests appropriate level from UAC
    3. Ideally MSI should handle elevation, unless you must have the bootstrapper elevate, in which case you will need the manifest file
    4. If the bootstrapper launches multiple MSIs, each will prompt the UAC dialog. To avoid this, advertise the package with /jm or Advertisement APIs with system rights, and then execute each package as a regular user

Note: The above information has been gathered from Microsoft’s Website and Webinars on Windows Vista and MSI 4.0.

Category : Vista Packaging | Blog