Old 3rd December 2014, 11:57   #1
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
NSIS crashes before creating uninstaller

I have made a script for a program installation. The installation process works fine. When the command for uninstaller start executing nsis crashes and no uninstaller is created. Sometimes ti works fine.

Is it a memory problem? Something else?


NSIS version 3.0b1
tsakf is offline   Reply With Quote
Old 3rd December 2014, 14:31   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,275
Does it happen only on a particular version of Windows? Only on a single machine?

Does it happen with something simple like this:

Quote:
Section
WriteUninstaller "$temp\test.exe"
SectionEnd
Section Uninstall
Delete "$temp\test.exe"
SectionEnd
?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th December 2014, 08:24   #3
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
It's not simple as that. The uninstall section has commands to delete files and directories of the installed program.
tsakf is offline   Reply With Quote
Old 4th December 2014, 09:42   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 886
Cool . You didn't answer the question. Write a basic script that shows the problem and we will go from there.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 8th December 2014, 07:48   #5
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
Can I send you the whole script? Basic scripts work fine.
tsakf is offline   Reply With Quote
Old 8th December 2014, 09:50   #6
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 886
Put it up on pastebin.com and I'll take a look, no promises though.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 11th December 2014, 10:43   #7
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
Here it is, http://pastebin.com/MwNCFuZy I just want to know if i've done a nesting or ordering error.
tsakf is offline   Reply With Quote
Old 11th December 2014, 11:38   #8
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,275
Nothing really jumps out at me except the calls to regDll, they will load the .dll in question and execute some code and if this code is buggy it could affect the installer. Try writing the uninstaller before the calls to regDll...

On a unrelated note; "rmDir /r $3" etc in the uninstaller is wrong because those registers will be empty. The comment above "rmDir /r $INSTDIR" is also incorrect...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th December 2014, 22:27   #9
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 886
^^ What he said. WriteUninstaller is part of the install process, not the uninstall process.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 15th December 2014, 10:06   #10
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
Quote:
Originally Posted by Anders View Post
Nothing really jumps out at me except the calls to regDll, they calls to regDll, they will load the .dll in question and execute some code and if this code is buggy it could affect the installer. Try writing the uninstaller before the calls to regDll...


On a unrelated note; "rmDir /r $3" etc in the uninstaller is wrong because those registers will be empty. The comment above "rmDir /r $INSTDIR" is also incorrect...
I'll try to move the regdll down after uninstaller.

The registers are not valid for the uninstall section?

Do I need to set them again, in the uninstaller script?
tsakf is offline   Reply With Quote
Old 15th December 2014, 10:08   #11
tsakf
Junior Member
 
Join Date: Dec 2014
Posts: 6
Quote:
Originally Posted by JasonFriday13 View Post
^^ What he said. WriteUninstaller is part of the install process, not the uninstall process.
OK then, I'll move it before the uninstall section.
tsakf 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