No more problems for directories with a name starting with "error"
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2096 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9892281211
commit
37a03e4fac
5 changed files with 27 additions and 14 deletions
|
@ -15,16 +15,21 @@ FunctionEnd
|
|||
|
||||
Page custom StartMenuGroupSelect ": Start Menu Folder"
|
||||
Function StartMenuGroupSelect
|
||||
Push $R1
|
||||
|
||||
StartMenu::Select /checknoshortcuts "Don't create a start menu folder" /autoadd /lastused $R0 "StartMenu.dll test"
|
||||
Pop $R1
|
||||
|
||||
StrCpy $R2 $R1 5
|
||||
StrCmp $R2 "error" 0 +3
|
||||
StrCmp $R1 "success" success
|
||||
StrCmp $R1 "cancel" done
|
||||
; error
|
||||
MessageBox MB_OK $R1
|
||||
Return
|
||||
StrCpy $R0 $R1 ; got the dir, or cancel, but if it's cancel NSIS will exit and
|
||||
; then we shouldn't care about the value of $R0
|
||||
success:
|
||||
Pop $R0
|
||||
|
||||
done:
|
||||
Pop $R1
|
||||
FunctionEnd
|
||||
|
||||
Page instfiles
|
||||
|
|
|
@ -15,9 +15,12 @@ which is the program group default name, and some more optional parameters:
|
|||
will have > as its first character and you
|
||||
should not create the program group.
|
||||
|
||||
The function pushes the folder selection back to the stack. It does not push the
|
||||
full path but only the selected sub-folder. It's up to you to decide if to put
|
||||
it in the current user or all users start menu.
|
||||
The function pushes "success", "cancel" or an error to the stack. If there was no
|
||||
error and the user didn't press on cancel it will push the selected folder name
|
||||
after "success". If the user checked the no shortcuts checkbox the '>' will be
|
||||
appended to the folder name. The function does not push the full path but only the
|
||||
selected sub-folder. It's up to you to decide if to put it in the current user or
|
||||
all users start menu.
|
||||
|
||||
Look at Example.nsi for an example.
|
||||
|
||||
|
|
|
@ -285,6 +285,7 @@ BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
else *buf = 0;
|
||||
GetWindowText(hwLocation, buf + (*buf ? 1 : 0), MAX_PATH);
|
||||
pushstring(buf);
|
||||
pushstring("success");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue