Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st March 2005, 13:51   #1
Pet Gr
Guest
 
Posts: n/a
Problem and doubt

Before I show the installer i use a function in which i check if the program is installed, the user can install all the things but there is no need to have the program installed, but i used an option to run the program on the las page of the installer, how can i disable the run program if it is not installed in the system
Thanks again
Greetings
  Reply With Quote
Old 1st March 2005, 13:53   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,164
Send a message via ICQ to Yathosho
you can write it into a variable whether the program is installed and skip the page. you will find multiple posts on this, searching the forum.
Yathosho is online now   Reply With Quote
Old 1st March 2005, 14:27   #3
Pet_Gr
Guest
 
Posts: n/a
How can i do this, i am a newbie
  Reply With Quote
Old 1st March 2005, 16:43   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
You need to remove the check-box on your finish page then?
You could delete it using:
code:

!define MUI_PAGE_CUSTOMFUNCTION_PRE checkForProg
!insertmacro MUI_PAGE_WELCOME
Function checkForProg
# check if it exists here?
DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field #"
FunctionEnd


However, I don't know which Field number it is. It's probably something like Field 4... You'll have to experiment to get it right.
Obviously, if your program exists, then you don't want to jump over the DeleteINISec command. You can jump over it using StrCmp.
E.g. StrCmp $R0 "1" 0 +2

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 1st March 2005, 21:53   #5
pet_gr
Guest
 
Posts: n/a
It seems not to work it allows me to hide the elements in the last page but i'm not allowed of hide the check box... what can i do?
  Reply With Quote
Old 1st March 2005, 22:52   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,164
Send a message via ICQ to Yathosho
can you paste the affected code-snippet?
Yathosho is online now   Reply With Quote
Old 2nd March 2005, 06:43   #7
Pet_gr
Guest
 
Posts: n/a
The code is the code wrote by AFROW UK, i need to disable the run check box in the last page of the uninstaller, but i can get it disabled, what can i do?
  Reply With Quote
Old 2nd March 2005, 09:13   #8
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,164
Send a message via ICQ to Yathosho
did you insert a number for #?
Yathosho is online now   Reply With Quote
Old 2nd March 2005, 13:23   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
You need to change Field # to e.g. Field 4, like I said. I don't know which Field number it is for your check-box therefore you need to experiment.
If you want to simply disable the run check-box, then change:
DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field #"
...to...
WriteINIStr "$PLUGINSDIR\ioSpecial.ini" "Field #" "Flags" "DISABLED"
Again, change the field number to the right one!

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd March 2005, 13:25   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Ok, it was a good guess. The Field number is infact Field 4.

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd March 2005, 13:33   #11
Pet_gr
Guest
 
Posts: n/a
Lightbulb

I've tried with all the numbers and yes it disable the lateral graphic, the main text,the explain item but the chek box is not disabled by i don't know why...
  Reply With Quote
Old 2nd March 2005, 13:43   #12
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Works for me:
code:

!include MUI.nsh

OutFile testing.exe

!define MUI_FINISHPAGE_RUN "$INSTDIR\testing.exe"
!define MUI_FINISHPAGE_TEXT "Run me!"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_PRE "disable"
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE English

Function disable
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" "Disabled"
FunctionEnd

Section
SectionEnd



Are you using the latest version of NSIS?

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 2nd March 2005, 14:08   #13
Pet_Gr
Guest
 
Posts: n/a
This worked fine for me! the older one that you wrote here not!!!
Thanks
  Reply With Quote
Old 2nd March 2005, 16:35   #14
Pet_Gr
Guest
 
Posts: n/a
Sorry but i need some improvements on this, now i've had it disabled but it's checked so the installer tries to launch the software, now how can i uncheck it?
Greetings
Pedro Garcia Rodriguez
  Reply With Quote
Old 2nd March 2005, 18:02   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Use !define MUI_FINISHPAGE_RUN_NOTCHECKED

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 3rd March 2005, 10:29   #16
Pet_Gr
Guest
 
Posts: n/a
I love this guy, I love you... you are ta man!!!
Thanks for share your invaluable knowledge
  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