Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Deploy SourceTree Enterprise

Hey there,


I am trying to integrate SourceTree into our software deployment cycle and encountered a problem with the current way the SourceTree installer is working.

We are deploying software via a window service that is run as the user "system".

It is not possible for us to install via a system user. The deployment works when it is run as a local user of the machine. 

I think it might be connect to the fact that enviroment variables are not resolved and in turn the installer cannot be unpacked. Sadly the flag "INSTALLDIR" does not resolve the problem for us. 

The second thing that I noticed is that the installer does not return an appropriate %errorlevel%. It always returns "0" and signals that the install was successful.


Hope somebody can help us with that.



1 answer

0 votes
minnsey Atlassian Team Oct 22, 2018


I'm assuming you are using the MSI version of the installer? Can you provide some more details on how you are running it.

I'm guessing overall its because it is trying to install to the c:\program files (x86) folder but the system user isn't a local admin? Hence you are trying to over ride that path using INSTALLDIR?

Thanks for replying

Yes I am using the MSI installer. I am running it as part of a script through msiexec. The user "system" is part of the operating system as explained here. I tried overwriting it because it did not automatically switched it to a useful path. It used the appdata path of system which is "C:\Windows\System32\config\systemprofile\AppData\"



minnsey Atlassian Team Oct 25, 2018


What error do you get? If you run as Admin on a workstation directly,. with your preferred params does it all work?

Hey Michael

Yes the installer does work when run with a normal user that has admin privileges (e.g my user and the Administrator user).

But in my circumstance it is not possible to run the script through another user

minnsey Atlassian Team Nov 07, 2018


I can't suggest a quick fix, but if you can provide some additional context, why you have to use the user, the restrictions it has etc, we can investigate. We do not use SCCM-like tools directly so there may well be some limitations we are not aware of.


Here is some context:

We are using a software called WPKG to deploy software. It is basicly an service that calls a .js file which is on a network share. To not go into detail: This in turn runs commands that are specified on that share (such as msiexec [...]). As per default windows services are run with the local system account. So each following command is executed as system aswell.  

If requested I can hand over a verbose log file. I don't want to post ist here as it is quiet large and contains private information.

Okay I found the problem but for me it does not make a lot of sense:

As specified in the INSTALLDIR global flag it does try to install to "C:\Program Files\Sourcetree". The folder does not exist bevor trying to install it. 

The installer throws an Error (This can only be found in the verbose log of the msiexec itself)  "Error 1303: The installer has insufficient privileges to access this directory"

This comes from the SYSTEM user missing in the NTFS permissions. This should not happen because the script is run in an elevated context so the user is able to write there anyway.

My solution for now is manually creating the appropriate folder and adding the user to the NTFS permissions. After doing that the install will run successfully. 

This should be fixed imo. It is the first msi package which does throw this error.



minnsey Atlassian Team Jan 09, 2019


I've just created to track this.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events