Sublime Forum

SublimeText3 as admin on windows 10

#1

When I have a currently open instance of SublimeText3, and open a file that is set to open with sublimetext3, the file will open in a new tab in my existing window of sublime text 3.

But if I open an instance of sublime text 3 with “Run as administrator” in Windows 10, when I click to open new files that are set to use SublimeText3 as the default program, the file will just not open at all. Sublime text3 will remain blank and the file will not open.

Is there a solution to this?

1 Like

Non elevated subl does not open a file if the existing sublime_text process is elevated on windows
#2

If you application is not an administrator, seems it cannot affect Sublime Text as administrador.
Therefore just to run all applications as Administrador.

If you are from the Windows Explorer, close it and run it as administrator. But not that doing it will cause to all programs opened from this Windows Explorer to run on administrator mode.

0 Likes

#3

Would be nice if Sublime handled this in the same way Notepad++ does. When you attempt to save a file in a folder where Administrator privilege is needed you are offered to re-start Notepad++ in Administrator mode. (No changes are lost BTW.)
As described here.

1 Like

#4

At least on Linux, when you attempt to save a file where sudo privileges are required, it prompt for you sudo password, so you do not need to restart sublime or close the file or nothing. You just save it right away after typing the password.

I tried that you did with notepad++. I opened the C:\Windows\System32\drivers\etc\hosts as a normal user, then it prompted to open as administrator, but it was different than Sublime Text do in Linux, as it opened a new notepad++ window, instead of reuse the current window. So you still need to copy the changes from one window to the other.

0 Likes

#5
2 Likes