Archive: Installation Error on Windows 95


Installation Error on Windows 95
I have installed my software using NSIS on Windows ME and Windows 2000 without problem. However, I just tried to install it on Windows 95 and the installer crashes when it attempts to do the following line of code (I think):

CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}" \
"" "$INSTDIR\${MUI_FILE}" 0


I'm not sure even where to begin on this. The only thing I can think of is that the Windows 95 laptop that I'm installing on is not Win32...is that possible (The laptop is extremely old)? If so, how can I check to see if that is the case? Or, does this even matter? Any advice or pointers would be much appreciated!!!!

Edit:
I looked under System Properties, and it says the File System is 32-bit...does that mean it's Win32?

By the way, in case anyone wanted to see the actual installation dump...

H2HINSTALL21B caused an invalid page fault in
module <unknown> at 0000:70bdc4e3.
Registers:
EAX=007baa10 CS=0157 EIP=70bdc4e3 EFLGS=00010246
EBX=0040a530 SS=015f ESP=0100ef84 EBP=0100f5cc
ECX=00409d30 DS=015f ESI=007ba9ac FS=1187
EDX=00000000 ES=015f EDI=007ba9ac GS=10c6
Bytes at CS:EIP:

Stack dump:
70936e4b 007baa10 a0000001 00409d30 7095164e 007ba9ac a0000001 00000001 00409d30 0040a530 0100f148 00000409 bff9d8f3 0100f118 bfc044ca 0100eff7

Thanks for anyone's help!!


Win32 means: all 32-bit Windows platforms (Windows 95, 98, ME, NT4, 2000, XP, 2003). I recently tested my NSIS installer on Windows 95 (including CreateShortcut) and had no problems.

So it should work on Windows 95. Which version of NSIS are you using? Did you recompile?


I'm using NSIS Version 2.0 Beta 4. What do you mean..."recompile"? Do you mean recompile my installation script? If so, the answer is "yes".


Can I supply someone with a link to download my software and try to install it on Windows 95? I'm just wondering if it's my laptop/version of Windows 95, or if it's a problem for others as well. I could try to dumb up the installer so as to only attempt the "Problem" area. Thanks.


What Joost meant to ask is if you have recompiled NSIS itself.

According to the crash message the problem is outside of NSIS code in an unknown module. It's probably a DLL you're trying to register. Try focusing the "dumber" installer on [un]RegDLL instructions if it's not CreateShortcut.

It would be useful for testing if you can generate a ZIP file with a stripped example script (with the DLL in question if it is the cause) that causes the crash.

If your Windows 95 version isn't 32-bit NSIS shouldn't have even started.


I updated my NSIS via the "NSIS Update" option (via CVS - clean copy). Is there something I need to do with "recompiling" NSIS??

I am registering some DLLs, but all my DLLs (VB related) are working fine. I will look into that, however.

Thanks for the help...any other advice would be very helpful!!


I've narrowed my problem down to the following bit of code (Thanks kichik for pointing me in the right direction):


!insertmacro UpgradeDLL "${MY_SYSDIR}SHLWAPI.DLL" "$SYSDIR\SHLWAPI.DLL"
Push $SYSDIR\SHLWAPI.DLL
Call AddSharedDLL


I'm going to look into it a little closer, but does anyone see anything wrong with this????

By the way, it was recommended at one time (by kichik, I believe) to check to make sure that the installing computer has IE 4.0 or greater installed on it (SHLWAPI.DLL is installed with IE 4.0 or greater)...and tell the installing person that the computer must have IE4 in order to install my software. However, I kept the above code active because I didn't want my software to rely on IE4 being installed. The Win95 laptop has IE5.5...but the above lines of code fail!?!?!? If I choose to do the "make sure you have IE 4 or greater" way, do I still need to add a shared value to this dll??? How would my above code change? Can I skip this code entirely if they have IE4 or greater installed? When I uninstall my software, do I remove a shared value on this DLL?

As you can see, I have a lot of questions regarding this. Thanks for everyone's help on this!!!

Although I am far from an expert on system files, you may want to check as to whether you need separate versions of SHLWAPI.DLL depending on what version of Windows your installer is running on.

When installing applications such as Internet Explorer or Microsoft Office (both of which include system file updates), the Microsoft installers install different system files depending on your version of Windows. You may need to also do the same thing with SHLWAPI.DLL.

The first thing you need to find out is whether different versions of SHLWAPI.DLL is installed to different versions of Windows. If so, you'll need to package all of the different versions of SHLWAPI.DLL and only extract the appropriate version depending on the version of Windows your installer is running on.

Ta,
Dave.


Jcagle, my advice was to check for SHLWAPI.dll and if not present require the user to install IE 4 and above. It's far more simpler than checking for the version of Windows and the version of Internet Explorer. By checking the versions you're also assuming you know which versions of Internet Explorer provide SHLWAPI.dll, and you can't be sure of that.

As dajvid said, the Microsoft installer can install different versions of the file for different systems or configurations. It can be Unicode enabled for Windows NT and MBCS for Windows 9x, it could install a certain version for XP that uses new features that are just in XP, etc. If Microsoft didn't supply a redistributable and didn't say it's possible to redistribute the DLL on your own you should probably shouldn't.

In conclusion, the code I'd suggest is:

Function .onInit
IfFileExists $SYSDIR\SHLWAPI.DLL +3
MessageBox MB_OK|MB_ICONSTOP "Required DLL missing, please \
install Internet Explorer 4.0 or above. Bye."
Abort
FunctionEnd


If there are some functions that your program imports from SHLWAPI.dll that are not in all versions of it you should check for its version too and tell the user what to install according to Microsoft supplied information.