目前,只要更新到更新的版本号,所有升级都可以正常工作,但是在降级时我会遇到奇怪的行为.它似乎将卸载现有版本,然后部分安装我正在尝试安装的版本,目标位置尚不存在主exe,但会创建广告快捷方式.当打开广告的快捷方式时,它将完成安装(可能是修复)然后它将运行正常.
有没有人有任何想法为什么会这样?
我的升级块看起来像这样:
<UpgradeVersion Minimum="0.0.0.0" Maximum="99.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" IgnoreRemoveFailure="yes" />
(IgnoreRemoveFailure尝试解决此问题,但似乎没有做任何事情)
在我的InstallExecuteSequence中我有 <RemoveExistingProducts After="InstallValidate" />
我也有Product Id="*"和Package Id="*"
需要降级的原因是因为客户端应用程序需要运行与服务器相同的版本以确保兼容性,并且整个过程需要自动化,因此如果客户端/服务器版本在登录时不匹配,则用户可以单击"是",下载,安装并启动正确的版本.这是工作迄今升级,但降级需要额外的步骤直观是手动重新启动应用程序,然后看到一个Windows安装程序对话框弹出它启动之前.
最终的结果是,无论升级或降级,目前的版本需要完全卸载和下载的版本完全安装,所以如果有另一种方式来实现这一目标,这也将是一个很好的答案.
我正在学习Windows-Installer和Wix,并且有很多与它如何工作有关的问题:
我写了一个自定义操作来安装后创建一个计划任务.当用户不想创建计划任务时,我不希望自定义操作运行.在安装过程中,即使我选择"功能将无法使用",也会创建schtask.如何阻止自定义操作执行?
是否可以在批处理脚本中使用条件语句?
例如:
我有两个服务器,S1和S2.当批处理文件在S1中部署时,输出应该在位置L1生成.同样,如果在S2中部署批处理文件,则应在位置L2中生成输出.
我的剧本:
set ComputerName=S1
set RepServer=%ComputerName%
set DBServer=%ComputerName%
set ReportPath="/DEV/Clearviewbilling"
set SharedPath=\\scottvdr1\ClearviewBilling\DEV-TEST
set UserId=-E
set fn=Create_Log.txt
if exist %fn% del %fn%
@echo on
@rem Reports
rs -i "%CD%"\Reports\Create_Sub.rss -s http://%RepServer%/reportserver -v Path=%SharedPath% -v rootpath=%ReportPath% -v DBServer=%DBServer% -t >> %fn% 2>&1
Run Code Online (Sandbox Code Playgroud)
但我希望脚本是:
set ComputerName=S1
set RepServer=%ComputerName%
set DBServer=%ComputerName%
If ComputerName=S1
Set SharedPath=//blah/blah
else
Set sharedPath=//some/path
set ReportPath="/DEV/Clearviewbilling"
set UserId=-E
set fn=Create_Log.txt
if exist %fn% del %fn%
@echo on
@rem Reports
rs -i "%CD%"\Reports\Create_Sub.rss -s http://%RepServer%/reportserver -v Path=%SharedPath% -v rootpath=%ReportPath% …Run Code Online (Sandbox Code Playgroud) 我找到了几个示例,展示了如何从WiX运行PowerShell脚本,但尚未成功运行其中任何一个.所以,我想发布我所拥有的东西,希望有人可以指出我做错了什么.
<!--Install the PowerShell script-->
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="cmp_ShutdownIExplore" Guid="{4AFAACBC-97BB-416f-9946-68E2A795EA20}" KeyPath="yes">
<File Id="ShutdownIExplore" Name="ShutdownIExplore.ps1" Source="$(var.ProjectDir)Source\PowerShell\ShutdownIExplore.ps1" Vital="yes" />
</Component>
</DirectoryRef>
<!--Define the CustomAction for running the PowerShell script-->
<CustomAction Id="RunPowerShellScript" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="yes" />
<InstallExecuteSequence>
<!--Invoke PowerShell script -->
<Custom Action="RunPowerShellScript" After="InstallFiles"><![CDATA[NOT Installed]]></Custom>
</InstallExecuteSequence>
<!-- Define custom action to run a PowerShell script-->
<Fragment>
<!-- Ensure PowerShell is installed and obtain the PowerShell executable location -->
<Property Id="POWERSHELLEXE">
<RegistrySearch Id="POWERSHELLEXE"
Type="raw"
Root="HKLM"
Key="SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell"
Name="Path" />
</Property>
<Condition Message="This application …Run Code Online (Sandbox Code Playgroud) 在VS2012中,我为应用程序创建了一个Wix3.6安装项目.安装程序输出类型在"属性"选项卡上设置为" 可执行包(.exe) ".安装项目按预期编译并生成.exe.
双击.exe会生成以下消息:
此应用无法在您的PC上运行.
以管理员身份执行.exe并授予标高,机器说:
Windows找不到'C:\ abc\xyz.exe'.确保正确键入名称,然后重试.
谷歌搜索显示错误消息可能与架构相关.
事实:
有关不正确的设置,参考或配置要查找的任何想法?
我有一些XSLT在Sitecore 6 CMS中呈现,但我不认为这个问题是特定于产品的.
如果我有一个自动关闭的img或br标签,就像这样:
<br />
<img src="your.example.com" />
Run Code Online (Sandbox Code Playgroud)
结果输出将是:
<br>
<img src="your.example.com">
Run Code Online (Sandbox Code Playgroud)
XSLT文件的输出方法是HTML.它应该是XML吗?我猜测自关闭标签不是有效的HTML,但是将它设置为XML会导致输出问题吗?
我正在尝试为我的Wix安装创建一个自定义操作,它只是不起作用,我不确定为什么.
这是适当的Wix文件中的位:
<Binary Id="INSTALLERHELPER" SourceFile=".\Lib\InstallerHelper.dll" />
<CustomAction Id="HelperAction" BinaryKey="INSTALLERHELPER" DllEntry="CustomAction1" Execute="immediate" />
Run Code Online (Sandbox Code Playgroud)
这是我的自定义操作的完整类文件:
using Microsoft.Deployment.WindowsInstaller;
namespace InstallerHelper
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
session.Log("Begin CustomAction1");
return ActionResult.Success;
}
}
}
Run Code Online (Sandbox Code Playgroud)
该操作由UI中的按钮按下(现在):
<Control Id="Next" Type="PushButton" X="248" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" >
<Publish Event="DoAction" Value="HelperAction">1</Publish>
</Control>
Run Code Online (Sandbox Code Playgroud)
当我运行MSI时,我在日志中收到此错误:
MSI (c) (08:5C) [10:08:36:978]: Connected to service for CA interface.
MSI (c) (08:4C) [10:08:37:030]: Note: 1: 1723 2: SQLHelperAction 3: CustomAction1 4: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp
Error 1723. There is a …Run Code Online (Sandbox Code Playgroud) 在WiX中,您可以轻松注册文件类型:
<ProgId Id="MyApp.File" Description="MyApp File" Icon="MyAppEXE" IconIndex="0">
<Extension Id="ext" ContentType="application/x-myapp-file">
<Verb Id="open" Command="&Open" TargetFile="MyAppEXE" Argument=""%1""/>
</Extension>
</ProgId>
Run Code Online (Sandbox Code Playgroud)
如果我想怎么注册的URL协议,按规定在这里?显然,它没有扩展,所以我在哪里放Verb标签?或者我应该使用另一种方法?
谢谢.