Archive

Archive for the ‘WiX’ Category

Windows Installer problems blog reference….

One of the immediate blogs you should refe to incase you have any problems with Visual Studio SP Installers etc is Heath Stewart’s Blog: About Windows Installer, the .NET Framework, and Visual Studio.

Categories: Microsoft, Tools, Visual Studio, WiX

How to check if JRE is installed using WIX


<span style="font-size: x-small;"><Property Id="JREINSTALLED">
 <RegistrySearch Key="SOFTWARE\JavaSoft\Java Runtime Environment"  Root="HKLM"
 Type="raw" Id="JREINSTALLED_REGSEARCH" Name="CurrentVersion" />
 </Property>

 <Condition Message="Java Runtime Environment is not installed.">
 (JREINSTALLED)
 </Condition></span>
Categories: WiX

AppSecInc. Community MSI Extensions

Project Description

AppSecInc. Community MSI Extensions is a collection of MSI custom actions and WIX extensions that extend Windows installer, originally developped by Application Security Inc. for a large enterprise product, and open-sourced in late 2009. The project grew incrementally implementing everything that wix didn’t have out of the box. Code is fully unit-tested.

Using AppSecInc. MSI Extensions

This is a free project. We’re asking that you please spend a minute replying to Are you using AppSecInc. MSI extensions?.

Wix Extensions

  • System Tools: deals with copying, moving, deleting files out of sequence, compare versions, execute commands, process template files, copy registry keys, etc.
  • Java Tools: deals with jar and unjar.
  • Data Sources: deals with generic ODBC and specific MSAccess and MSSQL databases, SQL files, etc.
  • User Privileges: deals with local users and groups.
  • Common UI: dialogs for installing Windows services and databases with credentials.

Immediate Custom Actions

  • Manipulating files, folders, registry, services.
  • String template and regex processing.
  • Active Directory functions.
  • ODBC and DMO functions.
  • Local users, groups, security and privileges.
  • Encryption, decryption, signing.
  • Xml file manipulation.
  • TcpIp functions.

Additional Features

  • Supports impersonation in all custom actions.

Presentations

Developers

http://msiext.codeplex.com/

Categories: WiX

Install a pfx certificate in a users store in Windows using WiX ?

Complete sample (Adapt to your WiX)

<?xml version="1.0" encoding="utf-8"?>
<Wix
 xmlns="http://schemas.microsoft.com/wix/2006/wi"
 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
 xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
 >

<Product
 Id="*"
 Language="1033"
 Manufacturer="ACME"
 Name="WixInstallCertificate"
 UpgradeCode="*"
 Version="1.0.0.0">

<Package
 Compressed="yes"
 InstallerVersion="200" />


<UIRef Id="WixUI_ErrorProgressText" />
<Condition Message="This application requires .NET Framework 3.5. Please install .NET Framework then run this installer again.">
Installed OR NETFRAMEWORK35
</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder" Name="PMenu" ></Directory>
<Directory Id="APPLICATIONPROGRAMSFOLDER" Name="AMenu" >
<Directory Id="AppDir" Name='InstantClient' /></Directory>
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="PROGRAMMENUDIR1" Name='InstantClient' >

 <Component Id="Component_CACERT" Guid="*">
 <iis:Certificate Id="CACert"
 Name="D:\My Documents\Visual Studio 2008\Projects\WixInstallCertificate\TemporaryKey.pfx"
 Request="no"
 CertificatePath="D:\My Documents\Visual Studio 2008\Projects\WixInstallCertificate\TemporaryKey.pfx"
 StoreName="root"
 StoreLocation="localMachine"
 />
 </Component>


 <Component Id="Component_CACERT1" Guid="*">
 <iis:Certificate Id="CACert1"
 Name="D:\My Documents\Visual Studio 2008\Projects\WixInstallCertificate\X7.Client.Web_1_TemporaryKey.pfx"
 Request="no"
 CertificatePath="D:\My Documents\Visual Studio 2008\Projects\WixInstallCertificate\X7.Client.Web_1_TemporaryKey.pfx"                        StoreName="trustedPublisher"
 StoreLocation="localMachine"
 />
 </Component>
</Directory>
</Directory>
</Directory>

<Property Id="WIXUI_INSTALLDIR" Value="PROGRAMMENUDIR1" />

<Feature Id="ProductFeature" Level="1" Title="Your Title"  Description='Your Descripttion'  ConfigurableDirectory='TARGETDIR'>
<ComponentRef Id="Component_CACERT" />
<ComponentRef Id="Component_CACERT1" />
</Feature>

<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
 <Property Id="NETFRAMEWORK35" Secure="yes">
 <RegistrySearch Id="NetFramework35"
 Root="HKLM"
 Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5"
 Name="Install"
 Type="raw" />
 </Property>
 <WixVariable Id="WixUIDialogBmp" Value="C:\main_bkgd.bmp" />
 <WixVariable Id="WixUIBannerBmp" Value="C:\header.bmp" />
 <WixVariable Id="WixUILicenseRtf" Value="C:\EULA.rtf" />
 <InstallExecuteSequence>
 <ScheduleReboot After="InstallFinalize"/>
 </InstallExecuteSequence>
</Product>
</Wix>
Categories: WiX

WiX Reboot after installation?

How do you add a prompt to restart the machine after a user installed a piece of software that needs restarting.

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product
Name='Sample App'
Id='PRODUCT-GUID-HERE'
UpgradeCode='UPGRADE-GUID-HERE'
Language='1033'
Version='YOUR-APP-VERSION-HERE'
Manufacturer='YOU!'>
....
....
....
<InstallExecuteSequence>
<ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>

</Product>
</Wix>

Read more about install sequence here.

Categories: WiX