Hi,
I am checking whether .Net 1.1 is installed or not and if the .Net 1.1 is not
installed, I will throw an error message and give the user the option to
download the .Net 1.1 package automatically by creating a custom Action using
VBScript. If the user clicks OK button, I will run the URL
http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3")
and the user will download the .Net 1.1 package. Similarly I will allow the
user to run GPMC package if the GPMC is not installed in the host computer.
I have created a Custom Action, Binary and InstallExecuteSequence given below:
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallFinalize" />
<Custom Action="RunScript" After="LaunchConditions" />
</InstallExecuteSequence>
<CustomAction Id="RunScript" BinaryKey="autoinstall"
VBScriptCall="AutoInstall" />
<Binary Id="autoinstall" src="Binary\Install.vbs" />
I wanted to know how to link the Condition element and VB Script.
Kindly guide me how to go about.
Vb Script:
Function AutoInstall
Set objShell = CreateObject("Wscript.Shell")
intMessage = Msgbox("Click OK to Install it or Cancel to exit
Setup?",vbOKCancel)
If intMessage = vbOK Then
objShell.Run("http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3")
Else
Wscript.Quit(1)
End If
<?xml version='1.0' encoding='Windows-1252'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
<Product Name="$(var.ProductName)" Manufacturer="$(var.Manufacturer)"
Version="$(var.Version)" Language="1033"
Id="$(var.GUIDProduct)" UpgradeCode="$(var.GUIDUpgrade)">
<Package Id="????????-????-????-????-????????????"
Manufacturer="$(var.Manufacturer)"
Description="$(var.Description)" Comments="$(var.Comments)"
Compressed="yes" InstallerVersion="200"
Languages="1033" ShortNames="no" SummaryCodepage="1252" />
<!-- Media -->
<Media Id="1" EmbedCab="yes" Cabinet="cis.cab" />
<!-- Conditions -->
<Property Id="NETFRAMEWORKV1_1">
<RegistrySearch Id="NetFrameworkV1_1"
Root="HKLM"
Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322"
Name="Install" Type="raw"
/>
</Property>
<Property Id="FILEEXISTS">
<DirectorySearch Depth='0' Id="DirSearch" Path="$(var.SystemFolder)" >
<FileSearch
Id="CheckGPMConsole"
Name="gpmc.msc"
/>
</DirectorySearch>
</Property>
<?include .\Include.wxi ?>
<!-- ******************************************************************* -->
<!-- Launch Conditions -->
<!--
******************************************************************* -->
<Condition Message='This setup requires the .NET Framework version 1.1.
Please install the .NET Framework and run this setup again. The .NET Framework
1.1 can be obtained from the
http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3'
>
<![CDATA[((NETFRAMEWORKV1_1) OR (Installed))]]>
</Condition>
<Condition Message='This setup requires the Group Policy Management
Console(GPMC). The GPMC can be obtained from the
http://www.microsoft.com/downloads/details.aspx?familyid=0a6d4c24-8cbd-4b35-9272-dd3cbfc81887'
>
<![CDATA[((FILEEXISTS) OR (Installed))]]>
</Condition>
</Product>
</Wix>
Thanks,
Naresh Krishna Kumar. K
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware
protection.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users