2

我有一個安裝項目,它具有執行VBScript文件的自定義操作。既然這樣,這個安裝這個腳本,出現以下錯誤的執行過程中失敗:調試VS2008 VBScript自定義安裝任務

There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vender. 

腳本看起來好像沒什麼問題,但我看不到的方式來進行調試。有沒有辦法輸出一個跟蹤消息,甚至是暫停執行一個安裝腳本?

+0

您也可以嘗試直接執行腳本,而不是從MSI,我的意思是使用'cscript'或'wscript'。但是,您可能需要調整它。 –

+0

僅供參考,請閱讀[VBScript MSI CustomActions suck](http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm) - 使用C++更健壯。即使這個版本無法完成(通常情況下安裝程序開發者正面臨釋放的壓力),這是未來的考慮事項:) – saschabeaumont

回答

1

你可以嘗試下面的行加入到您的腳本輸出調試信息插入到日誌文件:

Set objFso = CreateObject("Scripting.FileSystemObject") 
Set f = objFso.OpenTextFile("C:\Temp\logfile.txt", 8, True) 
f.WriteLine "Debug message text" 
f.Close