Old 15th February 2007, 08:06   #1
sebarnolds
Junior Member
 
Join Date: Jul 2006
Posts: 14
~nsu.tmp directory in $TEMP

Hi.

I noticed something strange about the uninstaller. When I run it, it copies itself to "$TEMP\~nsu.tmp\Au_.exe", run it and exit itself. By doing so it allows the removal of the "official" uninstaller executable.

I noticed that the "$TEMP\~nsu.tmp\Au_.exe" file is only removed after reboot. However the "$TEMP\~nsu.tmp" directory is not removed. Is it normal ? I guess it shouldn't be too annoying to stay with an empty temp directory but it would be much cleaner to delete it.

Any idea / remarks about this ?

Thanks,
Sebastien
sebarnolds is offline   Reply With Quote
Old 15th February 2007, 08:16   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
This is the way that uninstaller is programed to operate, not a big deal I guess leaving an empty dir into $TEMP.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 15th February 2007, 08:18   #3
sebarnolds
Junior Member
 
Join Date: Jul 2006
Posts: 14
Yeah, but it would be cleaner if the uninstaller copied itself to something like "$TEMP\$name.exe" instead of in a directory of his own... where $name is the result of a call to GetTempFileName. No ?

Sebastien
sebarnolds is offline   Reply With Quote
Old 15th February 2007, 08:37   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
I couldn't say, being open source, NSIS offers abilities to modify it in the way it suits your needs, moreover if you have added a feature yourself, you can post the source code in the patch tracker,
http://sourceforge.net/tracker/?atid...49&func=browse

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 15th February 2007, 08:59   #5
sebarnolds
Junior Member
 
Join Date: Jul 2006
Posts: 14
Maybe we could have some input from NSIS developers as the case may have been thought and they could have thought of potential problems with that approach ?

Sebastien
sebarnolds is offline   Reply With Quote
Old 15th February 2007, 10:53   #6
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Quote:
Originally posted by sebarnolds
Yeah, but it would be cleaner if the uninstaller copied itself to something like "$TEMP\$name.exe" instead of in a directory of his own... where $name is the result of a call to GetTempFileName. No ?

Sebastien
In older NSIS versions it worked just like that. I don't know why it was changed, but I bet there is a reason for it.
{_trueparuex^} is offline   Reply With Quote
Old 15th February 2007, 10:56   #7
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
Yes there is a reason for it. From top of my head I do not recall why, only I remember was involved back then in some scenario's that benefited having a separate directory.

"Just do it"
onad is offline   Reply With Quote
Old 15th February 2007, 11:38   #8
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
From the Changelog for NSIS 2.08 (released on July 23rd, 2005):

Made uninstallers copy themselves into a subdirectory of the temporary directory to avoid DLLs left in the temporary directory from being loaded by the uninstaller (patch #1214319)
pengyou is offline   Reply With Quote
Old 15th February 2007, 12:52   #9
sebarnolds
Junior Member
 
Join Date: Jul 2006
Posts: 14
Hey.

Yeah, thanks for your remarks.

I wrote a patch to remove the directory too. The description can be found here :
https://sourceforge.net/tracker/?func=detail&atid=373087&aid=1660626&group_id=22049

Hope it will be useful,
Sebastien
sebarnolds 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