Page 1 of 1

Let Clone copy save settings. Etc.

Posted: 24 May 2025 05:27
by Malarki
I'm now usually running in a "clone" / read-only" instance of XY. After years of customizing XY it's set the way I want and this prevents inadvertent changes and automatically keeps things clean. Maybe that's not for everyone but I've come to like it.

--> Anyway, my request is to let this clone instance "Save settings", for when I do want to tweak something. Obviously there are ways to achieve the same thing but this would be "simple", I think. There could be a confirmation step.

I note that the existing File | Save Settings, though not grayed-out, just does nothing when clicked in a clone instance. The same for File | Settings Special | Save Configuration. I'm not clear on the difference between these two (the Help talks about them similarly) but maybe XY should pop-up eg. "Can't save settings from Clone instance". Unless of course you are going to enable that per my request.

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 11:27
by highend
I'm using the /readonly mode since years but I'm not a big fan of "let me save my settings regardless"...

If I want to change a setting I'm just switching the mode with a script on a button and after changing & saving I switch back.
The full version handles admin modes and switching between all of them (user, normal / readonly | admin, normal / readonly) as well but this is out of scope here

Code: Select all

    if (strpos(<get cmdline>, "/readonly") == -1) {
        run lax("<xypath>\XYplorer.exe" /readonly /script="::appicon 'ABA';"); exit "n";
    } else {
        run lax("<xypath>\XYplorer.exe"); exit "n";
    }

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 16:35
by Malarki
So what is the downside to my request? Which is to let a readonly instance use File | Save Settings, with a confirmation.

I agree that as with every such request that (a) it will take some work and (b) there are other ways to do it. The Help points to the script command "savesettings" which does what I want and which I've now assigned to yet another toolbar button. Which makes 51 such buttons added to the 60+ selections that I have in a User menu.

Note: I think the Help's suggestion to use the "ini" argument is misplaced since that's apparently for creating an alternate copy, not updating the current xyplorer.ini.

Correction to my first post: I now see that there's a Status Bar message when trying to Save Settings from a readonly instance.

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 17:48
by highend
It's a contradiction to what the whole instance is about, living with an immutable state.
Even things like tagging don't work with it.
It's like opening pandoras box because the next one may want to have labels saved, or, or, or...

If you don't want that, why don't you just disable
Configuration | General | Startup & Exit | Save Settings | [ ] Save settings on exit

use a normal instance and save whenever necessary?

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 17:56
by Malarki
highend wrote: 24 May 2025 17:48 If you don't want that, why don't you just disable
Configuration | General | Startup & Exit | Save Settings | [ ] Save settings on exit
use a normal instance and save whenever necessary?
Because I didn't think of that, did I? :oops: And with that I don't even need a separate launcher for a /READONLY instance.

Thanks!

[This is why I'm weak at chess - at some point my brain won't go back to the big picture and look for a whole new path. Though I have to wonder why you're using the full mode-switch script instead.]

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 18:47
by highend
Because it switches to whatever I may currently need, having a read-only mode admin instance is perfect for tasks that... require admin permissions and as I already said switching to a normal instance to make a change in the configuration is just very handy...

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 20:34
by noembryo
highend wrote: 24 May 2025 18:47 Because it switches to whatever I may currently need, having a read-only mode admin instance is perfect for tasks that... require admin permissions and as I already said switching to a normal instance to make a change in the configuration is just very handy...
Most of the time I don't use the Administration mode, but when I do, I have to close XYplorer and re-launch it as admin.
Is there a way to change this mode with a button?
That would be handy indeed..

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 20:45
by highend
Use e.g. gsudo in the script a few postings above to call XY?

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 21:53
by noembryo
highend wrote: 24 May 2025 20:45 Use e.g. gsudo in the script a few postings above to call XY?
And how should i know if the current instance is in admin mode?
Can you please post a complete script, because all my tries didn't work.. :?

Re: Let Clone copy save settings. Etc.

Posted: 24 May 2025 22:15
by highend
<get userrole> represents that info