Search code examples
windows-installerwise

Wise: How to install files into a path specified in the registry


I'm writing a .msi using Wise Installer Editor and I want to copy all my files into a directory specified in a registry key.

How can I specify this in Wise?

Thanks in advance,

Ernesto


Solution

  • You can try following:

    1. Assume that on the destination computer you have following registry key: "HKLM\SOFTWARE\Custom" and some value named "directory" which is set to "C:\program files\MyDestinationDirectory"

    2. in the Editor you select: Target System\System Search where you add new Registry Search Type:

      • for Property select: INSTALLDIR (main installation directory)
      • for Operation select: Read directory name from registry
      • Root and Key set to be equal to above registry key ("HKLM\SOFTWARE\Custom")
      • for value name select: "directory"

    So when installation starts, destination directory will be equal to those defined in the registry.

    But there is a catch: the directory must exist; "C:\program files\MyDestinationDirectory" needs to be a valid path.

    Anyway, hope this helps a bit:)