Archive: any ideas...


any ideas...
for why my install button on this custom page that should start another installer on a given drive isnt doing anything? I've been staring at it too long and I don't think I'm trying the right things anymore...



Page custom ShowInTouch InTouch

...

var itdrive

...

Function .onInit
InitPluginsDir
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "InTouch.ini"
...
FunctionEnd

Function ShowInTouch
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "InTouch.ini"
FunctionEnd

Function InTouch
!insertmacro MUI_INSTALLOPTIONS_READ $0 "InTouch.ini" "Settings" "State"
StrCmp $0 0 done ; Next button?
StrCmp $0 1 install ; install button?
Abort ; Return to the page

install:
!insertmacro MUI_INSTALLOPTIONS_READ $itdrive "InTouch.ini" "Field 2" "State"
ExecWait $itdrive\Setup.exe
Abort

done:
FunctionEnd





#Contents of intouch.ini

[Settings]
NumFields=2

[Field 1]
Type=Button
Flags=NOTIFY
Left=40
Top=40
Right=100
Bottom=55
Text=Install InTouch

[Field 2]
Type=DropList
Left=165
Top=40
Right=231
Bottom=169
State=D:
ListItems=A:|B:|C:|D:|E:|F:|G:|H:|I:|J:|K:|L:|M:|N:|O:|P:|Q:|R:|S:|T:|U:|V:|W:|X:|Y:|Z:


I think the problem is with the ini, Settings - NumFields.

EDIT: I don't know, provided that Drive D: exists and file setup.exe also exists for me works fine.


Thanks for taking a look at it.
I got it working, I scripted it to catch when the file isn't even there and pop up a warning.
It wasn't long after that I realised I was trying to use the wrong drive... doh >.<


Well done!
Although they don't harm, you may want to remove a few unnecessary lines of code, e.g.

Function InTouch
!insertmacro MUI_INSTALLOPTIONS_READ $0 "InTouch.ini" "Settings" "State"
StrCmp $0 1 0 done
!insertmacro MUI_INSTALLOPTIONS_READ $itdrive "InTouch.ini" "Field 2" "State"
ExecWait "$itdrive\Setup.exe"
Abort

done:
FunctionEnd