Configuration files instead of registry

Hi there,

as a long time TC user and pretty active member in the Total Commander community I have taken the chance to start trying out Directory Opus the past days and compare it. So far I am really impressed by many Directory Opus features but some of them don't impress me at all, that's why I'd like to annoy you with some questions/feature proposals in the next time. :wink:

First, I am wondering why Directory Opus uses the strange approach to use a mix of storing settings in registry and XML files, this has been extremely confusing for me the past days because I like to know what is going on on my box.

I see no advantage for users of an advanced file manager to store stuff like user-defined commands in crazy registry keys like HKCU\Software\GPSoftware\Directory Opus\Commands{random_CLSID sigh} for example, this is bad for creating and sharing command templates, bad for making backups or resetting configuration and like this Directory Opus is not suited to be run from USB stick without being installed on the target computer.

Being able to adjust many options by GUI is very nice for beginners of course but using plain text files is the better choice if you need to adjust many settings at once in one go. After checking the resource section I recognize that workarounds are needed to adjust Directory Opus. Workarounds are something I don't like, especially if they are needed only because of design deficits. I'd prefer to have all settings stored in INI files or XML files for direct access, at least optionally.

Is Directory Opus in the process of completely getting rid of the registry or are there any plans to do so in the future?

Thanks for your enlightenment

Icfu

Toolbars are XML files, everything else is in the registry. I think that's as far as the mixing goes (from memory, so I might be wrong!).

