Thursday, 15 March 2012

Inno Setup, show a msgbox on the folder selection step -



Inno Setup, show a msgbox on the folder selection step -

i trying display message box when user reach folder selection page, here actual code display message box @ origin of setup:

[code] var applicationpath: string; function getapppath(param: string): string; begin regquerystringvalue(hklm, 'software\xxx\xxx', 'install dir', applicationpath) if applicationpath = '' begin msgbox('install folder non found', mberror, mb_ok); result:=applicationpath; end else msgbox('install folder found in "' + applicationpath + '". note: close programme before proceeding.', mbinformation, mb_ok); result:=applicationpath; end; end.

i need like:

if (pageid = wpselectdir) then... [run above code]

but don't know how, help.

the ideal event curpagechanged. can utilize way run code, when select directory page shown:

[code] procedure curpagechanged(curpageid: integer); var apppath: string; begin if (curpageid = wpselectdir) begin // query string value in registry; if succeed , // value read, message box success shown, otherwise // error message box failure shown if regquerystringvalue(hklm, 'software\xxx\xxx', 'install dir', apppath) msgbox('installation folder found...', mbinformation, mb_ok) else msgbox('installation folder not found...', mberror, mb_ok); end; end;

inno-setup

No comments:

Post a Comment