• Login
Community
  • Login

Running as admin doesn't load previously open files

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
multiple usersbug maybedomain
4 Posts 3 Posters 1.1k 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.
  • P
    Peter Row
    last edited by Dec 12, 2018, 9:25 AM

    Background
    Notepad++ 7.5.9, running on Windows 10 Enterprise Oct 2018 (1809, Build 17763.168), connected to a domain, configured to allow multiple instances to run. Logged in with a standard non-admin account.

    Issue
    To workaround the issue of problems when Notepad++ is installed by an admin account but used from a standard account, I always keep 2 instances open now; 1 opened with my standard account and another run as admin using my admin account.

    The problem is whenever I have to restart or otherwise close the admin instance of Notepad++ the next time I start is as admin using the same account when Windows prompts for admin credentials it does not open the files I last had open despite being configured to do so. The instance I open with my standard login remembers and reopens files just fine.

    For example I often edit the \system32\drivers\etc\hosts file so I can assign a URL to a site hosted on my local IIS and use that in the browser. However after a restart that hosts file will not be open despite using the same admin account to run Notepad++ as admin. Shouldn’t it be using the user profile of the account I ran it as?

    E M 2 Replies Last reply Dec 12, 2018, 11:21 PM Reply Quote 0
    • E
      Eko palypse @Peter Row
      last edited by Dec 12, 2018, 11:21 PM

      @Peter-Row

      sorry, but as far as I understand, the last instance is triggering writing the session information only.
      So the only workaround I see at the moment is to create an independent shortcut and using a session file
      and every time before you close this instance you want to save the session explicitly.

      Eko

      1 Reply Last reply Reply Quote 1
      • M
        Meta Chuh moderator @Peter Row
        last edited by Dec 13, 2018, 12:25 AM

        @Peter-Row

        you could also use a single portable version that resides in a folder you can put anywhere (except inside %programfiles% or %programfilesx86%)

        this way you could open the same session files, regardless if this portable notepad++.exe is started as a restricted user or as an administrator (elevated).
        (only prerequisite is that both users have the same available paths and at least read permission to access all the files listed within this session … files without read permissions will not be reopened and purged from the session list)

        basic explanation:
        the portable np++ version confines all internal data including sessions to it’s own folder, so they are persistent to all users that have permission to read and write to this portable np++ folder.
        this behaviour is triggered by the presence of an empty DoLocalConf.xml file.
        the installed version on the other hand will write and read specific np++ internal data and settings inside different locations within the %homepath% of the user account that np++ has been started with

        feel free to download and try the portable np++ version from this location:
        https://notepad-plus-plus.org/repository/7.x/7.6/npp.7.6.bin.zip
        (it will not interfere with your current installation)

        E 1 Reply Last reply Dec 13, 2018, 12:29 AM Reply Quote 2
        • E
          Eko palypse @Meta Chuh
          last edited by Dec 13, 2018, 12:29 AM

          @Meta-Chuh

          that is better than my suggestion as it allows to have full session functionality aka unsaved files for both accounts.
          Good one :-)

          Eko

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