Windows Environmental Variables Support in config.ini

Ideas and suggestions about new features
User avatar
Chum
Posts: 8
Joined: Sat Mar 24, 2012 4:06 am

Windows Environmental Variables Support in config.ini

Post by Chum »

It would be nice if theWord software supported Windows environmental variables such as %userprofile% so that an entry can be saved in the local config.ini such as: extra.paths=C:\%userprofile%\OneDrive\_AppSync\The Word;

This would allow User Modules to be synchronized across different PC's and different User profiles (at work I'm a .\jdoe\AppData\... & .\jdoe\OneDrive\... but on my Windows 10 tablet with internet authentication I'm a .\john\AppData\... & .\john\OneDrive\... for example) while allowing for different config.ini on the different devices (The layout used at work with my dual monitor setup conflicts with my Tablet & vice versa).

Synchronizing the entire program directory is not desired and causes shared config.ini issue as just mentioned above. Using static values as: extra.paths=C:\Users\ThisSpecificUser\AppData\Roaming\The Word; on each install is not ideal because in case another user (my child) wants to use the program and have access to their own User modules, then the config.ini would need to be changed for that instance.

Environmental variable support is preferred after I experimented in both compact and non-compact mode and using the Windows MKLINK command to associate the default User modules paths with my OneDrive cloud synchronized path (associated with my Windows User Profile) and by also experimenting with the extra.paths config.ini entry. This will result in having theWord support User modules that relate to the correct user while allowing device independent config.ini that is ideal for specific devices.

Any thoughts?

P.S. My solution above isn't perfect since I just realized that a device specific config.ini may not be desired: If my child logs in and changes the layout & fonts etc, then when I log in, I would see those changes reflected in my instance as well. Hmm. Got to rethink this a bit:

Okay here is what is working great for me: If I utilize non-compact mode so that C:\Users\jdoe\AppData\Roaming\The Word & C:\Users\john\AppData\Roaming\The Word will house separate config.ini that will not be mklink'd to OneDrive (not synchronize) and will not hold any User modules. I will then utilize extra.paths to point to my OneDrive that will hold the User modules. This IS working with static extra.paths entries since the config.ini can be different on different machines for different users - no need for mklink (like I use for Windows 10 Apps). :D
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: Windows Environmental Variables Support in config.ini

Post by csterg »

Well, it appears that Windows themselves try to solve this issues with the user profiles :)
Post Reply