Archive: check and close on startup


check and close on startup
Folks,

i´ve got a little problem right now..

I´d like to check directly after starting the setup, if a special registry key is set.

if not.. then abort the installation and shutdown the installation.

How can i call a function before the mainscreen opened?
" close the setup?
Which commands do i need?


thx
RK1


Function .onInit
readregstr $0 "the reg key to check"
strcmp $0 "value to compare" "action if true" "action if false"
FunctionEnd


That code doesnt work for me it complains about needing 4 parameters when it only has 2

I'm obviously calling it wrong, (only just started trying as I need to get the ColdFusion install directory from the registry)


ReadRegStr $R0 HKLM 'Software\NSIS' ''
use this to get the default key under HKLM\SOFTWARE\NSIS
in this case is the path where NSIS is installed :-)