I am trying to create an ExePackage [using the DownloadUrl property] in my bundle that downloads Sql Express 2014 and installs it using the following code
<ExePackage Id="Sql2014Express"
DisplayName="SQL Server 2014 Express"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="no"
Vital="yes"
Name="SQLEXPRWT_x64_ENU.exe"
DownloadUrl="http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe"
InstallCommand="/ACTION=Install /INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /SECURITYMODE=SQL [SqlVariable] /TCPENABLED=1 /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSVCSTARTUPTYPE=Auto /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /ADDCURRENTUSERASSQLADMIN=FALSE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms"
UninstallCommand="/Action=Uninstall /INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /Q /HIDECONSOLE"
DetectCondition="SqlInstanceFound"
InstallCondition="$(var.ServerInstall)">
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
When I try and build the installer package I receive the following error....
Error 2 The system cannot find the file 'SourceDir\SQLEXPRWT_x64_ENU.exe'.
I can set the SourceFile property to a local file and include that in my install but I would prefer to not have to move around an 800mb+ file with my installer.
If you set up your bundle to
Compressed=no
it will not include the source file in your final bundle. The reason you're getting the "File not found" is because when the installer is built, it requires a local version of the package EXE file in order to get information from it. If you want to build a project which only has a download URL, you need to specify aRemotePayload
element, and supply some more defining information about the remote package.This will allow you to build the install package without having to have the source file on the machine, but you'll need to be sure your payload is accurately described or your install will fail.
On your
ExePackage
element, be sure you include theName
attribute, which is one of the required attributes next toSourceFile
, butSourceFile
is not allowed withRemotePayload
. Your example includes it, so you should be OK there.Include the
<RemotePayload>
element as a child ofExePackage
like so:Where all of the information required are attributes of your specific package. If this is not an option, you will need to make sure the source file is available locally at build-time, but ensure that it is not compressed, so the user can install and the payload will be downloaded from your URL.
See the RemotePayload reference for more info.