Why "SumatraPDF is running as admin and cannot open files from a non-admin process" error? #2316
Replies: 8 comments 11 replies
-
Will you please tell me how to do that? I have this problem only when trying to use Sumatra to open PDFs from a Web browser. I checked my Sumatra .exe file's Properties, but there's no "Run as Administrator" option to un-check there. (The shortcut I use to run Sumatra manually does have that option, but it's already un-checked.) Is this something that can be done in the Registry? Thanks! |
Beta Was this translation helpful? Give feedback.
-
The funny thing is, when this error occurs in Sumatra, it shows a link that says "Learn more about this error", which points to this page. So why the vague reference to the "Everything" app, etc.? Also, while I do use an Administrator account in Windows 10, I don't have Sumatra's exe set to "Run as an administrator". So why does trying to open a subsequent document in it cause a problem? Am I suddenly less of an "administrator" than I was when I opened the first one? Somehow, Acrobat and Foxit have found a way around this limitation (or didn't have it in the first place). Sumatra's much lighter and simpler, so I'd rather use it—but I'm not sure it's worth the trouble if this can't be improved. If it's really a security precaution of some kind, couldn't there at least be an option to deactivate it? Thanks! |
Beta Was this translation helpful? Give feedback.
-
@Ander3232 |
Beta Was this translation helpful? Give feedback.
-
I met this issue and the scenario is exactly what's mentioned by the author here. |
Beta Was this translation helpful? Give feedback.
-
for me seems solved reinstalling it as normal user,NOT 'Run as admin' |
Beta Was this translation helpful? Give feedback.
-
Can't you set a mutex or a registry entry? I use that myself to allow a new instance of a process to indirectly communicate with an existing instance of the same process. |
Beta Was this translation helpful? Give feedback.
-
What I mean is that you can set a key in HKEY_CURRENT_USER which applications of all levels can access. It's not optimal, but better than an error message box. |
Beta Was this translation helpful? Give feedback.
-
Might using SumatraPDF Portable solve this problem? Edit: Portable |
Beta Was this translation helpful? Give feedback.
-
When you try to open e.g. a PDF file by double-clicking you might see an error message
SumatraPDF is running as admin and cannot open files from a non-admin process
.What does it mean?
Unfortunately this is somewhat complicated and you need to understand several things about Windows and SumatraPDF and how they interact.
On Windows a process can run with elevated administrator privileges. This applies to SumatraPDF as well.
SumatraPDF implements a single process mode, When you try to open a file with
SumatraPDF.exe <path to a file>
and SumatraPDF is already running, we don't start a new process but send path to a file to existing process via Windows mechanism called DDE.For security reasons Windows doesn't allow sending DDE messages from non-admin process to admin process.
When you double-click on a file in e.g. file explorer, what happens under the covers is that Windows simply calls
SumatraPDF.exe <path to a file>
.So when you see this message, likely sequence of events was:
SumatraPDF.exe <path to a file>
in non-admin mode. This non-admin SumatraPDF process needs to send a file path to existing SumatraPDF process via DDE but we can't due to security restrictions implemented by WindowsBut how did SumatraPDF started in admin mode in the first place?
One case is running Everything (a file search app) in admin mode and opening a file in SumatraPDF from Everything.
There are many other ways to start a process in admin mode ( use
Run as administrator
context menu, run from a terminal app running in Admin mode).How to solve it?
Unfortunately the only option is to close the admin SumatraPDF process.
If this is due to Everything, you can re-configure it to run in non-admin mode as described at https://www.voidtools.com/faq/#how_do_i_prevent_the_uac_prompt_when_running_everything
Beta Was this translation helpful? Give feedback.
All reactions