Old 16th May 2007, 12:59   #1
ronno
Junior Member
 
Join Date: May 2007
Posts: 2
Disable MUI_PAGE_DIRECTORY on runtime?

Hello

I made an installer that checks in the function .onInit if its the first installation or not (update). If its an update, i want to change the title of the MUI_PAGE_WELCOME and the MUI_PAGE_DIRECTORY should not appear. Here's some code:

Function .onInit
ReadRegStr $0 HKLM "Software\${APPNAME}" ""
StrCmp $0 "" firstinstall 0
;change title of MUI_PAGE_WELCOME
;disable MUI_PAGE_DIRECTORY?
firstinstall:
FunctionEnd

Is there any easy way to realize this?

Thanks!
ronno is offline   Reply With Quote
Old 16th May 2007, 13:45   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
You may want to take a look here,

http://nsis.sourceforge.net/Demonstr...Pre_Show_Leave

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 18th May 2007, 07:40   #3
ronno
Junior Member
 
Join Date: May 2007
Posts: 2
Thx a lot. This helped me. Here is my solution:

code:

...
!define MUI_PAGE_CUSTOMFUNCTION_PRE wel_pre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW wel_show
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE dir_pre
!insertmacro MUI_PAGE_DIRECTORY
...

Function wel_pre
StrCmp $isUpdate "0" noUpdInfo
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Settings" "NumFields" "4"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Type" "Label"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Top" "140"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Bottom" "180"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Left" "120"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Right" "315"
WriteINIStr "$PLUGINSDIR\iospecial.ini" "Field 4" "Text" "Information: This is a Update!"

noUpdInfo:
FunctionEnd

Function wel_show
StrCmp $isUpdate "0" noUpdInfo
ReadIniStr $0 "$PLUGINSDIR\iospecial.ini" "Field 4" "HWND"
SetCtlColors $0 "0x000000" "0xFFFFFF"
noUpdInfo:
FunctionEnd

Function dir_pre
StrCmp $isUpdate "0" noabort
Abort
noabort:
FunctionEnd


ronno is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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