問:Windows安裝:錯誤1001,CustomAction _xxxxx.install返回實際的錯誤代碼1603
我已經創建了一個窗口服務的安裝與Visual Studio 2012和InstallShield。
該服務運行良好。
安裝程序在我的開發機器(Windows 8 64位)和我的XP虛擬機(32位)上運行良好。
但是在Windows Server 2008 R2上,相同的安裝程序會得到「錯誤10001」。
沒有進一步的信息。
以下信息包含在事件日誌:
Product: DbBackupServiceSetup -- Error 1001.
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
the message resource is present but the message is not found in the string/message table
如果我手動安裝有:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "D:\Program Files\Test\DbBackupService.exe"
然後正常工作,甚至在Windows Server 2008 R2的...
我創建了一個具有32位可執行文件的安裝程序和一個具有64位可執行文件的安裝程序,但是我在這兩個文件中都遇到了這個錯誤...
我試着記錄執行MSI啓用
msiexec /i "D:\Install\DISK1\DbBackupServiceSetup.msi" /Lv "D:\example.log"
在日誌文件中的錯誤的第一個跡象是在這裏:
Created Custom Action Server with PID 3932 (0xF5C).
MSI (s) (C0:74) [14:26:28:065]: Running as a service.
MSI (s) (C0:74) [14:26:28:080]: Hello, I'm your 32bit Elevated custom action server.
MSI (s) (C0!14) [14:26:33:681]:
MSI (s) (C0:E8) [14:26:33:681]: Leaked MSIHANDLE (16) of type 790531 for thread 3348
MSI (s) (C0:E8) [14:26:33:681]: Note: 1: 2769 2: _B384C869AD7BC0C39F5780609620645B.install 3: 1
Info 2769. Custom Action _B384C869AD7BC0C39F5780609620645B.install did not close 1 MSIHANDLEs.
CustomAction _B384C869AD7BC0C39F5780609620645B.install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 14:26:33: InstallFinalize. Return value 3.
MSI (s) (C0:F0) [14:26:33:697]: User policy value 'DisableRollback' is 0
MSI (s) (C0:F0) [14:26:33:697]: Machine policy value 'DisableRollback' is 0
我不明白這一點。
同樣的安裝程序在其他機器上運行良好。
所有自定義操作都被封裝在try-catch中,系統帳戶可以完全訪問文件系統,並且它不是網絡共享。
並使用installutil安裝服務,所以它必須是安裝程序本身的錯誤。
對我來說,它看起來是調用
C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "D:\Program Files\test\DbBackupService.exe"
代替
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "D:\Program Files\test\DbBackupService.exe"
,並因此獲得不錯的圖像異常。
但是,如果是這樣的話,我不明白的是爲什麼我得到同時使用32個和64位可執行文件這個錯誤...
按理說,這個問題的InstallShield itselfs ..
噢,我使用遠程桌面(mstsc.exe)連接到服務器,萬一有所作爲,並且我無法直接訪問服務器,所以我不能嘗試它是否是mstsc問題。
對於那些閱讀這條道路的人來說,這不是最佳實踐,也不應該被模仿。這不是一個解決方案。 –
@Christopher Painter:是的,這是一個破解。但它存在是因爲我無法在兩天內找到解決方案。它和installutil.exe一樣。它的工作原理!唯一不好的做法是在解決問題的頭幾個小時後才放棄InstallShield,因爲只能通過谷歌解決問題。 –
@Quandary +1。在這一天和這個時代,過於複雜的安裝程序技術會在某一天完成,特別是以Visual Studio Installer項目模板的形式;醜陋,易混淆,容易出錯的基於XML的「安裝技術」,如Wix;人們可以看到解決方案簡單的價值。像這樣的原因我更喜歡OSX的方式。 – MickyD