Menu

#942 NSIS Error: Error writing temporary file error

closed-fixed
Anders
General (291)
5
2014-08-13
2009-12-05
No

1. NSIS version is 2.45.
2. Error message: "Error writing temporary file. Make sure your temp folder is valid."

Detailed description:

Our NSIS-based installer is using UAC plugin in order to launch processes at a user level from the installer started with admin level. The UAC plugin requires that user execution level is requested in installer's script, please see following page for more details: http://nsis.sourceforge.net/UAC_plug-in#Supplying_the_necessary_code.

The problem occurs when user downloads the installer to the %TEMP%\Low folder under Windows Vista/Windows 7. The %TEMP%\Low folder has "Low Mandatory Level" option with following flags: OI - object inherit and CI - container inherit, which means that all files and folders created in this directory inherit this settings. Please use an icacls.exe tool provided by Windows Vista/Windows 7 in order to check the integrity level attributes for the application. For our installer we received following attributes:

Setup-2.3.0-2919-IE.exe gemini\user123:(F)
NT AUTHORITY\SYSTEM:(F)
BUILTIN\Administrators:(F)
Mandatory Label\Low Mandatory Level:(I)(NW)

So as shown above our installer downloaded to the %TEMP%\Low folder automatically gains the "Low Mandatory Level" option and when user tries to start the installer the NSIS Error message appears saying "Error writing temporary file. Make sure your temp folder is valid."

We've investigated the problem a little bit deeper. We downloaded and looked into source and it seems that the problem is that NSIS based installer is trying to create the temporary folder in order to copy some of the plugins into it in %TEMP% directory. But the installer which is placed into %TEMP%\Low folder, has "Low Mandatory Level" set and started with user execution level has no permissions to perform this operation which leads to failure.

In our opinion it would be better to make installer unpack all required files under %TEMP%\Low folder when it was started from this directory.

Discussion

  • Amir Szekely

    Amir Szekely - 2009-12-05
    • assigned_to: nobody --> anders_k
     
  • Anders

    Anders - 2013-03-28
    • status: open --> closed-fixed
     

Log in to post a comment.