Old 14th April 2005, 12:32   #1
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Post Generate list of files and directories for uninstaller

When your installer include many files for install, it's take much time to write in uninstall section files and directories than will be deleted.

It's script to generate list of files and directories for uninstaller with command line support (/? for help)

Script used headers
Attached Files
File Type: nsi unlist.nsi (3.7 KB, 1014 views)
Instructor is offline   Reply With Quote
Old 22nd April 2005, 19:53   #2
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Uninstaller will remove only unmodified files


Files description:
"unListDate.nsi" - List generator (unListDate.exe) script
"Test.nsi"         - Test script
"TestFiles\*.*"  - Test script files

Scripts used headers
Attached Files
File Type: zip unlistdate.zip (2.8 KB, 710 views)

Last edited by Instructor; 22nd April 2005 at 21:34.
Instructor is offline   Reply With Quote
Old 8th May 2005, 10:54   #3
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"unList" v1.1
"unListDate" v1.1

Changes:
-Cosmetic improvements
-unList command line now based on unListDate

Scripts used headers
Attached Files
File Type: zip unlist+unlistdate.zip (4.7 KB, 730 views)
Instructor is offline   Reply With Quote
Old 19th May 2005, 18:41   #4
JackOfTrades
Junior Member
 
Join Date: May 2005
Location: Pittsbugh, PA, USA
Posts: 1
Send a message via AIM to JackOfTrades
Talking Thanks

I've come to the forums searching for answers a number of times since I started using NSIS. (Love it, btw.)

A number of those times, the answer (and often with useable script as well) has come from Instructor.

I registered just to reply to a particuarly useful post to say thanks.

Jess
JackOfTrades is offline   Reply With Quote
Old 19th May 2005, 20:21   #5
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
You are welcome
Instructor is offline   Reply With Quote
Old 21st July 2005, 09:37   #6
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"unList" v1.2
"unListDate" v1.2

Changes:
1. Code clean up
2. Better errors check
3. Added command line option to turn off MessageBoxes

Attachment with binaries (scripts used headers)
Attached Files
File Type: zip unlist+unlistdate.zip (68.8 KB, 722 views)
Instructor is offline   Reply With Quote
Old 17th September 2005, 22:43   #7
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"unList" v1.3
"unListDate" v1.3

Changes:
-added file filter as command option (Patrick Graf)


P.S.
Patrick I could not send you reply on your e-mail.
Attached Files
File Type: zip unlist+unlistdate.zip (69.7 KB, 697 views)
Instructor is offline   Reply With Quote
Old 29th December 2005, 21:33   #8
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"unList" v1.4

Changes:
-combine unList and unListDate to one script and added /DATE=[0|1] parameter (Matei "Ambient.Impact" Stanca)
Attached Files
File Type: zip unlist.zip (37.1 KB, 706 views)
Instructor is offline   Reply With Quote
Old 10th February 2006, 09:54   #9
guilhem.martin
Junior Member
 
Join Date: May 2005
Location: European Union
Posts: 9
Great job

Hi Instructor,

thank you from a very satisfied user of "UnList"

BR.
guilhem.martin is offline   Reply With Quote
Old 10th February 2006, 13:52   #10
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Greetings guilhem.martin, from a very satisfied developer of "UnList"

"unList" v1.5

Changes:
-updated to support latest version of GetOptions function
Attached Files
File Type: zip unlist.zip (3.4 KB, 903 views)
Instructor is offline   Reply With Quote
Old 11th April 2006, 16:03   #11
Tiemo
Guest
 
Posts: n/a
Lightbulb

'GetTime' should be called using System time instead of local time. Otherwise all files will be ignored after the time has been changed to daylight saving time!

Two lines must be modified therefore:

${GetTime} '$9' 'M' $0 $1 $2 $3 $4 $5 $6

into

${GetTime} '$9' 'MS' $0 $1 $2 $3 $4 $5 $6


and

FileWrite $R4 `$PREFIX$3un.GetTime} "$UNDIR_VAR\$9" "M" $$0 $$1 $$2 $$3 $$4 $$5 $$6$\r$\n`

into

FileWrite $R4 `$PREFIX$3un.GetTime} "$UNDIR_VAR\$9" "MS" $$0 $$1 $$2 $$3 $$4 $$5 $$6$\r$\n`
  Reply With Quote