You can backup and restore all settings (including filetype customisations, toolbars, images, preferences, custom buttons, and so on) at once using the "Import and Export" command which reads and writes a single file containing all the settings. (The file is really a zip containing all the stuff you've exported.)

Sharing an entire toolbar is easy, of course, since you just share the XML file for the toolbar.

You can share individual toolbar buttons by dragging them to the desktop while in customize mode, which creates an XML file for just the button you dragged. People can then drag or paste that button onto their own toolbars.

The same is true of user-defined commands (i.e. the User category in the Customize dialog): Just drag them from the dialog to the desktop to create an XML file that you can send to other people. You should never have to know nor worry about the fact that user-defiend commands are stored in the registry under a CLSID.

Most people won't even create commands in the User section since, ignoring command templates which I've never seen used, the main purpose is to allow the same command definition to be used in two different places, which is fairly unusual. I've only got one command in my User category, since I had a reasonably complex function that I wanted on both the toolbar and a context menu. I don't even use it anymore. :slight_smile: Most of the time it's easier to create the command straight on a toolbar, which also means it's part of the toolbar XML file should you need to do any mass button editing.

What kind of things do you need to change at once apart from toolbars?

Aside from filetype customisation (which logically lives in the registry because it augments the Windows filetypes which are already in the registry) and user-defined commands, the registry is just used to store all the settings in the Preferences dialog, which I can't see being edited en mass very often (but you can use Import/Export to put them all in a text file if/when you need to). In my opinion, the Preferences GUI provides a much better interface to those particular settings than a text file when you want to only change one or two options, whether you're a beginner or an advanced user.

Maybe I'm not thinking of something?

Indeed, and this is what confuses me... I don't see any reason why button configs are saved in files and the rest of the configuration is not.

This feature is very nice, I like it, but the resulting zip is also a mix of both the toolbar .xml files and .reg files. The export to .reg files is of course needed for shell related settings like HKEY_CLASSES_ROOT\Folder\ but for all stuff in HKCU\Software\GPSoftware it can also be made obsolete.

One of the advantages of config files. :slight_smile:

[quote]You can share individual toolbar buttons by dragging them to the desktop while in customize mode, which creates an XML file for just the button you dragged. People can then drag or paste that button onto their own toolbars.

The same is true of user-defined commands (i.e. the User category in the Customize dialog): Just drag them from the dialog to the desktop to create an XML file that you can send to other people. You should never have to know nor worry about the fact that user-defiend commands are stored in the registry under a CLSID.[/quote]
For user-defined commands this doesn't work! The created .XML file on the desktop contains absolutely no information about the command, maybe a bug? I am new to DO so I don't know. :wink:

I like the export of single items to the desktop but would still prefer to have the complete command set saved in one .XML file, too.

Maybe this is the problem here. I have understood the command section of customized mode as a pool you can fill with your own commands that can be used to be dragged&dropped to the toolbar later. In the Total Commander community we are discussing an approach to a better file management, maybe this will make it clearer. If you are interested see the following link with the elaborated theory:
ghisler.ch/wiki/index.php/Un ... and_system

Just one quote from it to give you an impression why this system would be really nice in Directory Opus, too. Till now only Krusader, an open source file manager for Linux, has implemented this approach:

[quote]A single point of access (the command manager) is presented to the user.
Commands are control independent. A command can be assigned to as many control as the user wants.
Implementing a system based on the observer pattern will solve the updating problem for all checkboxes, captions and all other properties in all controls.
Exchanging of user defined menus would be possible without or with much less translation.[/quote]

[quote]What kind of things do you need to change at once apart from toolbars?

Aside from filetype customisation (which logically lives in the registry because it augments the Windows filetypes which are already in the registry) and user-defined commands, the registry is just used to store all the settings in the Preferences dialog, which I can't see being edited en mass very often (but you can use Import/Export to put them all in a text file if/when you need to). In my opinion, the Preferences GUI provides a much better interface to those particular settings than a text file when you want to only change one or two options, whether you're a beginner or an advanced user.

Maybe I'm not thinking of something?[/quote]
Well, I have mentioned the USB stick and other removable data storages in my first posting that get more and more important in these times and that can not be equipped with Directory Opus due to its registry dependancy. When started on the target system Directory Opus pollutes the target system registry, so Directory Opus is not a power tool for system administrators but one for static (home) users only.

And there are other reasons as well:
Total Commander can be started with different configuration files simply by command line:
totalcmd.exe /i=configfile.ini

So, I can open my basic config file with Notepad, replace the reference to the main .mnu file (used to store the menu) with another one and save it. Then I can have two instances of TC running at the same time using two different menus.
If I have missed possibilities like that in Directory Opus please let me know. I haven't found anything related to command line parameters in the help file.

I disagree on your statement that it's generally easier to change one or two parameters in a configuration GUI. Directory Opus has an overwhelming mass of settings available in the config GUI and I doubt that it's easier to find your way to the alias section in the GUI than to simply open an INI file and press Ctrl-F -> [Aliases] -> Enter, especially if you open the INI file directly by using a button or batch file. :wink:

But, it's all dependant on what you are used to, of course...

I agree that it's nice to have all settings available in a config GUI, I am only talking about an optional possibility for users that are used to juggle with INI files and regard it as a very convenient form of changing settings.

Thanks for your attention and detailed answer, you seem to be as active in the DO community as I am in the TC community, I will try your tutorial soon, thanks for that. :slight_smile:

Icfu

I guess it's more that Opus aims to use the registry to store settings but putting toolbars into the registry would be somewhat onerous.

I'm certainly not the world's biggest registry fan and wouldn't be against the idea of Opus moving all configuration into XML files where possible, but I don't know that GPSoft would want to invest the time to do so at this stage when it won't make a difference to most users.

That said, the switch from an undocumented binary format for toolbars into the new XML format was a recent one, so GPSoft are certainly open to this kind of idea. You'd just have to convince them that the benefits of moving config from the registry to XML files are worth it.

Oh! My apologies, you are right. When I tried it I didn't pay enough attention. The XML file that's produced via drag & drop is just a link to the User Command rather than the command itself.

Actually, that can be useful for creating icons which call the User Command from outside of Opus (e.g. from the Windows Quick Launch bar).

To export the User Command itself, rather than a link to it, you can right-click it in the Customize dialog and then select Export.

That's correct, but you can also create the commands directly on your toolbars. This is what I expect most people do and is usually more convenient. In particular, you can quickly edit a toolbar button by holding Alt and clicking on it, rather than hunting around in the Customize dialog.

Of course, it's up to you how you arrange your commands and where you store them, but most of the time I'd advise writing them directly into the toolbar buttons.

Regarding the new system proposed for TC, I think Opus currently provides some of those benefits, but not all of them.

How to design the configuration system is perhaps the most difficult thing about making highly customizable tools like Opus and TC so it's interesting to see different approaches.

True, while Opus can be run from a USB key there are caveats to keep in mind when doing so. Full XML-based configuration would remove most of them.

While at work it's not a problem since I can work on other people's machines over the network, it certainly would be cool to carry Opus around on a USB key so that I can use it when helping friends and family with their computer problems.

You can use dopusrt.exe /cmd to run Opus commands from external batch files or shortcuts, and this should launch Opus if it isn't already running. So you should be able to make icons or batch files which launch Opus using different configurations using the Prefs command to import a given configuration, for example. But you'd also have to ensure changes made to the configuration are exported afterwards, since the Prefs command imports the configuration rather than using it in-place (if that makes sense).

You can't have multiple instances of Opus since it works as a single process which launches all Opus windows, but you can open as many windows as you like with each having independent view modes, Folder Options, viewer/utility panes, and (with manual toggling) toolbars.

The Layouts and Styles systems make saving and recreating different setups easy.

Of course, many settings are global but, apart from maybe thumbnail size, I can't think of any global settings that I'd ever want to be different between two windows. If there are some settings then by all means bring them up! I can't see Opus ever allowing multiple instances as it would really confuse things given that the Opus process does more than just one single file-list window, but equally a single Opus process should be all you need if Opus allows each window's configuration to be independent enough, (which it certainly does for me, at least).

Thanks for yours as well! It's great to have some constructive cross-community interaction.

I have to agree wholeheartedly with Icfu . . .

DOpus needs config/.ini files instead of relying on the registry!

Like Icfu I use a USB stick for both my personal programs and documents etc. and for all of my tech support utilities for troubleshooting computers at work. I have installed portable versions of all types of productivity software (Firefox, Thunderbird, audio and video software, OpenOffice, etc.) as well as system utilities and troubleshooting and recovery software. I use portable software exclusively and do not rely on any local machine installed apps (except, of course, for OS common files and games on my home PC)

I am currently using Free Commander (I will check out Total Commander) as my file manager but it is lacking MANY of the features of DOpus. There is a HUGE community out there that uses portable software on a daily basis (Google "portable apps" etc. to see how many websites, newsgroups and forums there are supporting and discussing this topic). If GPsoft would return to the non registry days and have all settings saved in the program folder then DOpus would be open to a much larger market.

I am currently using the trial version . . . I love the features but have not yet decided to purchase due to (no) portability.

Just for the record I think you have an excellent product and I have been using earlier versions for several years - since the early 90's with the Amiga versions even before it was a Workbench replacement and was a standard (but very superior) file manager. I am glad to see that this software is still in development.

DAVE[/quote]

. . . I DO have a laptop . . . and a "handheld" WinCE device . . .

But I think you are missing the point all together . . .

Laptops are "portable" - if you want to carry one around with you . . . but the software on them is not portable - it can only be run on the laptop . . .

PDAs are even more portable but you have to use different versions of software (read: cut down versions with much less functionality) and, like a laptop, the device is portable but the software is tied to the device.

A USB stick (that come in up to 8GB now and are getting larger everyday) can be instantly used on any computer with a USB port (even on a *nix machine if I need to - I have some *nix software installed along with a small bootable distribution of Knoppix). Obviously you can see the advantage to this - especially for company/network system administrators that have to work on multiple PCs (where a file management app as powerful as DOpus would be very usefull).

As I said I also use the USB stick for just about everything except most of the games I play at home (but I even have some smaller games installed that save all of their data in the program directory). It allows you to set up your computing "environment" once and use it on any PC that is in front of you.

I only have to update one set of software.

I do not have to "synchronize" documents etc. on each computer I use and worry about if I am using the latest version or an earlier version, etc.

I always have all of the applications available that I want to use and they are always configured the way I want them:

My web browser - Firefox - always has all of my bookmarks, has all of the plugins I need, has a secure password manager built in, has the theme I want to use, has my complete history that I can search to see what site I was at 5 days ago at work on a different computer in another state 600 miles away, etc.

My e-mail client - Thunderbird - always has ALL of my mail, my address books, all of my e-mail accounts configured propperly, all of my custom filters and sorts configured, my custom folder layout including search folders are there, etc.

I could go on with the full list of software I use and the benifits of each one being on a USB stick but i think you get the point.

The only thing I have to carry around to do this is a small USB stick on my keychain the size of a small pack of chewing gum - not a laptop the size and weight of a large college textbook that keeps running low on battery power or that I have to also carry extra batteries or an AC adapter to plug in. All of the offices in my company have computers I can use. All of the hotels I stay at have computers I can use. My parents and my brothers all have computers I can use when I am visiting.

Like I said I DO have a laptop that I bring with me at times when I think I will not have conveinient access to a PC but I still plug my USB stick into my laptop for the same reasons as above - I will always have the latest most up-to-date software and documents available to me.

Another benifit is that if any one of the computers I use at work, home, on the road crash then I still have my personal data and programs and only need to re-install the OS, drivers etc. specific to that computer and then plug my USB stick in and I have all of my software available to me instantly without re-installing, updating and configuring.

If DOpus had saved its settings to a config file in its own directory instead of the registry and also placed any unique .dlls in its own directory instead of the WIN32 directory then it would be the most powerful (by far) portable file manager available. It would also replace several other related apps that I am using now - ftp client, picture viewer, file compression app, etc.

Even Microsoft is sort of heading in this direction. They are recomending with .NET apps that settings are saved to an XML file in the user profile folder instead of the registry . . . closer to what I am talking about but I think this has more to do with corrupt registries and orphaned registry entries instead of portability. But if the settings can be saved to the user profile folder instead of the registry they could just as easily be saved to the program folder.

Sorry if this sounds like a rant but I was excited to stumble across DOpus a couple of days ago after forgetting about it (sorry) for a couple of years. But then after testing it out on my home PC (and loving it) I started checking to see if I could install it to my USB drive and was dissapointed that I could not find a way to properly do a portable install.

Like I said I love DOpus and am glad to see it is still in development after all of these years.

DAVE

Usually, you can just move/copy the dlls into the directory of the executable and they will be found as well (depends on how the app is programmed I guess).

I fully agree with the point made in this thread as well. The windows registry is a nuissance and should be used as little as possible (Yes, I hate the registry. It is the equivalent of a system wide global variable, and frankly, just a bad idea).

Having your most used applications (DOpus, Opera, EMacs, Vi, Thunderbird and a few others) on a single portable USB stick enables you to take your preferred working environment everywhere. Currently, DOpus prevents you from doing this. Please switch to configuration files (.ini, .xml or whatever you like).

+1!

Stuff like COM object registrations, parts of filetype configuration and other things have to live in the registry. Maybe a cut-down version of Opus could run without it but it would at the very least be a pain to develop, debug and in the long term maintain, especially if parts of Opus rely on COM objects which have to be registered at installation. It's not impossible but it's not completely trivial either.

It's not much of a surprise that most (all?) of the apps which can run off a memory stick are either cross-platform or (more or less) tiny, standalone executables which have very little interaction in either direction with other programs or parts of the operating system.

I'm not a big fan of the registry either but that's Windows for ya.

You're right, but just don't make it worse than needed. There is little reason to store custom commands in the registry for example.

But once you're tied to the registry you're tied to it so it doesn't make much difference as far as I can see. There's the Import/Export dialog for transfering settings between machines but you still need to install Opus on each machine.

The registry can also be a good thing in terms of users with roaming profiles, in some cases better than storing config file in the user's profile directory since the merge of settings changes is more granular with the registry. (Well, I'm assuming it is; I've not looked that up to confirm.)

I can't stand the sluggish behavior of applications that run from a USB-stick. The idea is great but I think the technology hasn't caught up with it yet - although if you're a sysadmin (I am not) maybe it's worth it.