Функция PatchFiles объекта-установщика не работает - PullRequest
0 голосов
/ 03 мая 2019

Я пытаюсь получить список всех файлов, которые должны применяться файлами 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
...