Stuck in [Administrator] mode
-
Re: Stuck in "Administrator" mode…how to get out?
Hello guys,
just register to post about this issue.
Since yesterday I got that Administrator mode always on.What happens:
- click notepad++ icon to run it and i start in Admin mode (no way to drag & drop files form explorer)
When it happened:
yesterday after manually updating the portable version and installing two xml plugins.- download the portable zip
- overwrote everything in the folder
- run notepad++
- installed npp xml treeview and xml tools
- first install failed because couldn’t download the files thourgh VPN
- suspended VPN, downloaded and installed the plguins
- now it opens only in admin mode
So I deleted everything related to the notepad++ portable version, installed the 32bit one: same result.
Uninstalled the 32bit version and installed the 64bit one: same result.Looked up all reg keys:
- HKEY_CLASSES_ROOT\Applications\notepad++.exe --> runas not present
- HKEY_CURRENT_USER\Software\Classes\Applications\notepad++.ex --> runas not present
- HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store --> notepad++ present
deleted the last entry (the one in AppCompatFlags) and noticed that every time I run notepad++ the entry is back again.
There is no “run as administrator” in the notepad++.exe properties nor on the link (both in compatibility tab and in advanced).
How can I revert it to the normal behavior (i.e.: run as my user and stop Admin mode)?
N.B.: when running in admin mode UAC doesn’t popup asking for admin credential, UAC is totally on. My domain user is NOT in the Administrator group.
Thank in advance,
Best Regards - click notepad++ icon to run it and i start in Admin mode (no way to drag & drop files form explorer)
-
by saying click notepad++ icon, do you mean the notepad++.exe or a
shortcut pointing to notepad++.exe?
If it is a shortcut, can you just delete and recreate it? -
@Ekopalypse
It happens with a shortcut, the taskbar icon and the executable.
I’ve deleted and recreated the shortcut and taskbar icon multiple times to no avail.
Checked if compatibility settings were set to “run as administrator” in all of three, and again on the notepad++.exe after deleting the other two.The version I’ve installed is 7.9.1 (build time Nov 2 2020 01:07:46).
-
@Al ,
You might want to read this thread (https://community.notepad-plus-plus.org/topic/16876/stuck-in-administrator-mode-how-to-get-out), which has a long discussion of being stuck as administrator.
Also, this superuser discussion is about any application getting stuck as administrator – not necessarily specific to Notepad++, but since the “do I run app XXX as administator” is a Windows decision, not a Notepad++ decision, it’s still worth looking into.
-
@PeterJones said in Stuck in [Administrator] mode:
You might want to read this thread
Yes but as the “victim” of that particular thread, I don’t think there was an obvious resolution for me; you know, something you could point your finger at and say “ah ha! change this and you will no longer be stuck”. I believe it was “cured” just by moving to a newer version.
-
@PeterJones that’s exactly the thread I’m replying to with this new thread :)
See my first line: “Re: Stuck in “Administrator” mode…how to get out?”Tried everything in there as reported but nothing worked.
I’ll take a look at your other link in a matter of minutes. -
@PeterJones said in Stuck in [Administrator] mode:
Also, this superuser discussion is about any application getting stuck as administrator – not necessarily specific to Notepad++, but since the “do I run app XXX as administator” is a Windows decision, not a Notepad++ decision, it’s still worth looking into.
Ok, tried it but still not working.
I think that there is a setting/parameter somewhere that force it to run as Administrator.
I don’t know where else to look, searched the whole Register but nothing came up (apart from the already mentioned entry that constantly get added after I delete it and run notepad++). -
@Al ,
Unfortunately, it’s a Windows setting, somewhere, that is likely causing that, and as Notepad++ experts, we aren’t necessarily full Windows superuser/experts as well.
Well, okay, a couple more ideas:
What Plugins do you have installed (? menu, Debug Info, copy from the dialog and paste here) – maybe some plugin interrupts the load and forces Admin mode, or something. Or maybe something interrupted a plugin installation, and Notepad++ got stuck in the “I will run myself with Admin next time so that I can actually do the installation”
Or maybe uninstall Notepad++, remove everything from the registry and
%AppData%
about Notepad++, reboot, and then finally re-install Notepad++. -
@PeterJones said in Stuck in [Administrator] mode:
…reboot, and then finally re-install Notepad++
I’m curious if a portable version would do the same thing regarding admin mode; maybe worth trying before resorting to the larger action of a reinstall?
-
@Alan-Kilborn said in Stuck in [Administrator] mode:
@PeterJones said in Stuck in [Administrator] mode:
…reboot, and then finally re-install Notepad++
I’m curious if a portable version would do the same thing regarding admin mode; maybe worth trying before resorting to the larger action of a reinstall?
It started with the portable version, as described in my very first post.
-
@PeterJones said in Stuck in [Administrator] mode:
@Al ,
Unfortunately, it’s a Windows setting, somewhere, that is likely causing that, and as Notepad++ experts, we aren’t necessarily full Windows superuser/experts as well.
Well, okay, a couple more ideas:
What Plugins do you have installed (? menu, Debug Info, copy from the dialog and paste here) – maybe some plugin interrupts the load and forces Admin mode, or something. Or maybe something interrupted a plugin installation, and Notepad++ got stuck in the “I will run myself with Admin next time so that I can actually do the installation”
Or maybe uninstall Notepad++, remove everything from the registry and
%AppData%
about Notepad++, reboot, and then finally re-install Notepad++.I’ll try your last suggestion.
As said in the first post: it did happen after upgrading the portable version BUT after installing the xml plugins that failed because of the VPN connection (everything is in the first post).Here the info about plugins:
Notepad++ v7.9.1 (64-bit)
Build time : Nov 2 2020 - 01:07:46
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1518
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppXmlTreeviewPlugin.dll XMLTools.dll -
So…got nothing out of it, tried uninstalling, deleting all the reg entries manually and all the related files in
%AppData%
but no success.
It’s in a strange “state”, even the installer of all the versions I tried automatically starts in Admin Mode.
The installers .exe have the UAC shield but no prompt for credentials popup, when I run it a reg key is written underHKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store
with the name of the executable.
Actually the real key for me isHKU\<my user sid>\...
I was not able to find any way to escape this situation, very strange and very sad to have it locked in Admin Mode forever now :(
-
@Al said in Stuck in [Administrator] mode:
I was not able to find any way to escape this situation, very strange and very sad to have it locked in Admin Mode forever now
That was how I felt when it happened to me.
Not being able to drag and drop a file from Explorer was SOOO painful.
I’m sorry to hear about your situation.
It really would be nice to know how some users get into this situation. -
@Alan-Kilborn said in Stuck in [Administrator] mode:
It really would be nice to know how some users get into this situation.
And even nicer to be able to figure out how to reliably get out of the situation.
It might be worth asking on superuser.com – there are more Windows experts available there than there are here, and maybe one of them will be able to help you through the problem. Just don’t be surprised when they ask you to repeat experiments that we or others have already asked. (Also, make sure you link your question to https://superuser.com/questions/547810/how-to-turn-off-always-run-as-administrator-windows-8-10, and say that you tried the suggestions there but they didn’t work.) If you do ask a question there, feel free to drop a link to that question here, so that we can follow that (and to make it easier to point to similar situations in the future.)
-
It really would be nice to know how some users get into this situation.
@PeterJones said in Stuck in [Administrator] mode:
And even nicer to be able to figure out how to reliably get out of the situation.
Well, yes, of course.
It seems that if a root cause for getting in could be determined, it would also point to a way of getting out, but perhaps not.BTW, even though my problems for my daily use of Notepad++ regarding stuck-in-admin somehow resolved themselves so that I am no longer stuck, there are still weird, related things happening on my (I.T.-controlled) PC:
When I build and run the Notepad++ source code (just for fun) I note that the exe that is run from this (under the Visual Studio debugger) is in admin mode:
This is because somehow, for me, Visual Studio is running in admin mode and thus its child process (N++) inherits this. I have been “around the block” looking for ways to NOT run VS as admin, to no avail (much like the OP).
BTW, if I run the generated N++ exe but not under debugger control, I get non-admin mode:
It appears to not be specific to Visual Studio version, because I also have a day-job need to run an older VS, and it always runs as admin as well:
I think I did post about this before in this Community, but since we’re “freshening” the conversation…
But, I’m not going too far with it, as the main “trouble” I’m having now is no longer Notepad++ related. -
@Alan-Kilborn
That’s a new one for me, I also develop in Visual Studio (2019 Professional) but have to run it as an Admin on purpose (e.g.: when I need to query AD with a fleet user, fleet user as Admin rights though).
Never ever had this happen to VS, till now of course…you never know :D -
I made some progress.
If I rename the “notepad++.exe” to something else (e.d.: “_notepad++.exe” or “notepad++_test.exe”) it runs normally.
Even renaming the installer now prompts the UAC.Unfortunately I can’t find any list of executable anywhere in the registry, somewhere there is something that instruct windows to just run it as an admin.
While verifying the AppCompatFlags I noticed that both “_notepad++.exe” and “notepad++_test.exe” are in there and the binary data is different from “notepad++.exe”: tried modifying the latter to be equal to the other two but no success. -
Asked on Super User here: https://superuser.com/questions/1605488/notepad-stuck-in-administrator-mode-no-solution-but-found-a-clue
-
This does not resolve the issue. The application runs as administrator regardless of whether this option is selected for the shortcut or the executable itself.
-
After trying the solution on the superuser discussion linked above, I found a solution to this problem:
- Right-click on the notepad++.exe file, select Properties.
- Click on the Compatibility tab, and select “Run this program in compatibility mode for:” and select “Windows 8”.
- Make sure “Run this program as an administrator” is unchecked.
- Click OK.
However, this work-around was not working when I tried to run Notepad++ via an AutoHotKey shortcut; it still ran as Administrator. So here is another work-around using Windows Task Scheduler:
- Open the Windows Start menu, search for “task scheduler”, and run that.
- Click on the “Task Scheduler Library” item in the tree view on the left.
- Click on the Action menu, then “Create Task…”. Type in a name for your task.
- Under the General tab, click the “Change User or Group…” button.
- Type in “Users” in the “Enter the object name to select” box and click OK.
- Click on the Actions tab, then click on the “New…” button.
- Click on the “Browse…” button, and find your notepad++.exe file and open that.
- Click on the Settings tab and make sure “Allow task to be run on demand” is checked.
- Click OK.
- To make a batch file to run this scheduled task, you can put this command in a text file and name it with a “.bat” extension:
schtasks /run /tn *<name of your task from step 3 here>*