You are here: PSPad forum > English discussion forum > Re: Save with admin rights

Re: Save with admin rights

Goto Page: Previous1 2

#11 Re: Save with admin rights

Posted by: Calvi | Date: 2021-06-25 06:03 | IP: IP Logged

I understood. What I was trying to explain (not very well) is that I would only need a new instance if there was an Admin instance already open.

I guess I could make right click versions for PSPad that are normal, admin and new instance (-N) but I would prefer just one shell extension item for PSPad that:
1. automatically opened in admin mode if the file was in a protected area
2. opened in regular mode if not in a protected area.
3. opened in a new regular mode instance if an admin instance was already running from before, and opened subsequent protected mode files in the admin instance and non protected ones in the regular instance. (i.e. no more than 2 instances ever opened for any number of files).

Options: Reply | Quote | Up ^


#12 Re: Save with admin rights

Posted by: pspad | Date: 2021-06-25 14:32 | IP: IP Logged

How can I recognize "protected area"?
It can be anything - mapped server folders e.t.c. and run as local admin doesn't help you, you need to start it as e.g. domain admin.

Options: Reply | Quote | Up ^


#13 Re: Save with admin rights

Posted by: Calvi | Date: 2021-06-28 04:41 | IP: IP Logged

No you wouldn't be able to do that.

Only recognize folders that require local admin is what I am alluding to.

No-one has a solution for the domain access etc.

Options: Reply | Quote | Up ^


#14 Re: Save with admin rights

Posted by: pspad | Date: 2021-06-28 05:01 | IP: IP Logged

How do you recognize folder what requres admin rights?

Current 5.0.7 build allows you to open file in new pspad instance under admin. Use right mouse over the file tab.
The problem is you need to copy file modified content there now. I will think how to send file content from one instance to another one to get current editor content. The worst way is use temp file.

Options: Reply | Quote | Up ^


#15 Re: Save with admin rights

Posted by: Calvi | Date: 2021-06-28 08:47 | IP: IP Logged

I am not sure how notepad++ does it.

I would guess that it determines it cannot write to the folder on save and then offers to re-open in admin mode.

The message says

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

If you say yes, then it UAC is opened and Notepad++ closes, and reopens in admin mode without losing any changes to the file you were working on.

I did try a read only file and this was greyed out and editing locked out so the file attributes are checked first.

I then tried a domain file that I made without write access and as expected Notepad++ offered admin mode and then of course still could not save to the location.

I think this is reasonable behaviour, as an admin I know when I need domain rights vs UAC but often forget to raise an editor to UAC.

One last interesting point is the following on a domain protected file.

1. PSPad errors with unable to save changes to file. (reasonable)
2. Notepad++ after raising to admin just doesn't save and gives not error either (bad).
3. Notepad (included in windows) knows it can't save the changes so pops up a new filename save window (probably best).

Options: Reply | Quote | Up ^


#16 Re: Save with admin rights

Posted by: Calvi | Date: 2021-06-28 09:03 | IP: IP Logged

PS: I am unable to right click get an admin mode with 5.07.

If PSPad is not opened then I cannot right click to open a file in admin mode.
If it is opened I cannot right click and get any file to open.

I tried reinstalling 5.6, then 5.7 again and behaviour is the same for me.

Options: Reply | Quote | Up ^


#17 Re: Save with admin rights

Posted by: pspad | Date: 2021-06-28 09:29 | IP: IP Logged

Calvi:
PS: I am unable to right click get an admin mode with 5.07.

If PSPad is not opened then I cannot right click to open a file in admin mode.
If it is opened I cannot right click and get any file to open.

I tried reinstalling 5.6, then 5.7 again and behaviour is the same for me.

I didn't wrote about the shell extension. I wrote about open file in PSPad and right click on the file tab

Options: Reply | Quote | Up ^


#18 Re: Save with admin rights

Posted by: pspad | Date: 2021-06-28 09:31 | IP: IP Logged

Calvi:
The message says

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

You have similar functionality now in PSPad.
You can right click file tab and open file in ADMIN started new PSPad instance.
I will try to do the same after the unsuccesfull save access.

Options: Reply | Quote | Up ^


#19 Re: Save with admin rights

Posted by: Calvi | Date: 2021-06-29 01:58 | IP: IP Logged

Ahh, my bad.

I tried in the File Open dialog, but you mean on the file tab.

Yes, this is good, thankyou I like this.

Only negative is if changes already made, but as you said I can cut and paste.

If there is anyway to catch the changes would be terrific, but 99% of the inconvenience is now gone.

Can now right click on file and then right click on tab if admin required.

Also another comment: Be good to know which one is admin and which is not - eg [Admin] on title bar or something.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR