Old 25th March 2003, 11:36   #1
DVDK
Registered User
 
Join Date: Feb 2003
Posts: 27
Uninstall check

I have made a modern installer, and now have a question about the uninstall section.

Lets say that my installer includes 3 different sections. The user only installs one of the 3 sections, because he has the needed files that are located in the other 2 sections.

When the user wants to uninstall, then all sections are being uninstalled, but I only want the section he installed with my installer to be uninstalled. How do I do that?
DVDK is offline   Reply With Quote
Old 25th March 2003, 12:36   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Use InstallOptions to create a custom page.

A components page for the uninstaller is on the TODO list.
Joost Verburg is offline   Reply With Quote
Old 25th March 2003, 20:18   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Or save in the registry, an INI file or in a regular file what sections have been selected. To do so just write a certain value at the end of each section and read it in the uninstaller.

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 25th March 2003, 20:23   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
I'll have the same thing, but
When I called the uninstaller, it
delete all the files... installed and NOT installed
and it doesn't return in error ...
so maybe you want like the old fashion way...
Delete all the files ... installed and not installed

Just my opinion


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 25th March 2003, 21:40   #5
DVDK
Registered User
 
Join Date: Feb 2003
Posts: 27
Uninstall check

Yup, also having big trouble still, but also very hard to understand when english is second languges fro me.

But I have maneced to solve the problem meanwhile with som CMD files which are being executed upon uninstall instead. In that way I can control it, but far from optimal.

Its very easy to understand when you read faqs, but the problem sneaks in when all those foreign words comes along.
DVDK is offline   Reply With Quote
Old 26th March 2003, 12:39   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I am sorry but I don't understand how CMD files help you in uninstalling more then one component... What exactly are you trying to do?

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 26th March 2003, 14:06   #7
DVDK
Registered User
 
Join Date: Feb 2003
Posts: 27
CMD

Its because I have made some CMD files for each component, which are being executed after each other upon uninstall.

I want the uninstall section to uninstall the things that where installed by my installer. Lets say that my installer includes:

something.txt
something.exe
someotherthing.exe

Lets say that the user already has someotherthing.exe. He will offcause not install this component again since there is no reason to. But when he execute the uninstaller, will the someotherthing.exe also be uninstalled and I do not want this, since it was not included in the installation.

So the thing I want is that my uninstall section only will uninstall the things the user has included. But I dont know how to make this custom page, since the words are very hard to understand. Do someone have an example of this, since this will make it easier for me to understand.
DVDK is offline   Reply With Quote
Old 26th March 2003, 14:17   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You don't need a custom page for this. All you need to do is remember what the user have installed. You can do this by writing the installed sections into an INI file, the registry or a regular file. Lets take the INI file for example. In the installer you'll have:

PHP Code:
Section 1
  
#install section 1 stuff
  
WriteIniStr $INSTDIR\uninstall.ini comps section1 yes
SectionEnd

Section 2
  
#install section 2 stuff
  
WriteIniStr $INSTDIR\uninstall.ini comps section2 yes
SectionEnd 
In the uninstaller:

PHP Code:
Section uninstall
  ReadIniStr 
$0 $INSTDIR\uninstall.ini comps section1
  StrCmp 
$"yes" 0 dontUninstallSection1
    
# uninstall section1
  
dontUninstallSection1:

  
ReadIniStr $0 $INSTDIR\uninstall.ini comps section2
  StrCmp 
$"yes" 0 dontUninstallSection2
    
# uninstall section2
  
dontUninstallSection2:
SectionEnd 

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 26th March 2003, 14:41   #9
DVDK
Registered User
 
Join Date: Feb 2003
Posts: 27
Nice

Thanks alot. Just what I was looking for. Real easy actually.
DVDK is offline   Reply With Quote
Old 30th July 2003, 10:42   #10
kukymann
Junior Member
 
Join Date: Jul 2003
Posts: 5
Hi, my question is little different.
A user installed section1, section2 and section3. But, what if he wants uninstall only section1 and section3. I thought about Custom page in Uninstall procces, where he selects what section he wants uninstall. It's possible? Or i must wait for A components page?
kukymann is offline   Reply With Quote
Old 30th July 2003, 11:22   #11
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
kukymann, the NSIS Archive has something that seems to do what you want:

"This example demonstrates how to implement Add/Remove functionality in the installer. It operates similar to MS Office installer for example. Unlike conventional NSIS installer it does not only install (upgrade) selected components but also removes unselected components."

http://nsis.sourceforge.net/archive/...php?pageid=298

An example is included so you can see how the idea works.
pengyou is offline   Reply With Quote
Old 30th July 2003, 11:40   #12
kukymann
Junior Member
 
Join Date: Jul 2003
Posts: 5
thx, it's useful ]
kukymann 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