簡體   English   中英

Wix 安裝程序自定義操作運行 dism 失敗

[英]Wix installer custom action for running dism failing

所以這個安裝程序工作正常,直到我添加以下,奇怪的部分是在它回滾安裝后由於錯誤我通過 dism.exe 添加的功能實際上像我想要的那樣打開。 很想添加一些東西來忽略錯誤,但我寧願不必將其破解。

相關 xml

<CustomAction Id="SetEnableWindowsFeatures" Property="BatchFeatures" Value="&quot;[System64Folder]Dism.exe&quot; /norestart /quiet /online /enable-feature /featureName:Client-DeviceLockdown /featurename:Client-EmbeddedShellLauncher /featurename:Client-KeyboardFilter" />
    <CustomAction Id="BatchFeatures" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Impersonate="no" />

 <InstallExecuteSequence>
      <Custom Action="SetEnableWindowsFeatures"     Before="BatchFeatures">NOT Installed</Custom>
      <Custom Action="BatchFeatures"                After="InstallFiles">NOT Installed</Custom>
    </InstallExecuteSequence>

Error generated

Executing op: ActionStart(Name=BatchFeatures,,)
Action 11:16:48: BatchFeatures. 
MSI (s) (24:2C) [11:16:48:829]: Executing op: CustomActionSchedule(Action=BatchFeatures,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:\WINDOWS\system32\Dism.exe" /norestart /quiet /online /enable-feature /featureName:Client-DeviceLockdown /featurename:Client-EmbeddedShellLauncher /featurename:Client-KeyboardFilter)
MSI (s) (24:2C) [11:16:48:831]: Creating MSIHANDLE (131) of type 790536 for thread 24108
MSI (s) (24:A4) [11:16:48:832]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIC518.tmp, Entrypoint: CAQuietExec
MSI (s) (24!D0) [11:16:50:676]: Creating MSIHANDLE (132) of type 790531 for thread 29392
CAQuietExec:  Error 0x80070bc2: Command line returned an error.
MSI (s) (24!D0) [11:16:50:676]: Closing MSIHANDLE (132) of type 790531 for thread 29392
MSI (s) (24!D0) [11:16:50:676]: Creating MSIHANDLE (133) of type 790531 for thread 29392
CAQuietExec:  Error 0x80070bc2: QuietExec Failed
MSI (s) (24!D0) [11:16:50:676]: Closing MSIHANDLE (133) of type 790531 for thread 29392
MSI (s) (24!D0) [11:16:50:676]: Creating MSIHANDLE (134) of type 790531 for thread 29392
CAQuietExec:  Error 0x80070bc2: Failed in ExecCommon method
MSI (s) (24!D0) [11:16:50:677]: Closing MSIHANDLE (134) of type 790531 for thread 29392
CustomAction BatchFeatures returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (24:A4) [11:16:50:678]: Closing MSIHANDLE (131) of type 790536 for thread 24108
Action ended 11:16:50: InstallFinalize. Return value 3.

摘要:看起來您需要在Dism.exe運行后重新啟動( 0x80070bc2 : ERROR_SUCCESS_REBOOT_REQUIRED )。 但還有更多...


需要重新啟動錯誤The error 0x80070bc2 means ERROR_SUCCESS_REBOOT_REQUIRED (鏈接到幻數數據庫 - 有關錯誤查找的一些詳細信息,使用什么工具)。 換句話說,安裝看起來不錯,但自定義操作返回代碼指示需要重新啟動,並且您已設置自定義操作以檢查退出代碼。 Can you just flush the error? You can. I wouldn't. What else is there? 我想您可以刷新錯誤並檢查之后安裝了哪些功能? 也不是很好。

DISM API :您可以通過 C++ API (Win32) 訪問 DISM。 由於對返回值、錯誤代碼和整體代碼流的增強控制,我會誠實地嘗試而不是命令行工具。 一旦運行 C++ 代碼也很好調試( 只需附加調試器):

C# :似乎有人為 dism.exe 推送命令行創建了 C# 包裝器(未測試)。

安全性和 Windows 更新:控制 Windows 在 package 中安裝的功能不一定是好事。 一方面,我會在之后立即運行Windows 更新,以檢查可能已經打開的任何新安全漏洞。

活動目錄? :我認為這個 Windows 功能安裝最好從Active Directory控制(所有工作站的集中控制),但我對這個過程也不太熟悉。 只是想提一下。 從外觀上看,這可能是用於 SOE 環境的企業 package? 如果是這樣,我會與高級系統管理員聊天嗎? 如果有部門的話,還有保安人員嗎? (審計)。 有時他們自己要求這樣的包裹......


鏈接

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM