ok
my selfmade visible required sections works now (wow)
now i want to choose the location in the startmenu after choosing installcomponents
it should be like the components page
on top a free text
bottom the existing entries in programs
in a listbox
maybe an optional extra page ?
but it seems hard to code ...
(for me)
i tried installoptions but dont know how to get the list of the startmenu dirs
is this possible ?
cu
how to choose sm dir
11 posts
Hi crish,
here is a little script which shows the dirctories in $SMPROGRAMS in a listbox with InstallOptions:
Regards,
~ Florian
here is a little script which shows the dirctories in $SMPROGRAMS in a listbox with InstallOptions:
The startmenu.ini looks like this:
Name "Startmenu Install"
OutFile "startmenu.exe"
ShowInstDetails show
InstallDir $PROGRAMFILES\Startmenu
DirText "Choose directory"
ComponentText "Choose components"
AutoCloseWindow false
InstType "Typical"
Section "Required Components"
Call RunStartmenuQuery
SectionEnd
; $8 = DLL
; $7 = ini
Function .onInit
GetTempFileName $8
GetTempFileName $7
File /oname=$8 "InstallOptions.dll"
File /oname=$7 "startmenu.ini"
FunctionEnd
; cleanup on exit.
Function .onInstSuccess
Call Cleanup
FunctionEnd
Function .onInstFailed
Call Cleanup
FunctionEnd
Function .onUserAbort
Call Cleanup
FunctionEnd
Function Cleanup
Delete $8
Delete $7
FunctionEnd
Function RunStartmenuQuery
Push $7
FindFirst $R0 $R1 "$SMPROGRAMS\*"
loop:
StrCmp $R1 "" abort
FileOpen $R2 $R1 r
StrCmp $R2 "" directory loop
directory:
StrCmp $R1 "." next
StrCmp $R1 ".." next
ReadINIStr $R3 $7 "Field 1" "ListItems"
StrCpy $R3 "$R3$R1|"
WriteINIStr $7 "Field 1" "ListItems" $R3
next:
FindNext $R0 $R1
Goto loop
abort:
CallInstDLL $8 dialog
ReadINIStr $R0 $7 "Field 1" State
DetailPrint $R0
FunctionEnd
Hope it helps -
[Settings]
NumFields=1
Title=Startmenu Install
BackEnabled=1
CancelButtonText=Cancel
NextButtonText=Next >
BackButtonText=< Back
[Field 1]
Type=listbox
text=bla
left=0
right=350
top=0
bottom=100
ListItems=
State=
Regards,
~ Florian
😁
ok i'll try this
thanks
ok i'll try this
thanks
small prob
ok this works fine
but only one
if i try to make this a second time (other dialog)
then the installe crashes
maybe this is because of the early state of the dll ?
or is this a bug in nsis ?
ok this works fine
but only one
if i try to make this a second time (other dialog)
then the installe crashes
maybe this is because of the early state of the dll ?
or is this a bug in nsis ?
In order to make two dialogs you need some more advanced code to drive it. If you want, post your script+.ini files here and we'll help you edit them to work.
-Justin
-Justin
Sorry crish, but I couldn't help you without the ini-files you're using ...
~ Florian
~ Florian
the inis (they where ok with the .exe version of installoptions)
startmenu.ini
RebootOptions.ini
InstallOptions.ini
this is all
startmenu.ini
RebootOptions.ini
InstallOptions.ini
this is all
After two-time-checking your scripts (you know why?) I've found the bug in your pms_installer.nsi
The call to InstallOptions.dll in Function Reboot will fail, because your RebootOptions.ini is based on InstallOptions.exe.
Change the lines
~ Florian
The call to InstallOptions.dll in Function Reboot will fail, because your RebootOptions.ini is based on InstallOptions.exe.
Change the lines
Push $TEMP\ui${VER_MAJOR}${VER_MINOR}2.ini
CallInstDLL $TEMP\InstallOptions.dll dialog to ExecWait '"$TEMP\ui${VER_MAJOR}${VER_MINOR}.exe" $TEMP\ui${VER_MAJOR}${VER_MINOR}2.ini' and your installer works.~ Florian
jap
will change this to the dll version
because the exe needs to much time to start ...
u ll see the new inis on the links above
accidently posted the former inis sorry
will change this to the dll version
because the exe needs to much time to start ...
u ll see the new inis on the links above
accidently posted the former inis sorry
YES
it works NOW
BUT i think its a fault in the doku or in the dll
State (optional)
is NOT optional with the state in my ini files it works without it crashes ....
but now i know this and im happy
jetzt kann der wihnachtsmann kommen
cu
and a merry christmas
it works NOW
BUT i think its a fault in the doku or in the dll
State (optional)
is NOT optional with the state in my ini files it works without it crashes ....
but now i know this and im happy
jetzt kann der wihnachtsmann kommen
cu
and a merry christmas