Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Running as admin doesn't load previously open files

    Help wanted · · · – – – · · ·
    multiple users bug maybe domain
    3
    4
    743
    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.
    • Peter Row
      Peter Row last edited by

      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?

      Eko palypse Meta Chuh 2 Replies Last reply Reply Quote 0
      • Eko palypse
        Eko palypse @Peter Row last edited by

        @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
        • Meta Chuh
          Meta Chuh @Peter Row last edited by

          @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)

          Eko palypse 1 Reply Last reply Reply Quote 2
          • Eko palypse
            Eko palypse @Meta Chuh last edited by

            @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
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors