Archive: "Windows installer has stopped working" error with silent NSIS install in Vista


"Windows installer has stopped working" error with silent NSIS install in Vista
I have a silent NSIS wrapper which copies my main installer to a temporary directory and then executes it. However, once the main installer has finished, the following error appears:

http://img169.imageshack.us/img169/1...lerstopped.jpg

I have "RequestExecutionLevel admin" at the top of my script, and have also added ClearErrors and SetErrorLevel 0 at the end of the only section in the stub script. The problem still occurs.

It's similar to the problem described here, only a different error.

If I run the main installer (which also has RequestExecutionLevel in it) directly without the Stub, the error does not occur, which leads me to believe it's a problem with the silent install.

Any help would be greatly appreciated, as this problem is driving me nuts.


NSIS isn't a Windows Installer. Are you using that as the caption yourself? The lower case i in installer would lead me to believe that. Either way it would be handy if you posted some code.

Stu


No, it's not named 'Windows installer'. The problem only occurs when I use the stub wrapper, not when I use the main installer (and no, the stub isn't called windows installer either).

I'm actually using the InstStub .exe provided in the cab files example to launch and then delete my main installer, unless the problem is there somewhere.

I'll have to post code when I get back to work as I don't have any on my home computer.


Not sure what InstStub.exe is for but you can easily write a wrapper executable for an MSI with a few lines of code:


Icon ...
OutFile wrapper.exe
SilentInstall silent
SetCompressor /solid lzma

Section
InitPluginsDir
SetOutPath $PLUGINSDIR
File /oname=install.msi some_installer.msi
ExecWait `"$SYSDIR\msiexec.exe" /i install.msi`
SectionEnd

Stu

...

Stu the problem isn't writing the stub, I've done that. The problem is that it causes the error I posted in my first post.


You neglected to mention you were using CABSetup hence my post.

You can identify which executable has crashed by killing one when the crash occurs.

Stu


Ah thanks Stu, I understand now.

The reason I'm using CABSetup is because my installer may be distributed on removable media which may need to be removed mid-installation. The Stub installer copies the main installer to a temporary directory along with the InstStub executable provided in CABSetup, and then executes InstStub. The main installer then runs and is deleted afterwards.

I'm beginning to think the problem is with InstStub and not the wrapper script, since the problem only occurs (or at least appears) after the main installation has completed, and the stub finishes execution shortly after the main installer is run.

The problem cropping up right after the main installer process has completed would make sense if it was InstStub causing the error (and it might also explain the 'Windows installer' title if that is the name used in InstStub).


You can definitely do that without using CABSetup if you want to go that route. Otherwise you should probably get hold of the guy who made CABSetup. If InstStub is an NSIS executable then the cause of the crash is likely to be a plugin it uses more than anything.

Stu


Fixed - the problem was indeed caused by the InstStub.exe file included with CABSetup.

I replaced it with a combination of an AutoIt script and a batch file, since I couldn't figure out how to get either of them to do both an ExecWait and also be capable of self-deletion.