Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 13th May 2012, 11:03   #1
letunerfou
Junior Member
 
Join Date: May 2012
Posts: 1
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...)
letunerfou is offline   Reply With Quote
Old 13th May 2012, 13:54   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump