Archive: HELP! NSIS Installers do not function when launched from Director apps under Win98!!


HELP! NSIS Installers do not function when launched from Director apps under Win98!!
So, we're supposed to Gold Master City of Heroes in, uh, like 12 hours. Our publisher set up a snazzy MacroMedia Director Auto-run that lets you click the "Install the Game" button. Problem is, under Windows 98, no NSIS installer with more than 1 page will function when launched from Director! I get to the install page where you choose a location and it checks how much space is available and the Next or Install button is always greyed out. Running the installer from Explorer works fine.

To top this off, this behavior seems to only exhibit itself when running the installer from a CD or network share (even a writeable one, so it doesn't care about read-only).

I've placed the Director launcher up at http://www.horningabout.com/temp/City_of_Heroes.zip . Download this file to a network share, compile Example2.nsi or MUI/basic.nsi and rename it to Setup.exe in the same folder, run the Director program, click Install, and you'll see that it won't let you actually install.

Please, can someone help me? I'm looking at workarounds at the moment (probaly having my wrapper installer spawn off the actual installer using something other than "Exec" and hope it can detach completely).

This seems like a pretty ugly bug in NSIS somewhere. If any of the devs are available, please help, lest the hundreds of thousands of City of Heroes fans curse my name for choosing NSIS over one of those "reliable and tested" install systems!

Feel free to contact me via ICQ: 435337 or MSN:Wastelnd@hotmail.com or AIM: wasteland777 or Y! Messenger: Wasteland7 if you are NSIS dev and want to help debug this.


Clarification/new info: The installer only fails if the Director program has been closed since the installer was launched (in this case the Director program closes instantly upon launching the installer, since the installer requires the user to switch to a second CD at some point)


Ugh. Maybe this is something you don't even want to deal with (or can't).

I launch the installer through the Director program, the Next> button is greyed out. Hit Back, hit Next, still greyed out. Launch a *new* copy of the Director program. Hit Back, hit Next in the *first* installer I launched, *and now the Next button is no longer greyed out*. What the heck is going on?!? Am I insane? This makes no sense.


Okay, it wasn't anything as crazy as I originally thought it was (fears of Director having a sandbox intercepting files I/O or something insane like that).

The bug appears to be in the function is_valid_instpath() in util.c, the last check in the function appears to be trying to determine if the root of the drive exists, but is actually checking to see if the current working directory on the drive exists, which it is not guaranteed to, like in this case where the current working directory was a temporary folder made by Director that was deleted upon exit.

Changing that line of code to look at "X:\" instead of "X:" fixed the issue and now the installer works on Windows 98 as well. Yay!

My fix was by adding the two lines:
tmp[2]='\\';
tmp[3]=0;
right before the GetFileAttributes() call. Since I'll be the first to admit I know nothing about the NSIS code base (first looked at it today), someone let me know if there's something wrong with that, but it seemed to work fine =).


Thanks for the report. Fixed in latest CVS version. Note that latest CVS version's LZMA implementation doesn't work with Windows 95.

As the directory can be specified using UNC, you should replace your addition with:

addtrailingslash(tmp);
As for:
Ugh. Maybe this is something you don't even want to deal with (or can't).
Don't forget we're not even on the same timezone ;)