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.
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\"
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.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events