2017-05-31 4 views
0

Ich bin neu bei Wix. Während der Installation einer MSI möchte ich die util:CloseApplication verwenden, um zu erkennen, ob notepad.exe ausgeführt wird. Mein einfacher Code.So beheben Sie WixCloseApplications: Fehler 0x8007064f: Fehler beim Öffnen der Sicht auf die Datenbank?

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> 

<util:CloseApplication CloseMessage="no" Target="notepad.exe" RebootPrompt="no"/> 

<InstallExecuteSequence> 
    <Custom Action="WixCloseApplications" After="InstallInitialize"/> 
</InstallExecuteSequence> 

Fehler in beiden Wix 3.10 und 3.11 Toolsets. Irgendein Vorschlag? Habe auch versucht, die WixCloseApplications Before="InstallValidate" auszuführen. Gleiches Ergebnis.

MSI LogFile: (Zeitstempel abgezogen)

MSI (s) (6C:90) [10:47:42:356]: Doing action: WixCloseApplications 
Action 10:47:42: WixCloseApplications. 
Action start 10:47:42: WixCloseApplications. 
MSI (s) Creating MSIHANDLE (1) of type 790542 for thread 60816 
MSI (s) Invoking remote custom action. DLL: C:\Windows\Installer\MSI95B2.tmp, Entrypoint: WixCloseApplications 
MSI (s) Generating random cookie. 
MSI (s) Created Custom Action Server with PID 57776 (0xE1B0). 
MSI (s) Running as a service. 
MSI (s) Hello, I'm your 32bit Impersonated custom action server. 
MSI (s) Creating MSIHANDLE (2) of type 790541 for thread 60964 
MSI (s) Note: 1: 2205 2: 3: WixCloseApplication 
MSI (s) Note: 1: 2228 2: 3: WixCloseApplication 4: SELECT `WixCloseApplication`, `Target`, `Description`, `Condition`, `Attributes`, `Property`, `TerminateExitCode`, `Timeout` FROM `WixCloseApplication` ORDER BY `Sequence` 
MSI (s) Creating MSIHANDLE (3) of type 790531 for thread 60964 
WixCloseApplications: Error 0x8007064f: failed to open view on database 
MSI (s) Closing MSIHANDLE (3) of type 790531 for thread 60964 
MSI (s) Creating MSIHANDLE (4) of type 790531 for thread 60964 
WixCloseApplications: Error 0x8007064f: failed to open view on WixCloseApplication table 
MSI (s) Closing MSIHANDLE (4) of type 790531 for thread 60964 
MSI (s) Closing MSIHANDLE (2) of type 790541 for thread 60964 
CustomAction WixCloseApplications returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) 
MSI (s) Closing MSIHANDLE (1) of type 790542 for thread 60816 
Action ended 10:47:42: WixCloseApplications. Return value 3. 
MSI (s) Machine policy value 'DisableRollback' is 0 
MSI (s) Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) Calling SRSetRestorePoint API. dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 958, szDescription: "". 
MSI (s) The call to SRSetRestorePoint API succeeded. Returned status: 0. 
MSI (s) Unlocking Server 
Action ended 10:47:42: INSTALL. Return value 3. 
+0

Vergessen zu erwähnen. Ich möchte nichts wie Taskkill oder WixQuietExec verwenden. Ich will die exe nicht töten. Ich möchte nur den Benutzer wissen lassen und dann die Installation beenden. Selbst mit CloseMessage = "yes". Gleiches Ergebnis. –

Antwort

0

Ich glaube, ich habe die Ursache des Problems fand heraus, ich erlebt habe. Wenn ich die vollständigen ClosApplication-Codes in eine <Fragment></Fragment> einfügen, wird das gesamte Code-Fragment übersprungen (einfach wegen fehlender Referenz).

<Fragment> 
    <util:CloseApplication ID="StopNotepad" CloseMessage="no" Target="notepad.exe" RebootPrompt="no"/> 

    <InstallExecuteSequence> 
     <Custom Action="WixCloseApplications" After="InstallInitialize"/> 
    </InstallExecuteSequence> 
</Fragment> 

Das Problem, das ich sah, war etwas anders. Mein Fragment enthält das

<Fragment> 
    <util:CloseApplication ID="StopNotepad" CloseMessage="no" Target="notepad.exe" RebootPrompt="no"/> 
</Fragment> 

Die erforderliche benutzerdefinierte Aktion wurde über eine externe WXI-Datei aufgenommen. Die letzte MSI enthält den Aufruf einer benutzerdefinierten Aktion, aber die Util:CloseApplication Deklaration fehlt. Als Ergebnis konnte der msi implementieren und zu sah ich den seltsamen Eintrag log WixCloseApplications: Error 0x8007064f: failed to open view on database

Lösung besagt: Durch Bewegen des <util:CloseApplication Fragment Code innerhalb des <Product><\Product> oder anderen bestehenden <Fragment>, die einen Verweis auf die Außenwelt hat. Zum Beispiel wird Directory Id= usw. das Problem lösen.

Wenn es keine Möglichkeit gibt, <util:CloseApplication Referenz (die ich nicht bewusst bin) zu enthalten, setzen Sie nicht den <util:CloseApplication Code in einem eigenen Fragment!

Verwandte Themen