Old 11th April 2006, 16:38   #12
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Good point
Instructor is offline   Reply With Quote
Old 2nd May 2006, 16:34   #13
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Hi Instructor.

Thank you for this very cool tool. I know some idiots who installed really some products directly into the $ProgramFiles directory. This tool keep these idiots secure on uninstalltion.

PLEASE, Could you announce this wonderful tool on WikiPage of NSIS (http://nsis.sourceforge.net/Category:Related_Software)? Thank you very very much. :-)
dbach is offline   Reply With Quote
Old 8th May 2006, 14:49   #14
eric0000
Junior Member
 
Join Date: May 2006
Posts: 1
Hello

For me this script occasionally neglects to uninstall a file, even though the file has not been modified. The problem occurs because two different values are returned for the file's timestamp.

When unList.exe is run, the line

${GetTime} '$9' 'MS' $0 $1 $2 $3 $4 $5 $6

returns one value for the file's timestamp.

unList.exe then autogenerates the line e.g.

${un.GetTime} "$INSTDIR\Workbooks\Math\primeNumbers.xls" "MS" $0 $1 $2 $3 $4 $5 $6

which runs as part of my uninstaller but when that line runs it returns a timestamp one second into the future, causing the subsequent test

StrCmp "$0/$1/$2-$4:$5:$6" "27/04/2006-15:02:08" 0 +3

to return false.

A quick fix is to exclude seconds from the comparison e.g. in unList.nsi change line

FileWrite $R4 `$PREFIXStrCmp "$$0/$$1/$$2-$$4:$$5:$$6" "$0/$1/$2-$4:$5:$6" 0 +3$\r$\n`

to

FileWrite $R4 `$PREFIXStrCmp "$$0/$$1/$$2-$$4:$$5" "$0/$1/$2-$4:$5" 0 +3$\r$\n`

Regards,
Eric
eric0000 is offline   Reply With Quote
Old 7th June 2008, 10:25   #15
pospec
Senior Member
 
pospec's Avatar
 
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
Hi Instructor!

I have noticed that if I ask unList to create log for empty directory then it:
1) Delete log file, that should be created
2) Doesn't create log file

Is it intension? If it is, then I have another question: Why it doesn't create empty log?
pospec is offline   Reply With Quote
Old 5th March 2019, 22:32   #16
skidaddytn
Junior Member
 
Join Date: Mar 2019
Posts: 1
Sorry to necropost here but since the question of maintaining an auto-manifest for un-installation has come up so much, I thought I would bring this one back to life and also show a patch that I had to make in order to have it work in newer versions of Windows 10.

I've been using this technique by Instructor for years (many thanks) and it recently quit working due to its use of the %userprofile%\appdata\local\temp folder. When files are copied out of here via the script, they now come with some strange ACL file permissions causing failure. Its also important to note that this secondary EXE should be called with "!system" and not "!execute" from your main NSIS script.

Anyhow, here is the needed patch for modern windows 10 if anyone needs it:


--- C:/unListv1_5.nsi Tue Jun 10 17:06:16 2014
+++ C:/unListv1_51.nsi Tue Mar 5 16:10:34 2019
@@ -13 +13,5 @@
-Name "unList v1.5"
+; 3/5/2019 v1.51 Edited to save temp files to working folder instead of $PLUGINSDIR due to
+; permissions issues when copied back to work folder.
+
+
+Name "unList v1.51"
@@ -147,4 +151,7 @@ Function main
- InitPluginsDir
- GetTempFileName $R1 $PLUGINSDIR
- GetTempFileName $R2 $PLUGINSDIR
- GetTempFileName $R3 $PLUGINSDIR
+ ;InitPluginsDir
+ ;GetTempFileName $R1 $PLUGINSDIR
+ ;GetTempFileName $R2 $PLUGINSDIR
+ ;GetTempFileName $R3 $PLUGINSDIR
+ StrCpy $R1 'temp1.txt'
+ StrCpy $R2 'temp2.txt'
+ StrCpy $R3 'temp3.txt'
@@ -177,0 +185,2 @@ Function main
+ Delete '$R1'
+ Delete '$R3'
skidaddytn 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