Archive: .NET 2.0 Installer asking to close NSIS setup


.NET 2.0 Installer asking to close NSIS setup
I have a customer using my installer on a Windows XP machine (has Internet Explorer 6.0).

The NSIS installer checks for .NET installed and using NSIS::download, downloads the .NET 2.0 installer and starts the installer running with an ExecWait.

The .NET 2.0 installer goes through an initial step of "Validating Install" and seems to be checking for IE 5.01.

At that point, the .NET 2.0 installer opens a dialog box titled "Files In Use" and suggests that the user stop the NSIS installer program before continuing.

Does NSIS use any files that .NET 2.0 needs to install or having to do with IE?

This doesn't happen on every Windows XP machine that needs 2.0 installed, and I don't have access to this customer's machine.

The code segment that does the download and install is:

Section "" SEC01 ;dotnetfx.exe
SectionIn RO
${If} $NETRegistry == ""
!define DOTNET_URL "http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe"
DetailPrint "Beginning download of latest .NET Framework version."
NSISDL::download ${DOTNET_URL} "$TEMP\dotnetfx.exe"
DetailPrint "Completed download."
Pop $R0
StrCmp $R0 "success" +3
MessageBox MB_OK "Download failed: $R0"
Quit
try_install_again:
DetailPrint "Pausing installation while downloaded .NET Framework installer runs."
ExecWait "$TEMP\dotnetfx.exe"
!insertmacro CheckDotNET
${If} $NETRegistry == ""
MessageBox MB_RETRYCANCEL|MB_DEFBUTTON1 ".NET did not get installed. Do you want to try again?" IDRETRY +2
Abort "You have chosen to cancel the installation."
goto try_install_again
${EndIf}
DetailPrint "Completed .NET Framework install/update. Cleaning temporary files..."
Delete "$TEMP\dotnetfx.exe"
DetailPrint "Completed cleaning temporary files."
${EndIf}
SectionEnd

Thanks for your help.


My guess is that a running proccess on target uses those "Files In Use" files.


The "Files In Use" dialog only listed my NSIS installer as the application that should be stopped. So it seems like that is the only running process that the .NET installer was complaining about.


As far as I know NSIS has nothing to do with this. Besides why this happens only on the specific target? Maybe you should manually unload all loaded plugins by your installer?


It looks like by defualt plugins are unloaded. You have to explicitly say /NOUNLOAD. Are there any others steps I need to do to unload the plugins? Specifically NSISDL and whatever plugin ExecWait uses?


SetPluginUnload is the instruction, I guess you need to try all possible ways just to be sure that the fault is not from your side.
Another thing is to provide your customer with an installer that executes downloaded .Net installer and then quits (no ExecWait) and ask them to once .Net is successfully installed re-run your installer to complete the intallation and drop you a note if worked by this way.


Did you use GetCORVersion to get the installed .NET version? By default, the System plug-in doesn't unload DLLs it calls. For that, you must add ?u to the end of the call line. I've updated my script on the wiki.


Yes, I am using GetCORVersion. I've added the ?u to the call.

Thanks.


Hi soundken,

does the "Thanks" mean you got it working by adding "?u" ?


We were never able to reproduce the problem, so I can't verify that this worked.