Old 19th May 2009, 16:13   #1
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Question Creating two uninstallers in same installer

Hello everyone, i'm new here and need some help already...

Here is the case:
I need to crate an installer, witch include toolbar installer..
My issue is: in both uninstallers, the Welcome title is the same and I wish in each unnistallers show different Titles(main uninstaller show "Program name uninstaller" and toolbar uninstaller show "Toolbar Uninstaller")

What i'm trying to do is create a custom page, and the installer detects if the uninstaller is for program or for toolbar, and show the correct text. But the uninstaller don't show this custom page..

Can someone help me in this case? I'm doing right or exist other way to do this???

Thanks
adum is offline   Reply With Quote
Old 19th May 2009, 17:57   #2
TobbeSweden
Senior Member
 
Join Date: Oct 2006
Posts: 106
Can't you set the window title with something like this?
code:
System::Call 'user32::SetWindowText(i $hwnd, t "title")'
TobbeSweden is offline   Reply With Quote
Old 20th May 2009, 04:59   #3
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
I'm not specific on my question. The title i'm refering is the "Welcome to Program Uninstall Wizard".. In fact i'm need to change every place when "Program" appears and put "Toolbar"..

But thanks for help anyway.. This system call will be useful.
adum is offline   Reply With Quote
Old 20th May 2009, 08:30   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can use a variable in Name or Caption and set that variable in .onInit before any page shows up.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 20th May 2009, 13:39   #5
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Thanks kichik! This way works perfectly!
adum is offline   Reply With Quote
Old 25th June 2009, 15:38   #6
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Hello, it's me again.

I have a new issue, someone can help me?

My script have the follow:
-a function "install_toolbar", where installs the toolbar fileset if the box is checked, and in the end use command writeUninstaller.
-a section "MainProgram", where call a function install_toolbar, install the fileset of software, and use command writeUninstaller.
-a section "Uninstall", where remove software files and shortcuts.

My issue is: Both uninstallers call the same section Uninstall. So, when i execute the software uninstaller, it´s fine. He will remove only software fileset. But when i execute toolbar uninstaller, all files are removed, including software fileset. Is it possible create diferents sections to each uninstaller?

Or have other way to create these uninstallers??
adum is offline   Reply With Quote
Old 25th June 2009, 16:43   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can have multiple uninstall sections instead of one "Uninstall" section. Just put un. in front of section names. You can then add a MUI_UNPAGE_COMPONENTS.

Stu
Afrow UK is offline   Reply With Quote
Old 25th June 2009, 22:21   #8
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Nice, Thanks for reply.

What i'm thinking to do is:
-Create a section un.install_toolbar to remove toolbar fileset.
-Create a section un.MainProgram to remove software fileset(actually it is done on section Uninstall).
-Remove section Uninstall(un.MainProgram will do the work).

So if I create this structure, when i use WriteUninstaller on each Section(install_toolbar and MainProgram), NSIS will create diferents and independents uninstallers? Is it?

And about MUI_UNPAGE_COMPONENTS, how it works? it1s only add this command on script? need any argument?

Sorry ask without test the solution, but i'm at home now, and i havent access of scripts.
adum is offline   Reply With Quote
Old 26th June 2009, 11:52   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can't write multiple uninstallers. You will have one uninstaller with 2 uninstall sections.

Stu
Afrow UK is offline   Reply With Quote
Old 26th June 2009, 12:46   #10
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Now i'm a bit confused.

What I need is 2 independent uninstallers. When i run "Program uninstaller" he will remove the Program fileset only, and when i run "Toolbar uninstaller" he will remove toolbar fileset only.

Is it possible to do? If yes, can you help me a bit?
adum is offline   Reply With Quote
Old 26th June 2009, 14:15   #11
adum
Junior Member
 
Join Date: May 2009
Location: Curitiba, Brazil
Posts: 16
Ok, I have made some tests and now i understand what you say.

So the only way to not run all un. section is using MUI_UNPAGE_COMPONENTS?

What i thinking to do is something like this:
On un.onInit(maybe other place) he checks if uninstaller is toolbar uninstaller or Program unsinstaller and "select" one of the sections to run.

Is it possible? Or without MUI_UNPAGE_COMPONENTS the uninstaller will run all un. sections?
adum is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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