SyMenu Forum

SyMenu

 

HomeSyMenu Suite

The SyMenu collection of portable programs

Request - Read only mode change Messages in this topic - RSS

timrray
timrray
Posts: 22


19/10/2015
timrray
timrray
Posts: 22
Hello there, I was just wondering if it would be possible in the future to change (or add to) the options to enable read-only mode. One problem I frequently have is while running Symenu on multiple computers at once. I've had a couple occasions where my config files get corrupted when I make a change to Symenu while it's running via google drive sync with another machine that is also running it. If I do that, then exit out of Symenu, once I exit out of it on the other computer it seems to overwrite the config file and the change reverts. My request would be to enable some form of change to allow write mode on one machine, but let the others run in read-only mode. Or possibly detect that somehow and account for it when exiting the menu?
link
Gianluca
Gianluca
Administrator
Posts: 957


19/10/2015
Gianluca
Gianluca
Administrator
Posts: 957
SyMenu doesn't manage user accounts (for now) so your last proposal is impossible.

A read-only placeholder file valid for every PC except for one, is surely possible but the only idea that comes to my mind is a bit tricky.
Currently you create the "artificial" read-only status with a placeholder file named "readonly".
Changing the file name in something similar to:
readonly.[machinename]
you could create a read-only status for every machine except [machinename].

What do you think?
In my opinion this solution sucks... but it could work.

If instead you'd work in a local network you can reach the target simply playing with the permissions on the file system because SyMenu is clearly sujected to those ones. From a machine you can access to the network share with the write enabled credential and from all the others with read-only ones.
link
timrray
timrray
Posts: 22


19/10/2015
timrray
timrray
Posts: 22
I just thought of something, what if you were to use the COMPUTERNAME filter you've applied to the startup option to enable write mode for only that computer?
link
Gianluca
Gianluca
Administrator
Posts: 957


19/10/2015
Gianluca
Gianluca
Administrator
Posts: 957
What startup option? The autoexec one?
This are related to SyItems not to SyMenu.
We need something at a lower level than that one.
link
timrray
timrray
Posts: 22


19/10/2015
timrray
timrray
Posts: 22
Yes, I was just thinking something similar to the autoexec filter but have it configured in the main configuration window (program level, not at the SyItem level. It was just an idea. Another idea I had was using a /readonly type switch on the app but I know how much you hate command line switches smile
link
Gianluca
Gianluca
Administrator
Posts: 957


19/10/2015
Gianluca
Gianluca
Administrator
Posts: 957
Maybe the command line in this scenario could be a good solution but it is risky... what if you execute the main exe instead your bat/cmd with the command line switch set? I strongly prefer a placeholder file, it's more solid IMHO.

Implementing a configuration inside the application could be even more dangerous. What if you allow a PC named Pippo as the only write enabled executor and this PC is istead named Pippa? You cut yourselft out from the configuration. In this case your only solution is to manually hack the configuration file. Not impossible but I have to avoid that unprovided users play with such a powerful option. Well then they send their configuration files to me to unlock them... smile
link
Glenn
Glenn
Posts: 90


17/11/2015
Glenn
Glenn
Posts: 90
The READONLY.machine idea could work, but you would have to search for a pattern of file names.
Another alternative would be to place a single line in the file containing the non-READONLY machine COMPUTERNAME.

Someone with write access to the directory could clearly override it, but that solves the "problem" of misspelled COMPUTERNAME values, while still providing a reasonable assurance in a known environment that only one machine can update. [obviously, computer names can be changed, but that is lots harder than editing the content of the READONLY file: we are not talking about security from hacking here, just protection from accidental changes.]
link



UGMFree.NET ©2002-2020
By Gianluca Negrelli - Contact me