SourceTree installer can't access c:\programdata\[currentuser]
Asked by Brad Stiff:

I am trying to install SourceTree on Windows 7 as an Administrator. The installer immediately fails saying 'Unable to write to C:\\ProgramData\\\[Current User\].'

\[Current User\] is the login name of the current user.

Strange that the installer, running under Admin privs, would not have access.

More strange is that ProgramData is supposed to be for shared settings across users. Not sure why the installer would be trying to access (create?) a user-specific folder there, rather than using C:\\Users\\\[Current User\]\\AppData\\Local.

Any ideas?


Answers:
author: Ana Retamal
body: Hi Brad! Which version of SourceTree are you trying to install? Can you try with the [newest one](https://blog.sourcetreeapp.com/2017/01/27/sourcetree-for-windows-2-0-is-now-in-beta/) and let me know if this fixes your issue?

Cheers,

Ana

comments: author: Brad Stiff
body: I get the same error with both the 1.10 version and 2.0 versions, running the installer as Administrator.


author: Ana Retamal
body: Hi Brad, that's weird as the installer should be installing SourceTree within C:\\Users\\\[Current User\]\\AppData\\Local directory, and not within C:\\ProgramData\\\[Current User\]. Can you follow these steps?:

1. Uninstall SourceTree
2. Make sure there's nothing at C:\\Users\\\<username\>\\AppData\\Local\\Atlassian. You can delete the directory to be sure.
3. Install SourceTree again using this link <https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.0.19.1.exe> (we need to make sure it's being downloaded from our official site)

Out of curiosity, have you tried installing SourceTree for a different user or on a different computer? Did you get the same problem?

Let us know if this was successful this time!

Regards,

Ana


author: Michel Velthuizen
body: Hi, i have the exact same problem. Your suggestion doesn't work. Deleted everything, even cleaned the registry by hand.

I had 1.9 installed and trying 20.0.20.1 now.


author: minnsey
body: 1. Hi  

   Squirrel.Windows, the installer SourceTree for Windows now uses, attempts to install into %localappdata%, %localappdata%\\SourceTree to be more precise. It has a fallback behaviour, to install into %programdata%, if it fails to install into %localappdata%.  

   It looks like this behaviour is being triggered, the question is why. Can you check for any entries in the Event Viewer or log files in the following locations  
   %localappdata%\\SourceTree  
   %programdata\\Squirrel\*  
   %programdata\\\*\*\\SourceTree\*  

   Thanks


author: Michel Velthuizen
body: Can't find any files or what so ever (event viewer) with sourcetree or squirrel.


author: Michel Velthuizen
body: What to do next?


author: minnsey
body: Hi Michel,  

I can only assume there is a permissions issue.  

Is there a reason you are installing as Administrator, does the install work as a standard user?  

Can I also check what you mean by installing as administrator? I rn as a local Administrator on my local Workstation, and the installer works placing the installed app into %localappdata%. But I'm not on a domain and I don' have any extra permissions set on home folders etc.


author: Michel Velthuizen
body: Hi,

I'm actually the admin within our company. My user is admin (and domain admin) on the PC and tried 'running as' as well.

%localappdata% is set on C:\\users\\m.velthuizen\\AppData\\Local.  
This location is fine and writable but the installer wants to install somewhere else.


author: Michel Velthuizen
body: Hello?! It's been over a month now and support is far to be found! We are paying customers for JIRA/Bitbucket so can you please help us, otherwise we will be forced to look into other software since our business is depending on it!