Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 10th February 2007, 20:07   #1
soylentyellow
Junior Member
 
Join Date: Jan 2007
Posts: 19
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:
soylentyellow is offline   Reply With Quote
Old 10th February 2007, 20:39   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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.

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

Last edited by Red Wine; 10th February 2007 at 20:58.
Red Wine is offline   Reply With Quote
Old 12th February 2007, 16:48   #3
soylentyellow
Junior Member
 
Join Date: Jan 2007
Posts: 19
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 >.<
soylentyellow is offline   Reply With Quote
Old 12th February 2007, 17:07   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Well done!
Although they don't harm, you may want to remove a few unnecessary lines of code, e.g.
code:
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


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
Reply
Go Back   Winamp 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