Variable expansion in instance_name (INI entry)

General discussion related to "Everything".
Post Reply
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Variable expansion in instance_name (INI entry)

Post by NotNull »

Adding instance_name=test-%USERNAME% to Everything.ini gives you an expanded "Everything-test-<username>.ini" (test-JohnDoe.ini), but the database name is "Everything-test-%USERNAME%.db".

That might very well be intentional (why create multiple databases for basically the same INI file? (*) but maybe it's a little oversight (although Everything's/void's track record suggests otherwise). Just wondering/reporting here.

Extra question: what is the intended use for this instance_name= entry? First thing that came to mind is a corporate environment with locked down settings, but there are probably others. (a documentation-, help- and forum-search didn't give me much information on this subject)


(*) An Everything.ini that includes instance_name=test will create Everything-test.ini, which contents are that of Everything.ini (missing INI-entries will have their default value).
While that Everything instance running, one can change settings. After closing and restarting Everything all settings are back to their original state (i.e. like those in Everything.ini).
So basically you have a read-only Everything.ini.
therube
Posts: 4984
Joined: Thu Sep 03, 2009 6:48 pm

Re: Variable expansion in instance_name (INI entry)

Post by therube »

If you interactively change instance_name=, I suppose that acts as a File | Save as... like feature - for Everything-<newly named instance_name>.db, allowing you to save current settings under a new name, without affecting the initial .db.
void
Developer
Posts: 16764
Joined: Fri Oct 16, 2009 11:31 pm

Re: Variable expansion in instance_name (INI entry)

Post by void »

Adding instance_name=test-%USERNAME% to Everything.ini gives you an expanded "Everything-test-<username>.ini" (test-JohnDoe.ini), but the database name is "Everything-test-%USERNAME%.db".
This is an oversight.

The ini setting "instance_name" needs updating. In Everything 1.3, the Everything.ini and Everything.db filenames did not change with different instance names.

Please use the -instance command line option.
This will expand the %USERNAME% variable on run.
Extra question: what is the intended use for this instance_name= entry? First thing that came to mind is a corporate environment with locked down settings, but there are probably others. (a documentation-, help- and forum-search didn't give me much information on this subject)
It was just another way to set the instance name, as an alternative to the -instance command line option.
Shortcuts did not have to be modified, useful for other apps that may start Everything for IPC, instance name could be copied with copying the Everything.ini.

(*) An Everything.ini that includes instance_name=test will create Everything-test.ini, which contents are that of Everything.ini (missing INI-entries will have their default value).
While that Everything instance running, one can change settings. After closing and restarting Everything all settings are back to their original state (i.e. like those in Everything.ini).
So basically you have a read-only Everything.ini.
This is a bug, would should happen is Everything should load the correct Everything-test.ini after loading Everything.ini.
I've added this to my "Things to fix" list.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Variable expansion in instance_name (INI entry)

Post by NotNull »

Thanks for explaining!

As far as I'm concerned: no hurries, no worries; I was just wandering around in the "darker" corners of Everything :-)
Post Reply