• Login
Community
  • Login

Changing into Admin mode removes all changes

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 765 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    Anders Eriksson22
    last edited by Sep 4, 2019, 12:50 PM

    If I edit a file in e.g. Program files, then when it comes to save it I get an error:

    Save failed

    The file cannot be saved and it may be protected.
    Do you want to launch Notepad++ in Administrator mode?

    Answering Yes, will set Notepad++ to Administrator mode AND restore the document to the state it had before I changed it!!!

    So I have to start over and make the changes again :-(

    Is this a bug, working as designed or do I have have to configure something?

    // Anders

    Notepad++ v7.7.1 (32-bit)
    Build time : Jun 16 2019 - 21:14:50
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Admin mode : OFF (before I try to save, it is set to ON after I have answered yes to the question…)
    Local Conf mode : OFF
    OS : Windows 10 (64-bit)
    Plugins : ComparePlugin.dll DSpellCheck.dll JSMinNPP.dll mimeTools.dll NppConverter.dll NppExport.dll NppTextFX.dll XMLTools.dll

    D 1 Reply Last reply Sep 5, 2019, 10:14 AM Reply Quote 0
    • R
      rinku singh
      last edited by Sep 4, 2019, 2:37 PM

      but after admin mode npp open in new instance window did you notice that

      1 Reply Last reply Reply Quote 0
      • D
        dinkumoil @Anders Eriksson22
        last edited by Sep 5, 2019, 10:14 AM

        @Anders-Eriksson22

        There is a plugin named NppSaveAsAdmin which has been developed especially for your use case. It is available via PluginsAdmin.

        Instead of launching a new instance of Notepad++ in admin mode (which causes the data loss you described) it starts code from a companion DLL file in admin mode which saves your document to the desired location.

        1 Reply Last reply Reply Quote 3
        • A
          Anders Eriksson22
          last edited by Sep 10, 2019, 10:19 AM

          Thanks for the tip of NppSaveAsAdmin . It was not available from the PluginsAdmin, but I downloaded it from SourceForge

          Works perfectly!!

          One problem less…

          // Anders

          1 Reply Last reply Reply Quote 3
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors