Running Julia REPL in administrator mode on Windows automatically

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.

You could make a powershell script with the following:

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:

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


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.

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.

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 which allowed me to successfully build the package I was stuck on (ImageMagick.jl). It has a corresponding PR which is still open as I write this.

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.

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 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.