我目前面临的问题是msi的组件GUID是小写的。需要将所有组件GUID转换为大写,因此编写了一个小脚本,如下所示:
VBS:
msi_fullpath = <Path of msi>
Dim strLine
strLine = "UPDATE Component SET ComponentId = UPPER(ComponentId)"
Set WI = CreateObject("WindowsInstaller.Installer")
Set DB = WI.OpenDatabase(msi_fullpath, 1)
' Update
Set view = DB.OpenView(strLine)
view.Execute
DB.Commit
View.Close
Set view = Nothing
Set DB = Nothing
Set WI = Nothing
但是上述方法不起作用。有人可以帮忙吗?