我正在尝试获取将由msp文件应用的所有文件的列表。
我已经尝试了以下Microsoft文档https://docs.microsoft.com/en-us/windows/desktop/msi/listing-the-files-that-can-be-updated中的代码,但它仅显示msiexec对话框并完成。
Dim FileList
Dim installer : Set installer = Nothing
Dim argCount:argCount = Wscript.Arguments.Count
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
If (argCount > 0) Then
sProdCode = Wscript.Arguments(0)
sPatchPckgPath = Wscript.Arguments(1)
Set FileList = installer.PatchFiles (sProdCode, sPatchPckgPath)
For each File in FileList
Wscript.Echo "Affected file: " & File
Next
Else
Usage
End If