Archive: Changing INSTDIR


Changing INSTDIR
hello,

I try to change the instdir variable in the leave function of the directory page.
the code:
StrCpy $INSTDIR 'c:\windows'

It works everywhere(.oninit,leave function of components) but not in the leave function of the directory page.

Probably because the page is open.
I need the Sendmessage to change the TextBox of the directory in the page. (Or any other technique)

Thanks


Whatever is in $INSTDIR is set on the directory page, so use StrCpy $INSTDIR "whatever" before you show the directory page (preferably in its PRE function).

-Stu


My goal is to change $INSTDIR AFTER the user changed the directory.I want to put a MessageBox asking the user whether to change it or not.


I see. Try changing it in the PRE function of the page after your directory page.

-Stu


I wanted to do better. I wanted the user to see the changed directory.

The following code does it:
!insertmacro MUI_INNERDIALOG_TEXT 1019 'c:\program files\MyApp' ;of course, you can the directory

Thanks anyway