我正在使用HeatDirectory来创建源.wxs文件.在拾取目录中有一个exe应该作为服务安装.实际上,如果我自己创建组件,我知道如何安装服务,但我不知道如何在自动生成的组件中包含ServiceInstall.有什么建议吗?
<HeatDirectory DirectoryRefId="Guardian" OutputFile="Source\GuardianSource.wxs" Transforms="Filter.xsl" Directory="..\Setup\C24.Guardian\bin\Debug" PreprocessorVariable="var.GuardianPath" ComponentGroupName="GuardianGroup" ToolPath="$(WixToolPath)" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="true" GenerateGuidsNow="false">
</HeatDirectory>
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="Guardian">
<Component Id="cmp70BEDA00F3161F3FB5E847EB1136B1D5" Guid="*">
<File Id="fil26DCBF1E4218C7363018FBA2CD456633" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.exe" />
</Component>
<Component Id="cmp2EE8126A193FA022ED35FAD8F182E65A" Guid="*">
<File Id="fil785CD681C496EDDAB457E8314C49D686" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.exe.config" />
</Component>
<Component Id="cmp0CC91B457FBC44F978A2AD6B24043DCF" Guid="*">
<File Id="fil2D304D0395599AAAAAF975A2DBFD530F" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.pdb" />
</Component>
<Component Id="cmpFB799FA015274DDBE2C337C60667D2C5" Guid="*">
<File Id="filB9C39B394CAD03F5A1BC3262C61EDDEB" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.vshost.exe" />
</Component>
<Component Id="cmp28C29865AE85B067BCEEBD70EFDB19D5" Guid="*">
<File Id="fil0A756B711769AAD657F306B3A6EA7134" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.vshost.exe.config" />
</Component>
<Component Id="cmp92A715A4BD4B580A6E70362230170428" Guid="*">
<File Id="filBD9D504F303A6EEC9E340E3872BBB0AE" KeyPath="yes" Source="$(var.GuardianPath)\C24.Guardian.vshost.exe.manifest" />
</Component>
<Component Id="cmp8AB6A241FA2D13F296CBD946C9711579" …Run Code Online (Sandbox Code Playgroud) 有没有办法跳过链中的一个包?我看过“InstallCondition”并且有这样的代码。
<ExePackage Id="RoboMongo"
DisplayName="RoboMongo"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="no"
Vital="no"
Name="redist\Robomongo-0.8.4-RC2-i386.exe"
DownloadUrl="$(var.RoboMongoUrl)"
InstallCondition="ComponentSelect_5"
InstallCommand='/Action=Install'
UninstallCommand="/Action=Uninstall"
RepairCommand ="/Action=Repair"
DetectCondition="RoboMongoInstalled">
<RemotePayload Description="????????? ????????????????? MongoDB"
Version ="0.8.4.2"
ProductName="RoboMongo"
Hash="71C17E48BC32304FA8724FFA7CA1C4C08891BC97" Size="7141182" />
Run Code Online (Sandbox Code Playgroud)
但我不想在 InstallCondition=false 上卸载它。我只想跳过它。
先感谢您。
我正在使用Microsoft SQL Server.
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'ServerSettings'
AND COLUMN_NAME = 'MapIsAlwayCalcLenByWebServices'
)
IF (
SELECT MapIsAlwayCalcLenByWebServices
FROM ServerSettings
) = 0
UPDATE ServerSettings
SET MapCalculateDistanceSource = 0
Run Code Online (Sandbox Code Playgroud)
有没有人知道为什么这段代码会抛出错误"无效的列名".我认为第二次选择仅在第一次if为真时才执行.