I trying instalation sql server from bootstrapper:
<ExePackage Id="SQL" Name="SqlServer2019" Cache="no" Compressed="no" PerMachine="yes"
Permanent="yes" Vital="yes"
InstallCommand="/ACTION=INSTALL /QS /IACCEPTSQLSERVERLICENSETERMS /SECURITYMODE=SQL /SAPWD=Password1234
/FEATURES=SQLENGINE,REPLICATION,SNAC_SDK /INSTANCENAME=MSSQLSERVER"
SourceFile="C:\Users\admin\Downloads\SQLEXPR_x64_ENU.exe" DetectCondition="SqlStatus = "true""/>
I checked where is problem without parameter "/QS" and on start I had to choose: "Directory For Extracted Files". When I run instalation from console line or run .exe the path:
C:\Users\admin\Downloads\SQLEXPR_x64_ENU\
But if I run this from Bootstrapper path:
C:\ProgramData\Package
Cache\A0086387CD525BE62F4D64AF4654B2F4778BC98D\SqlServer2019\
What throw exception "Extratction failed". How repair this. I dont see I can set this path before instalation.
I would set this path, e.g. "C:\SqlServer2019"
I solved this problem by adding /x:C:\SqlServer2019\ to InstallCommand.
Related
I am trying to get Wix to install https://www.silabs.com/documents/public/software/CP210x_Windows_Drivers.zip
It is basically an exe that has multiple files and folders that are required for the installation to work.
I have added this this to Bundle.wxs in the Bootstrapper.
<Fragment>
<PackageGroup Id="WindowsCP210xVCPInstallerx64" >
<ExePackage
Id="WindowsCP210xVCPInstallerx64"
Name="$(var.PackagePath)\CP210xVCPInstaller_x64.exe"
DisplayName="CP210x USB to UART Bridge Virtual COM Port (VCP) drivers"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
InstallCondition="VersionNT64"
InstallCommand="/Q /SW /SE"
RepairCommand="/Q /SW /SE"
UninstallCommand="/U $(var.PackagePath)\CP210x_VCP_Windows\slabvcp.inf /Q"
SourceFile="CP210xVCPInstaller_x64.exe">
</ExePackage>
</PackageGroup>
</Fragment>
However when building I keep getting this error
The system cannot find the file 'CP210xVCPInstaller_x64.exe'.
At present I have just added the entire folder that contains the CP210xVCPInstaller_x64.exe and all the other files it depends on into the project.
I am trying to set up an installation, with sql express 2014 as a prerequisite. The installation itself works fine, but when uninstalling, the instance is not removed. I can still access it through my sql manager and find it in the registry.
This is my Chain:
<Chain>
<ExePackage
Id="Netfx4Full"
Name="dotNetFx40_Full_x86_x64.exe"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
DownloadUrl="https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
DetectCondition="Net4FullVersion AND (NOT VersionNT64 OR Net4x64FullVersion)"
InstallCondition="(VersionNT < v6.0 OR VersionNT64 < v6.0) AND (NOT (Net4FullVersion OR Net4x64FullVersion))">
</ExePackage>
<PackageGroupRef Id="Sql2014Express"/>
<RollbackBoundary />
<MsiPackage Id="MainPackage" SourceFile="MyApplication.msi" DisplayInternalUI="yes" Compressed="yes" Vital="yes" />
</Chain>
This is my ExePackage:
<PackageGroup Id="Sql2014Express">
<ExePackage Id="SQL2014Expressx64"
InstallCondition="VersionNT64 AND NOT SQL2014x64InstanceInstalled"
SourceFile="packages\SQLEXPR_x64_ENU.exe"
DownloadUrl="$(var.SqlWebLink64)"
DisplayName="Installing Microsoft SQL Express 2014"
InstallCommand="/ACTION=Install /INSTANCENAME=$(var.InstanceName) /FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck /IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
UninstallCommand="/Action=Uninstall /INSTANCENAME=$(var.InstanceName) /FEATURES=SQLENGINE /Q /HIDECONSOLE"
Cache="yes"
Vital="yes"
Compressed="no"
PerMachine="yes"
Permanent="no"/>
...
</PackageGroup>
From what i understand, the Permanent="no", should take care of removing the package on uninstall. I have even included and UninstallCommand, but this does not remove the instance either.
What am I missing here?
Let me know if any other info is required to solve this. - Thx!
Exe packages require a DetectCondition to be able to verify whether or not the package is installed. If you notice in your .net exepackage you have
DetectCondition="Net4FullVersion AND (NOT VersionNT64 OR Net4x64FullVersion)"
This tells the installer that this package is installed iff the condition is true. You have to do the same thing in your SQL exe package.
DetectCondition is
A condition that determines if the package is present on the target system. This condition can use built-in variables and variables returned by searches. This condition is necessary because Windows doesn't provide a method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this package during a bundle action; for example, if this condition is false or omitted and the bundle is being installed, Burn will install this package.
You can do this by creating some registry searches which set some variables. Try this registry search
<util:RegistrySearch
Id='MicrosoftSQLInstalledCheck'
Root='HKLM'
Key='SOFTWARE\Microsoft\Microsoft SQL Server\$(var.InstanceName)\Setup'
Win64='yes'
Value='SQLPath'
Result='exists'
Variable='MicrosoftSQLInstalled'/>
Then in your ExePackage for SQL you can put DetectCondition="MicrosoftSQLInstalled" and that will be true if the registry search found the SQLPath registry entry in the key specified.
I have been struggling now for a few hours getting this working without any real success. I am trying to install ReportViewer 2012 (v11) including SQLSysClrTypes.msi with my installer.
My registry checks are as follow and seems to work:
<util:RegistrySearch Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server 2012 Redist\SQL Server System CLR Types\CurrentVersion"
Value="Version"
Variable="SQLSysClrTypesVerion" />
<util:RegistrySearch Root="HKLM"
Key="Software\Microsoft\Microsoft SQL Server 2012 Redist\Microsoft Report Viewer 2012 Runtime"
Value="Version"
Variable="ReportViewer11Verion" />
The package ref is as follow:
<PackageGroup Id="ReportViewer11">
<ExePackage Id="SQLSysClrTypes" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
SourceFile="reportviewer/SQLSysClrTypes.msi"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkID=239643"e;clcid=0x409"
DetectCondition="SQLSysClrTypesVerion" />
<ExePackage Id="ReportViewer11" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
InstallCommand="/q"
SourceFile="reportviewer/ReportViewer.msi"
DownloadUrl="http://www.microsoft.com/en-us/download/details.aspx?id=35747"
DetectCondition="ReportViewer11Verion" />
</PackageGroup>
The log file for the installer states the following (not really helpful):
[0F08:10E0][2015-04-20T16:47:00]i304: Verified existing payload: ReportViewer11 at path: C:\ProgramData\Package Cache\54004C9B82D761A9AEB4EB73B85F5475D3771BAE\ReportViewer.msi.
[0F08:10E0][2015-04-20T16:47:00]i304: Verified existing payload: InstallationPackageId at path: C:\ProgramData\Package Cache{A327D350-C9A6-4AA5-AA86-92E3B6653E77}v1.0.0.0\Avis.RAC.DARA.msi.
[0F08:04A4][2015-04-20T16:47:00]i301: Applying execute package: ReportViewer11, action: Install, path: C:\ProgramData\Package Cache\54004C9B82D761A9AEB4EB73B85F5475D3771BAE\ReportViewer.msi, arguments: '"C:\ProgramData\Package Cache\54004C9B82D761A9AEB4EB73B85F5475D3771BAE\ReportViewer.msi" /q'
[0F08:04A4][2015-04-20T16:47:00]e000: Error 0x800700c1: Failed to CreateProcess on path: C:\ProgramData\Package Cache\54004C9B82D761A9AEB4EB73B85F5475D3771BAE\ReportViewer.msi
[0F08:04A4][2015-04-20T16:47:00]e000: Error 0x800700c1: Failed to execute EXE package.
[0E24:1164][2015-04-20T16:47:00]e000: Error 0x800700c1: Failed to configure per-machine EXE package.
[0E24:1164][2015-04-20T16:47:00]i319: Applied execute package: ReportViewer11, result: 0x800700c1, restart: None
[0E24:1164][2015-04-20T16:47:00]e000: Error 0x800700c1: Failed to execute EXE package.
You are using ExePackage for your msi files, use MsiPackage instead.
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
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
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>
I am using the exePackage attribute to download an exe pacakge - actually the VSTO runtime from microsoft.
It fails to get the package.
I believe this is the correct way to add it to the CHAIN
<ExePackage Id="VSTORuntime" SourceFile="vstor_redist.exe" Permanent="yes" Vital="yes" Cache="no" Compressed="no"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917"
PerMachine="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTORFeature"
InstallCondition="NOT VSTORFeature OR NOT (VSTORVersionV4R >=v10.0.40303) OR NOT (VSTORVersionV4 >=v10.0.21022)" />
This is the log file part. It does this about three times.
[0D98:06A8][2013-07-22T11:47:31]w343: Prompt for source of package: VSTORuntime, payload: VSTORuntime, path: F:\vstor_redist.exe
[0D98:06A8][2013-07-22T11:47:31]i338: Acquiring package: VSTORuntime, payload: VSTORuntime, download from: http://go.microsoft.com/fwlink/?LinkId=158917
[16A0:0BE4][2013-07-22T11:47:37]e000: Error 0x80070490: Failed to find expected public key in certificate chain.
[16A0:0BE4][2013-07-22T11:47:37]e000: Error 0x80070490: Failed to verify expected payload against actual certificate chain.
[16A0:0BE4][2013-07-22T11:47:37]e000: Error 0x80070490: Failed to verify signature of payload: VSTORuntime
i think you need to specify Certificate key in the RemotePayload tag, like this :
<ExePackage Id="VSTORuntime" SourceFile="vstor_redist.exe" Permanent="yes" Vital="yes" Cache="no" Compressed="no"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917"
PerMachine="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTORFeature"
InstallCondition="NOT VSTORFeature OR NOT (VSTORVersionV4R >=v10.0.40303) OR NOT (VSTORVersionV4 >=v10.0.21022)">
<RemotePayload ProductName="Windows Installer 4.5"
Description="Windows Installer 4.5 Setup"
CertificatePublicKey="F321408E7C51F8544B98E517D76A8334052E26E8"
CertificateThumbprint="D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1"
Hash="86E1CC622DBF4979717B8F76AD73220CDB70400B"
Size="3327000"
Version="4.5.0.0" />
</ExePackage>
it's just an idea ...
or Try to use fiddler to find if they'r an error 404 or something like this ...
I've encountered this problem when the bootstrapper bundle is compiled with one version of the exe package, but another version is sitting alongside the installer executable when you try to run it. I suspect that Burn automatically pulls the certificate information out of the source file when you compile the bundle.
If for example your Setup.exe file was in C:\Downloads and C:\Downloads also contains a version of vstor_redist.exe which is different to the one present when you built Setup.exe, you'll see this error. You can work around the problem by deleting vstor_redist.exe from C:\Downloads - Setup.exe will then go off and download the correct version from the URL you specified.
It appears that Microsoft had updated the package behind that URL, and changed the certificate that was used to sign it. This is indistinguishable from an attacker serving up a malicious file, so the only thing you can do is build a new bundle from the new file with the updated certificate. In later versions of 3.x, you had to specify SuppressSignatureVerification="no" when not using RemotePayload and you wanted signature verification instead of hash verification.