Open XhmikosR opened 12 years ago
From Notepad2 FAQ:
There may be an easier way to save files with Administrator privileges. The principle of this method would be to create a temporary file, and then use a Win32 API file operation function with partial UAC elevation support to copy the temporary file over the original. However, this would break hardlinks, so that's why it's a design decision not to implement this method in Notepad2.
So in lieu of an "easier way to save files with Administrator privileges," he recommends using /u
(or /n /u
as the case may be) and copy/paste your text.
Seemed like that might be relevant to this issue.
Incrementing this:
This can solve this feature request.
If save fails because of missing rights save a temporary diff of the buffer and the file. Display a dialog that allows you to open the file in an elevated Notepad2 and apply the temporary diff. Add an 'Open elevated' feature in the file open dialogue, maybe. This would be in addition to the menu entry suggested by @josenicomaia . This also prevents the hardlink breaking issue with copying a temporary file. Disadvantage: basic support for diff-ing required.
I realize this is an old issue, but I implemented this much-needed feature over the weekend (#154). It works by saving a temp file before restarting, and then loading the contents from that temp file, but keeping the original filename.
For this, I added a new command line parameter, /buffer
, allowing specifying path to the filename with the contents of the text buffer.
Would be awesome if this gets merged :)
Thanx @hmemcpy :+1:
This is Issue 50 moved from a Google Code project. Added by 2011-10-13T16:27:44.000Z by dani...@gmail.com. Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium
Original description