Share via

Error 5 when trying to install programs

Anonymous
2017-02-15T16:39:15+00:00

First off I have read several posts on here and tried every solution I could find to no avail. 

When I try to install new programs on this computer running Windows 7 I get error 5, "Setup was unable to create the directory" C:/user/[username]/appdata/local/temp/...

I have all permissions to do this, even right clicking and trying to run the installer as admin does not work.

I have run system file checker, performance troubleshooter, I have updated windows and nothing works.

What can I do to fix this?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

19 answers

Sort by: Most helpful
  1. Anonymous
    2017-03-02T21:04:19+00:00

    "There has been no mapping between account name and security-id."

    I never got the promt after typing: takeown /f /t /g everyone:F, I only got the message above.

    This is exactly the same problem as you had before. It seems you need to familiarise yourself with the Swedish account and group names, in this case the group "everyone". This script will tell you what they are. You must save it on your desktop as "Names.vbs". The .vbs extension is essential!

    '--------------------------------------------------------------

    'Get the localised versions of some local user and group names.

    '2.3.2016 FNL

    '--------------------------------------------------------------

    set oFSO = createobject("Scripting.FileSystemObject")

    Set oWshShell = CreateObject("Wscript.Shell")

    sTarget = oWshShell.ExpandEnvironmentStrings("%temp%\Accounts.txt")

    Set oTarget = oFSO.createtextfile(sTarget, true)

    Set oWMIService = GetObject("winmgmts:\.\root\CIMV2") 

    Set cItems = oWMIService.ExecQuery("SELECT * FROM Win32_AccountSID",,48) 

    For Each oItem in cItems 

       sElement = Split(oItem.Element, ":")(1)

       oTarget.WriteLine sElement

    Next

    oTarget.Close

    oWshShell.Run "Notepad.exe """ & sTarget & """", 1, False

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-03-02T16:11:51+00:00

    I did that, at nr 4 I got the message: 

    "There has been no mapping between account name and security-id."

    I never got the promt after typing: takeown /f /t /g everyone:F, I only got the message above.

    Then nothing, no change still can't install new programs on the computer.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-03-01T20:22:20+00:00

    I did not really understand what you suggested that I do in your last message, besides confirming the group name. So I only confirmed it nothing more.

    I get the impression that you never followed my suggestion. Here it is again:

    It seems contradictory that you are allowed to create a file in the temp directory by manual means but not while installing new software. Maybe the following procedure will resolve the problem:

    1. Reboot into Safe Mode.
    2. Click the Start globe and type this:  cmd.exe
    3. Press Ctrl+Shift+Enter, then left-click Run as administrator. You will get a black screen.
    4. Type the following commands exactly and press Enter after each:

    cd  /d  "%temp%"

    cd  ..

    (yes, that's two full stops!)

    takeown  /f  temp  /r

    cacls  temp  /c  /t  /g  everyone:F

    (answer Yes when prompted) 5. Reboot normally and check if this solves the problem. If not, check on a different machine if the problem occurs there too.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-03-01T20:04:17+00:00

    I did not really understand what you suggested that I do in your last message, besides confirming the group name. So I only confirmed it nothing more.

    Was this answer helpful?

    0 comments No comments