gpt4 book ai didi

WIX 创建计划任务

转载 作者:行者123 更新时间:2023-12-04 01:59:14 24 4
gpt4 key购买 nike

我正在尝试使用 WIX 创建计划任务。我希望计划任务以另一个域上的特定用户身份运行。

我通过属性 [Service.User] 和 [Service.Password] 传入我的用户。

这是我的代码:

<InstallExecuteSequence>
<Custom Action="CreateScheduledTask" After="InstallFiles">NOT Installed</Custom>
<Custom Action="CreateScheduledTaskId" After="CostFinalize">NOT Installed </Custom>
<Custom Action="DeleteScheduledTaskId" After="CostFinalize">Installed</Custom>
<Custom Action="DeleteScheduledTask" Before="RemoveFiles">Installed </Custom>
</InstallExecuteSequence>

<!--Create CcsReturnProcess Scheduled Task-->
<CustomAction Id="CreateScheduledTaskId"
Property="CreateScheduledTask"
Return="check"
Execute="immediate"
Value="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /SC DAILY /MO 1 /ST 10:00 /TN &quot;CcsReturnProcess&quot; /TR &quot;&quot;[INSTALLFOLDER]CcsReturnProcess.exe&quot;&quot; /RU &quot;[Service.User]&quot; /RP &quot;[Service.Password]&quot; /RL HIGHEST" />

<CustomAction Id="CreateScheduledTask"
Return="check"
Impersonate="no"
Execute="deferred"
BinaryKey="WixCA"
DllEntry="CAQuietExec" />

<!--Delete CcsReturnProcess Scheduled Task-->
<CustomAction Id="DeleteScheduledTaskId"
Property="DeleteScheduledTask"
Return="check"
Execute="immediate"
Value="&quot;[SystemFolder]SCHTASKS.EXE&quot; /DELETE /TN &quot;CcsReturnProcess&quot; /F" />

<CustomAction Id="DeleteScheduledTask"
Return="check"
Impersonate="no"
Execute="deferred"
BinaryKey="WixCA"
DllEntry="CAQuietExec" />
Trying the below does not work either.

<CustomAction Id="CreateScheduledTaskId"
Property="CreateScheduledTask"
Return="check"
Execute="immediate"
Value="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /SC DAILY /MO 1 /ST 10:00 /TN &quot;CcsReturnProcess&quot; /TR &quot;&quot;[INSTALLFOLDER]CcsReturnProcess.exe&quot;&quot; /RU &quot;[Service.Domain]\[Service.User]&quot; /RP &quot;[Service.Password]&quot; /RL HIGHEST" />

似乎我的 [Service.User] 没有被传入。我查看了 msi 日志,它显示用户名和密码为空???

MSI (s) (44:E0) [16:51:48:275]: PROPERTY CHANGE: Adding CreateScheduledTask property. Its value is '"C:\windows\SysWOW64\SCHTASKS.EXE" /CREATE /SC MINUTE /MO 20 /TN "CcsReturnProcess" /TR ""D:\ScheduledTasks\CcsReturnProcess\CcsReturnProcess.exe"" /RU "" /RP "" /RL HIGHEST'.



谁能建议如何让这个工作?

最佳答案

用户提供给安装程序的属性必须是 uppercase and therefore public

关于WIX 创建计划任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33174887/

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