Skip to content
⌘ NSIS Forum Archive

NSIS crashes before creating uninstaller

11 posts

tsakf#

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
Anders#
Does it happen only on a particular version of Windows? Only on a single machine?

Does it happen with something simple like this:

Section
WriteUninstaller "$temp\test.exe"
SectionEnd
Section Uninstall
Delete "$temp\test.exe"
SectionEnd
?
tsakf#
It's not simple as that. The uninstall section has commands to delete files and directories of the installed program.
JasonFriday13#
Cool 😎. You didn't answer the question. Write a basic script that shows the problem and we will go from there.
tsakf#
Here it is, http://pastebin.com/MwNCFuZy I just want to know if i've done a nesting or ordering error.
Anders#
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...
JasonFriday13#
^^ What he said. WriteUninstaller is part of the install process, not the uninstall process.
tsakf#
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#
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.