Archive: autodetect with installdirregkey


autodetect with installdirregkey
hi,
in first sorry my bad english
i search to install patch (mod) for the game final fantasy 7
sin this problem i'm happy a create options to install, image on installer, description...
i want autodetect the directory with regkey

i don't understand how use installdirregkey:
i use seven 64 bit.
and MUI2

my code:
-----------------------------------------------------
;General

;Name and file
Name "FF7 mod patch"
OutFile "FF7 mod patch.exe"

SetCompressor 'lzma'

InstallDir "$PROGRAMFILES\FF7"

;Get installation folder from registry if available
InstallDirRegKey HKLM "SOFTWARE\Square Soft, Inc.\Final Fantasy VII\DataPath" "InstallDir"

;Request application privileges for Windows Vista
RequestExecutionLevel user
-------------------------------------------------------
questions:
DataPath is a REG_SZ who give the directory (c:\programfiles\ff7)
"installdir" after installdireregkey is a fonction for replace "installdir "$programfiles" ??
in Final Fantasy VII existe an other key, is it a problem?
how just verified if my prog detect a regkey?

i try with reg2nsis but its more difficult, i dont want add error possibility
I read many answers about this subject but they don't resolve my problem
(20 hours of try differents codes)
i try read hklm with python too and it d'ont work (but work with hkey current user)

iI'd really like you'll answer me to find a solution. When this probleme will be checked I'll search directory with 2 reg key and select the valdi key because the dir can use 2 different regkey (this and wow6432node...)


You'll have to do it in .onInit instead using SetRegView 64 followed by ReadRegStr $INSTDIR HKLM "SOFTWARE\Square Soft, Inc.\Final Fantasy VII\DataPath" "InstallDir". I suppose InstallDirRegKey could do with an /wow64 switch or something.

Stu