gpt4 book ai didi

installation - 安装后启动,没有用户界面吗?

转载 作者:行者123 更新时间:2023-12-03 14:05:28 25 4
gpt4 key购买 nike

没有UI(或在安静模式下)安装后如何启动应用程序?谢谢!



我有一个带有UI的安装程序,可以选择在安装后运行。现在,我希望我的应用程序通过以安静模式下载并运行新版本的安装程序来进行自我更新,但是更新完成后,它将不会再次启动。

最佳答案

sequencing custom actions上的msdn主题中:


与标准操作一样,
在中计划的自定义操作
InstallUISequence或
AdminUISequence仅在以下情况下运行
内部用户界面设置为
完整级别。


因此,我想您的自定义操作是按UI顺序安排的,而不是按InstallExecuteSequence安排的。尝试在InstallExecuteSequence中安排您的自定义操作,如下所示:

  <InstallExecuteSequence>
<Custom Action='LaunchApplication' After='InstallFiles'/>
</InstallExecuteSequence>


其中“ LaunchApplication”应替换为 Id元素的 CustomAction

编辑:我查看了您遵循的 instructions,但没有看到用于启动按任何顺序计划的应用程序的自定义操作。它仅由UI操作触发(单击“完成”按钮)。这解释了为什么在静默安装期间永远不会执行它。

编辑:完整样本(这有点草率,因为它还会尝试执行有关卸载,修复等的自定义操作,但是由于某种原因我无法使“未安装”条件起作用)

<?xml version='1.0' encoding='utf-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product
Name='ProductName'
Id='*'
Language='1033'
Version='0.0.1'
Manufacturer='ManufacturerName' >
<Package
Keywords='Installer'
Description='Launch application demo'
Manufacturer='ManufactererName'
InstallerVersion='100'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'/>

<Media Id='1' Cabinet='test.cab' EmbedCab='yes'/>

<Directory Id='TARGETDIR' Name="SourceDir">
<Directory Id='ProgramFilesFolder'>
<Directory Id='TestFolder' Name='Test' >
<Component Id="ExeComponent" Guid="*">
<File Id="ExeFile" Source="c:\windows\notepad.exe" />
</Component>
</Directory>
</Directory>
</Directory>

<Feature Id='Complete'
Display='expand'
Level='1'
Title='Test'
Description='Test'>
<ComponentRef Id="ExeComponent" />
</Feature>

<InstallExecuteSequence>
<Custom Action='LaunchInstalledExe' After='InstallFinalize'/>
</InstallExecuteSequence>

<CustomAction Id="LaunchInstalledExe"
FileKey="ExeFile"
ExeCommand=""
Execute="immediate"
Impersonate="yes"
Return="asyncNoWait" />

</Product>
</Wix>

关于installation - 安装后启动,没有用户界面吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1871531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com