2

I have created a setup using wix and have even created customized dialogs too.Now i need mySetup to auto download the Prerequisites for my application.Seems it can be done through bootstrapper only.I have even created a bootstrapper file too,but I don't want to attach Prerequisites setup (ie) .exe files in bootstrapper for installing the Prerequisites .Instead i need to download the directly from web and need to install automatically when my setup runs.

is it possible with wix ?? Am new to wix and if its possible please share me some source ??

Thanks in Advance

Dah Sra
  • 4,107
  • 3
  • 30
  • 69

2 Answers2

4

Simply use SourceFile to avoid any inconvenience.

<ExePackage 
              Id="InstallJava"
              DetectCondition='NOT Installed AND JAVACURRENTVERSION>="1.6"'
              InstallCondition='NOT VersionNT64'
              SourceFile="..\dep\jre-7u55-windows-i586.exe"  
              InstallCommand='/s'
              Compressed="no"
              Permanent="yes"
              PerMachine="yes"
              Vital="no"
              DownloadUrl="http://javadl.sun.com/webapps/download/AutoDL?BundleId=86895"
              />

Download the prereq.exe and use SourceFile attribute to refer it. WiX will automatically calculate the Hashcode, etc.

But if you are more inclined toward using RemotePayLoad then use heat.exe to harvest this data.

<wix-folder>/bin/heat payload d:\prereq.exe -out d:\remote.xml
Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
Yawar
  • 1,016
  • 1
  • 12
  • 14
  • which location will the auto downloaded file will be? – Dah Sra May 29 '14 at 12:43
  • can you please tell me hoe to use heat – Dah Sra May 29 '14 at 13:02
  • @user3611781 Download the package (like prereq.exe) which you want to harvest. Then use the command which I had mentioned in my answer. You could find heat.exe under WIX installation folder C:\Program Files (x86)\WiX Toolset v3.7. Open remote.xml in text editor for RemotePayload info. – Yawar May 30 '14 at 07:42
  • @user3611781 WIX will automatically download and installed the prerequisite. You don't have to take care about download location. You could use **InstallCommand** for additional params to pass. – Yawar May 30 '14 at 07:51
0

EXEPACKAGE - you can make use of the DownloadUrl attribute.

DownloadUrl - The URL to use to download the package. The following substitutions are supported: {0} is replaced by the package Id. {1} is replaced by the payload Id. {2} is replaced by the payload file name.

RemotePayload - Describes information about a remote file payload that is not available at the time of building the bundle. The parent must specify DownloadUrl and must not specify SourceFile when using this element.

For example:

<PackageGroup 
            Id="Netfx4Full">
            <ExePackage 
                Id="Netfx4Full" 
                Cache="no" 
                Compressed="no" 
                PerMachine="yes" 
                Permanent="yes" 
                Vital="yes"
                DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193/dotNetFx40_Full_x86_x64.exe" >

             <RemotePayload
               ProductName="dotNetFx40_Full_x86_x64.exe" 
                Description="Dotnet 4.0"
                Size="3961856" 
                Version="4.0.5022.0" />
             </ExePackage>
        </PackageGroup>
Isaiah4110
  • 9,855
  • 1
  • 40
  • 56
  • seems here also we need to add source file (ie) required .exe file with our solution.?? – Dah Sra May 28 '14 at 11:43
  • if the required setup have already installed in the system means what will happen.? @Isaiah4110 – Dah Sra May 28 '14 at 12:36
  • add InstallCondition attribute within the ExePackage element. – Isaiah4110 May 28 '14 at 12:47
  • i am really new to wix?can you please guide me ? – Dah Sra May 28 '14 at 12:52
  • The required setup would obviously create some registry entries right? In the install condition check for those registry entries. If it exists, you dont need to install otherwise you do. I am guiding you as much as I can, and I think you have enough information above to work this out. – Isaiah4110 May 28 '14 at 15:56
  • :ya you're right am asking how to put that condition here – Dah Sra May 28 '14 at 16:36
  • @Isaish4110 can you please tell me how to find the hash value for remotePayLoad.? – Dah Sra May 29 '14 at 08:08
  • @lsaish4110can you help me out in this http://stackoverflow.com/questions/25059892/how-to-insert-a-image-in-setup-dialog-in-wix-installer – Dah Sra Jul 31 '14 at 13:20