问题描述:

I need to find location of Ghostscript on Windows machine during installation of my application.

Ghostscript stores its location in registry.

But it stores its location in different registry keys depending on version of Ghostscript.

gs915w32.exe

HKEY_LOCAL_MACHINE\SOFTWARE\Artifex\GPL Ghostscript\9.15

Default -> C:\Program Files\gs\gs9.15

gs914w64.exe

HKEY_LOCAL_MACHINE\SOFTWARE\Artifex\GPL Ghostscript\9.14

Default -> C:\Program Files\gs\gs9.14

The last part of the key are different - 9.15 vs 9.14.

Is it possible in Wix to get location of Ghostscript if I do not know the last part of the key?

How?

网友答案:

Windows Installer doesn't support this. Java does a similar thing which is a pain. You'll need to write a custom action to enumerate the subkeys and set a property with the result. One concern would be do they allow multiple versions to be installed side by side?

相关阅读:
Top