# Running Julia REPL in administrator mode on Windows automatically

**URL:** <https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018>\
**Category:** New to Julia\
**Created:** [January 24, 2019, 5:42am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018 "2019-01-24T05:42:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [January 24, 2019, 5:42am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/1 "2019-01-24T05:42:40Z")

</div>

In order to install [some] packages successfully on Windows, Julia REPL has to be run in administrator mode or bad things will happen, e.g. unrecoverable (for mere mortals) Cairo installation problems. Is there a way to configure the REPL to always start in administrator mode? Alternatively, the installer could pop a message box asking for administrator approval, when needed.

---

<div class="post-metadata">

**Author:** ![alandion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alandion/32/5591_2.png) [@alandion](https://discourse.julialang.org/u/alandion)\
**Post date:** [January 24, 2019, 6:51am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/2 "2019-01-24T06:51:57Z")

</div>

You could make a powershell script with the following:

```julia
Start-Process -FilePath powershell.exe -ArgumentList 'julia.exe' -verb RunAs

```

call it “julia.ps1”, and put the script in a directory which precedes the location of “julia.exe” in your path. Then typing “julia” will prompt for admin rights, and open julia in a new terminal

For the Cairo installation problems, perhaps this is an issue with symlinks requiring admin rights? If so, enabling developer mode may help:

[https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/](https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/)

I have developer mode enabled, and have been running julia in windows 10 with no problems.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [January 24, 2019, 8:58am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/3 "2019-01-24T08:58:05Z")

</div>

Thanks for the script.

Cairo installs just fine in administrator mode on Windows 10. I just forgot about starting REPL in administrator mode on Windows 7 box and made a mess there.

---

<div class="post-metadata">

**Author:** ![Simon\_Spagnol](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simon_spagnol/32/7870_2.png) [@Simon\_Spagnol](https://discourse.julialang.org/u/Simon_Spagnol)\
**Post date:** [January 25, 2019, 7:36am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/4 "2019-01-25T07:36:34Z")

</div>

Is there any way remove the requirement to be in administrator mode in Windows 10. By default in our corporate environment the local user isn’t be default a member of the Administrators Group.

---

<div class="post-metadata">

**Author:** ![mwolters](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mwolters/32/8696_2.png) [@mwolters](https://discourse.julialang.org/u/mwolters)\
**Post date:** [June 1, 2019, 2:09pm UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/5 "2019-06-01T14:09:46Z")

</div>

I’m having the same problem with the need for administrator rights causing me big headaches with using Julia at work. I’ve had to start a possibly months-long approval process to get Julia on some list. Even after that I will have to call IT support any time I need to install a package that needs elevated privileges.

Is there any workaround (or solution) for this problem at this point? I believe there are a number of important packages that require the extra rights to install.

**Edit:** I came upon [this workaround](https://github.com/JuliaIO/ImageMagick.jl/issues/133#issuecomment-493090495) which allowed me to successfully build the package I was stuck on (ImageMagick.jl). It has a corresponding [PR](https://github.com/JuliaPackaging/BinaryProvider.jl/pull/163) which is still open as I write this.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 3, 2019, 6:05am UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/6 "2019-06-03T06:05:16Z")

</div>

> [@mwolters](#):
>
> Is there any workaround (or solution) for this problem at this point? I believe there are a number of important packages that require the extra rights to install.

On Linux one can install everything in the home directory (even if that’s usually the most complicated route, and totally unnecessary if something is packaged), so I am wondering if on Windows WSL could provide a solution.

---

<div class="post-metadata">

**Author:** ![Jordan\_Cluts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jordan_cluts/32/13753_2.png) [@Jordan\_Cluts](https://discourse.julialang.org/u/Jordan_Cluts)\
**Post date:** [June 3, 2019, 1:05pm UTC](https://discourse.julialang.org/t/running-julia-repl-in-administrator-mode-on-windows-automatically/20018/7 "2019-06-03T13:05:37Z")

</div>

Windows WSL requires admin rights to operate as well (or atleast to initially install). So in the situation where you have WSL setup it may help but is not a general solution. I believe [this](https://github.com/JuliaPackaging/BinaryProvider.jl/pull/163) pr to BinaryProvider.jl is attempting to remedy the problem for some situations. (In particular here it’s attempting to fix the issue preventing ImageMagick from being installed on Windows without admin). I don’t know if the Cairo issue is also a symlink problem though.
