Old 22nd November 2012, 10:34   #1
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
NSIS Error in uninstaller

When I was playing around with the problem in this thread, I ran into something rather strange.

Code:

outfile "d:\test.exe"
page instfiles
UninstPage instfiles

section
writeuninstaller "d:\untest.exe"
sectionend

Section "Uninstall"
MessageBox MB_OK "Working"
SectionEnd

The installer works fine, but the generated uninstaller throws an NSIS Error ("Error launching installer"). Using NSIS 2.46 and NSIS 2.46-Unicode. Can anyone reproduce?


Edit: Moving untest.txt to a d:\subdir, the uninstaller works fine. This could suggest a permissions issue, but what could the uninstaller be trying to do that would lead to a CRC error?
Some details: The Authenticated Users group has everything except Full Control on d:\, while the Users group has only 'read & execute', 'list folder contents' and 'read' access. I'm logged in as a userlevel user.

Another thing I can imagine is a backslashes issue, something like trying and failing to access d:untest.exe.
MSG is offline   Reply With Quote
Old 29th November 2012, 15:40   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
allowrootdirinstall true

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th November 2012, 07:38   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Indeed. I'm filing this one as a bug though, because the manual strongly suggests this command is only related to the directory page. In any case, this should not cause the uninstaller to fail launch.
MSG is offline   Reply With Quote
Old 30th November 2012, 08:03   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
How will the uninstaller end up in the root if the user cannot install there? I'm thinking this is by design. (The uninstaller specific startup code checks the path on purpose)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th November 2012, 09:01   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
The problem isn't coming up with crazy installation scenarios where the uninstaller might end up in root. If I don't even have a directory page to begin with, and installation to a root proceeds just fine, how am I supposed to realize that uninstallation from a root is not possible without allowrootdirinstall? The problem is that the uninstaller doesn't throw any recognizable error, and fails to launch completely. If it's hardwired to disallow root uninstall, it should say that instead of 'NSIS Error'.
MSG 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