Advanced Uninstall Log NSIS Header: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Advanced Uninstall Log for NSIS was born in the need to cover a specific gap.<br> | Advanced Uninstall Log for NSIS was born in the need to cover a specific gap.<br> | ||
It's been discussed fairly enough that the File /r command is very useful | It's been discussed fairly enough that the File /r command is very useful | ||
in cases when developers want to add a huge amount of sub directories and | in cases when developers want to add a huge amount of sub directories and | ||
files, nevertheless it has the disadvantage that such an installation should | files, nevertheless it has the disadvantage that such an installation should | ||
be uninstalled with RmDir /r which is risky and removes also data that has | be uninstalled with RmDir /r which is risky and removes also data that has | ||
been added/created later within the installation folder.<br> | been added/created later within the installation folder.<br> | ||
== About Advanced Uninstall Log == | == About Advanced Uninstall Log == | ||
Advanced Uninstall Log is a macro system provided in a NSIS header that | Advanced Uninstall Log is a macro system provided in a NSIS header that | ||
is able to monitor an installation and build an uninstall log file which | is able to monitor an installation and build an uninstall log file which | ||
is used by the uninstaller to uninstall files/directories that have been | is used by the uninstaller to uninstall files/directories that have been | ||
added within specific installation blocks.<br> | added within specific installation blocks.<br> | ||
<br> | <br> | ||
This means that files which have been installed outside these blocks, | This means that files which have been installed outside these blocks, | ||
or added later either by the user or application's activities, ignored | or added later either by the user or application's activities, ignored | ||
by the uninstaller.<br> | by the uninstaller.<br> | ||
<br> | <br> | ||
Moreover files that might exist into the target directory prior the current | Moreover files that might exist into the target directory prior the current | ||
installation, ignored as well.<br> | installation, ignored as well.<br> | ||
<br> | <br> | ||
Advanced Uninstall Log creates an uninstall log that removes only files that | Advanced Uninstall Log creates an uninstall log that removes only files that | ||
have been installed and optionally interacts with users for every other file | have been installed and optionally interacts with users for every other file | ||
and/or directory has found in installation folder and requires permission to | and/or directory has found in installation folder and requires permission to | ||
remove these files/directories.<br> | remove these files/directories.<br> | ||
<br> | <br> | ||
It is enhanced as well to support updates, e.g. if the installer later would | It is enhanced as well to support updates, e.g. if the installer later would | ||
update the installation by adding new data, the uninstaller would remove the | update the installation by adding new data, the uninstaller would remove the | ||
new data that has been added by the installer, without bothering users about. | new data that has been added by the installer, without bothering users about. | ||
== Features == | == Features == | ||
If target installation folder exists and contains files and/or directories | If target installation folder exists and contains files and/or directories | ||
they all preserved from being uninstalled.<br> | they all preserved from being uninstalled.<br> | ||
<br> | <br> | ||
Uninstaller removes data that has been added within specific installation | Uninstaller removes data that has been added within specific installation | ||
blocks, preserving all other data that has been created/added outside of | blocks, preserving all other data that has been created/added outside of | ||
these installation blocks. See included examples for details.<br> | these installation blocks. See included examples for details.<br> | ||
<br> | <br> | ||
Supports unlimited updates/reinstallations.<br> | Supports unlimited updates/reinstallations.<br> | ||
<br> | <br> | ||
Supports two uninstaller modes. Interactive mode requires confirmation | Supports two uninstaller modes. Interactive mode requires confirmation | ||
to remove every other file exept those files that have been installed. | to remove every other file exept those files that have been installed. | ||
Unattended mode leaves intact every other file without bothering users. | Unattended mode leaves intact every other file without bothering users. | ||
<br> | <br> | ||
In case when uninstall log (uninstall.dat) has been removed manually instead | In case when uninstall log (uninstall.dat) has been removed manually instead | ||
of execute uninstaller, if users attempt to run the installer later, a warning | of execute uninstaller, if users attempt to run the installer later, a warning | ||
issued that they should select a new output folder.<br> | issued that they should select a new output folder.<br> | ||
<br> | <br> | ||
Implements only the included with NSIS release headers FileFunc and TextFunc. | Implements only the included with NSIS release headers FileFunc and TextFunc. | ||
There is no need for external plugins and headers, adds a very small overhead. | There is no need for external plugins and headers, adds a very small overhead. | ||
Line 65: | Line 59: | ||
If uninstall log (uninstall.dat) is missing uninstaller won't execute at all.<br> | If uninstall log (uninstall.dat) is missing uninstaller won't execute at all.<br> | ||
<br> | |||
Due to file create - write procedure that is required in order to add/update | Due to file create - write procedure that is required in order to add/update | ||
the uninstall log (uninstall.dat), restricted users on NT based systems won't | the uninstall log (uninstall.dat), restricted users on NT based systems won't | ||
be able to execute the installer.<br> | be able to execute the installer.<br> | ||
== Disadvantage == | == Disadvantage == | ||
Since the header does not implement anything else than the common NSIS release, | Since the header does not implement anything else than the common NSIS release, | ||
a delay occurs while builds and reads the uninstall log because it needs to | a delay occurs while builds and reads the uninstall log because it needs to | ||
throw the list several times. Talking for common cases, most likely the delay | throw the list several times. Talking for common cases, most likely the delay | ||
won't be noticeable, however, in cases where the target directory isn't empty | won't be noticeable, however, in cases where the target directory isn't empty | ||
and contains a large amount of data which will be excluded from uninstall log, | and contains a large amount of data which will be excluded from uninstall log, | ||
or added large amount of data after the installation which will be excluded also, | or added large amount of data after the installation which will be excluded also, | ||
the delay should be noticeable.<br> | the delay should be noticeable.<br> | ||
Line 89: | Line 79: | ||
A very big thanks goes to [User:kichik].<br> | A very big thanks goes to [User:kichik].<br> | ||
When my idea of the Advanced Uninstall Log became an NSIS header, it was | When my idea of the Advanced Uninstall Log became an NSIS header, it was | ||
indeed an amateur's attempt to write a flexible and errors free NSIS header. | indeed an amateur's attempt to write a flexible and errors free NSIS header. | ||
Kichik dropped me a dozen of suggestions helping me to achieve my plan. | Kichik dropped me a dozen of suggestions helping me to achieve my plan. | ||
However, his main suggestion to eliminate the mentioned above disadvantage, | However, his main suggestion to eliminate the mentioned above disadvantage, | ||
still remains untouched by me.<br> | still remains untouched by me.<br> | ||
Revision as of 12:19, 3 February 2007
Overview
Advanced Uninstall Log for NSIS was born in the need to cover a specific gap.
It's been discussed fairly enough that the File /r command is very useful
in cases when developers want to add a huge amount of sub directories and
files, nevertheless it has the disadvantage that such an installation should
be uninstalled with RmDir /r which is risky and removes also data that has
been added/created later within the installation folder.
About Advanced Uninstall Log
Advanced Uninstall Log is a macro system provided in a NSIS header that
is able to monitor an installation and build an uninstall log file which
is used by the uninstaller to uninstall files/directories that have been
added within specific installation blocks.
This means that files which have been installed outside these blocks,
or added later either by the user or application's activities, ignored
by the uninstaller.
Moreover files that might exist into the target directory prior the current
installation, ignored as well.
Advanced Uninstall Log creates an uninstall log that removes only files that
have been installed and optionally interacts with users for every other file
and/or directory has found in installation folder and requires permission to
remove these files/directories.
It is enhanced as well to support updates, e.g. if the installer later would
update the installation by adding new data, the uninstaller would remove the
new data that has been added by the installer, without bothering users about.
Features
If target installation folder exists and contains files and/or directories
they all preserved from being uninstalled.
Uninstaller removes data that has been added within specific installation
blocks, preserving all other data that has been created/added outside of
these installation blocks. See included examples for details.
Supports unlimited updates/reinstallations.
Supports two uninstaller modes. Interactive mode requires confirmation
to remove every other file exept those files that have been installed.
Unattended mode leaves intact every other file without bothering users.
In case when uninstall log (uninstall.dat) has been removed manually instead
of execute uninstaller, if users attempt to run the installer later, a warning
issued that they should select a new output folder.
Implements only the included with NSIS release headers FileFunc and TextFunc.
There is no need for external plugins and headers, adds a very small overhead.
Restrictions
If uninstall log (uninstall.dat) is missing uninstaller won't execute at all.
Due to file create - write procedure that is required in order to add/update
the uninstall log (uninstall.dat), restricted users on NT based systems won't
be able to execute the installer.
Disadvantage
Since the header does not implement anything else than the common NSIS release,
a delay occurs while builds and reads the uninstall log because it needs to
throw the list several times. Talking for common cases, most likely the delay
won't be noticeable, however, in cases where the target directory isn't empty
and contains a large amount of data which will be excluded from uninstall log,
or added large amount of data after the installation which will be excluded also,
the delay should be noticeable.
Credits
A very big thanks goes to [User:kichik].
When my idea of the Advanced Uninstall Log became an NSIS header, it was
indeed an amateur's attempt to write a flexible and errors free NSIS header.
Kichik dropped me a dozen of suggestions helping me to achieve my plan.
However, his main suggestion to eliminate the mentioned above disadvantage,
still remains untouched by me.
License
This header file is provided 'as-is', without any express or implied warranty.
In no event will the author be held liable for any damages arising from the use
of this header file.
Permission is granted to anyone to use this header file for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this header file must not be misrepresented;
you must not claim that you wrote the original header file.
If you use this header file in a product, an acknowledgment in
the product documentation would be appreciated but is not required.
2. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original header file.
3. This notice may not be removed or altered from any distribution.