5

I've notepad++ stuck in Administrator mode: stuck in Administrator

Debug info:

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

How it happened:

  1. installed notepad++
  2. launched it
  3. installed two plugins (xml tools and xml treeview) while connected to a VPN
  4. download filed due to VPN
  5. stopped the VPN and installed the plugins again
  6. closed and re-opened notepad++
  7. is now stuck in administrator mode (no UAC prompt)

What I tried:

  1. uninstalling and reinstalling;
  2. uninstalling, cleaning all regkeys(*) that I found for notepad++, reinstalling;
  3. uninstalling, installing different versions (different builds/bit);
  4. checked these keys for runas command:
    • HKEY_CLASSES_ROOT\Applications\notepad++.exe --> runas not present
    • HKEY_CURRENT_USER\Software\Classes\Applications\notepad++.ex --> runas not present
  5. everything in this thread;
  6. everything in this other thread.

Nothing worked.

(*) "Suspicious" regkeys:

  • HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store
  • HKU<my-user-sid>\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatability Assistant\Store

The clue: renaming the executable "notepad++.exe" to "_notepad++.exe" or "notepad++_test.exe" solves the problem entirely and can run it as a normal user.


I suspect that there is a list of "names" that Windows uses to just run something as an Administrator but can't find it anywhere.
Also renaming the installer and running it shows the UAC prompt, with the original name it starts as Administrator without prompting anything.

Any tips/hint?

Thank you in advance!

Zenigata
  • 151

1 Answers1

1

After trying different solutions, I found this worked for me:

  1. Right-click on the notepad++.exe file, select Properties.
  2. Click on the Compatibility tab, and select “Run this program in compatibility mode for:” and select “Windows 8”.
  3. Make sure “Run this program as an administrator” is unchecked.
  4. 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:

  1. Open the Windows Start menu, search for “task scheduler”, and run that.
  2. Click on the “Task Scheduler Library” item in the tree view on the left.
  3. Click on the Action menu, then “Create Task…”. Type in a name for your task.
  4. Under the General tab, click the “Change User or Group…” button.
  5. Type in “Users” in the “Enter the object name to select” box and click OK.
  6. Click on the Actions tab, then click on the “New…” button.
  7. Click on the “Browse…” button, and find your notepad++.exe file and open that.
  8. Click on the Settings tab and make sure “Allow task to be run on demand” is checked.
  9. Click OK.
  10. 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>
    
Ra_Shoe
  • 39
  • 3