在这里,我已经尝试了一些东西,但它不工作,在所有谁能指导我如何运行安装程序的多个脚本
<SetProperty Id="PS1"
Before="PS1"
Sequence="execute"
Value =""C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"-NoLogo -NonInteractive -ExecutionPolicy Bypass -InputFormat None -NoProfile -File "-Command "cd '[INSTALLLOCATION]'; & '[#ps1]' ; exit $$($Error.Count)"" />
<CustomAction Id="PS1"
BinaryKey="WixCA"
DllEntry="WixQuietExec"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="PS1" After='InstallFiles'>
<![CDATA[NOT Installed]]>
</Custom>
</InstallExecuteSequence>
到目标文件夹文件被复制,但它说这样为什么我不知道,在一个日志文件中,它显示这样
WixQuietExec: Processing -File '-Command cd' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.
WixQuietExec: Windows PowerShell
WixQuietExec: Copyright (C) Microsoft Corporation. All rights reserved.
WixQuietExec:
WixQuietExec: Try the new cross-platform PowerShell https://aka.ms/pscore6
WixQuietExec:
WixQuietExec: Error 0xfffd0000: Command line returned an error.
WixQuietExec: Error 0xfffd0000: QuietExec Failed
WixQuietExec: Error 0xfffd0000: Failed in ExecCommon method
CustomAction PS1 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
1条答案
按热度按时间wpx232ag1#
这种情况并不总是发生,但错误信息非常清楚。这里是自动换行的,因此更容易阅读:
这是PowerShell错误消息。