Experimentation shows an unexpected behavior for loading the config in xp2 version "4.1.0.1 ULT x64 2018-10-17" running on Windows 8 64-bit.
Background:
After updating toolbar or other setting, use
[Actions / "Save settings now"] and then
[Actions / "Export settings" ], saving to x2settings.INI in a non-standard, highly backed-up location.
After exiting xp2, run this command line to export the registry data to a file:
RegEdit /E "C:\Data-Critical\Systems\Configs\xplorer2\x2settings.REG" "HKEY_CURRENT_USER\Software\ZabaraKatranemia Plc"
Documentation about command line options:
Copied from x2Help.HTM and https://www.zabkat.com/x2h_7.htm#dos_arg:
/N - Do not restore slow folders from last session (e.g. network) in case they are unavailable
/I - (portable version) Initialize registry with a custom settings file. The settings file should be in the same folder as xplorer² and be created with Actions | Extract settings on your "home" PC. For ultimate version this can also be a INI file bypassing the registry
To contrast, copied from x2Docs.PDF Version 2.1.0.1-1 (from 2014?)
/N - On startup, x2 will not read network and other folders that are slow or unavailable. (Thus x2 will not appear to hang on startup)
/I - Forces x2 to use the alternative settings file (called settings.reg). It is best to place this file in the same folder as the executable. (This is useful if you are using x2 in a portable mode (i.e., from a pen drive or plug-in hard disk, etc.).
This post is about comparing the effect of starting xp2 with two different command lines:
Start "" "C:\Apps\xplorer2\xplorer2_64.EXE" /N /I:"C:\Data-Critical\Systems\Configs\xplorer2\x2settings.INI"
- loads the correct toolbar setup
- Tools / Options / General / "Save program state on exit, to" shows "windows registry".
- Loaded: Bookmarks, User commands, Column sets.
Start "" "C:\Apps\xplorer2\xplorer2_64.EXE" /N /I:C:\Data-Critical\Systems\Configs\xplorer2\x2settings.INI
- loads the default toolbar setup
- Tools / Options / General / "Save program state on exit, to" shows "file in user appdata folder".
- Missing: Bookmarks, User commands, Column sets.
A secondary test:
Remove the INI and start xp2. As expected, xp2 behaves as if it were new out of the box, with zero config information. Exit xp2.
Restore the INI and re-start xp2. As expected, xp2 behaves correctly , with customized config information.
Conclusions:
- The INI file *is* being loaded, regardless of whether the filename is enclosed by double quotes ... but quote-enclosing the filename (or not) should have zero effect, because the file's full pathname has no spaces.
- Something about not-enclosing the INI pathfilename in double quotes makes xp2 fail to load *some of* the config from the INI.
Commentary: the design of loading and saving config information is so complicated that it is a frequent topic of discussion here. I cannot be confident about managing my xp2 setup, as far as save / export / import / restore / registry / INI file / REG file etc.
In this setup, config is being loaded from INI and saved to registry. Yes that's kinda nutty.
Questions:
1. Am I mixing my approach improperly? Is loading from INI supposed to be paired with Tools / Options / General / "Save program state on exit, to": "file in [some] folder"?
2. What choices are there for storing the INI where the program uses it most effectively, other than "installation folder" and "user appdata folder"? Is storing the INI in any other location just contrary to the design intent?
3. Is the INI supposed to contain all the information that the registry export contains, other than registry keys not starting with "xplorer2_"?
4. Apparently the customization information is loaded (or fails to load) based on whether the INI pathfilename is quote-enclosed (or not). Am I missing something, or is this a bug, perhaps only in code that reads customization information?
/I command line option to load x2settings.ini ("slash-eye")
Moderators: fgagnon, nikos, Site Mods
-
EMathews3
- Bronze Member

- Posts: 100
- Joined: 2014 Aug 23, 12:54
-
nikos
- Site Admin

- Posts: 16402
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: /I command line option to load x2settings.ini ("slash-eye")
If you have the ultimate version, you are making your life hard! Just let xplorer2 do all the work. There is a file called PORTABLE.TXT in the installation folder with all the instructions