Question regarding Reg entries

Since I cannot find a ffmpeg build that will automatically include a environment variable for the CMD ffmpeg command I'll probably have to do it myself.

However I would like to do so by saving it inside a .reg file.

For example if my path towards FFMPEG is:

C:\RESOURCE\FFMPEG\ffmpeg.exe

How can I write an .reg file that will lin said path with a variable (ffmpeg) that I can use in CMD ?

Depending on what shell you're using, you should have something like $PATH in your environment that provides pathnames to directories containing the commands you normally run. On UNIX and Linux systems, PATH is a colon separated list of directories; on Windows systems it is frequently a semicolon separated list of directories. Some shells on Windows internally convert slashes in pathnames to backslashes; some don't.

Try the command:

echo $PATH

in your shell. If it is there, try the command:

export PATH="$PATH;C:\RESOURCE\FFMPEG"
      or
export PATH="$PATH;C:/RESOURCE/FFMPEG"

matching the use of slashes or backslashes in existing entries in $PATH. You should then be able to just run ffmpeg or ffmpeg.exe to run the command in any subshell of your current shell.

Look at the man page for your shell. There should be an initialization file (such as $HOME/profile.sh ) that will be run when you login. You can set $PATH there to add that directory to your $PATH for all later shells after you log out and log back in to your system.

Actually, as this Section suggests I need a Windows solution.

I'm aware of that. But, you didn't say that you didn't have cygwin or any of the other UNIX/Linux like command sets installed on your Windows system. (I haven't used a Windows system for a long time, but the directions I gave would have worked with the MKS ToolKit that I used to use, and I believe it would also have worked if you were using cygwin's bash as your shell.)

And, even if you don't have a UNIX/Linux command set installed, you still have a Windows command interpreter (a shell) that will have a variable like the standard UNIX shell's PATH environment variable that performs pretty much the same function. I know that Windows doesn't have a man command, but you should be able to find a MicroSoft document somewhere on the web that explains the way your command interpreter finds commands. You should be able to use the method documented for your shell to add C:\RESOURCE\FFMPEG to the list of directories searched for commands to be run.

Ok, that - I will try.

However: Can the output be saved to a reg file so I can easily reinsert it if I ever want to reinstall windows (without having to backup the whole registry?)

BTW: This just occured to me:
Does Linux also sport some sort of registry ?

The registry is a sort-of database and is manipulated using certain specialised tools (like regedt32.exe, etc.). Unfortunately Microsofts tools do not offer a lot of possibilities to automatically (that is: non-interactively) edit the registry at all, so you probably will need some replacement tool for this. This includes saving (part of) the registry into a file and then read such a file and add its contents to the registry again. Therefore, how in detail you have to do that depends on the tool you finally decide to use.

No Linux does have a registry (and neither do most Unixes). All configuration information is stored in clear-text files as a principle, because these can be manipulated by simple text editors and/or any text-manipulating tool. This way it is easy to write scripts and other software to (semi-)automatically rewrite such configuration information. This adds a lot of possibilities to the administration/configuration of Unix-like systems Windows-systems do seriously lack.

Nevertheless the registry was invented on a Unix system (IBMs AIX, to be precise), where it is called "ODM". In fact it was licensed by Microsoft from IBM way back in the beginning of the nineties, IIRC.

The ODM (Object Data Manager) serves a similar purpose in AIX as the registry in Windows (here is the link to wikipedia), but is not as exclusively used as there. The classical config files are still there and only some parts of the configuration (logical volume manager information, software inventory, extended user attributes, etc.) is stored in the ODM. For some aspects there are daemons which propagate settings done in the ODM to the "real machine" and vice versa so that machine configuration and ODM content remains consistent.

For instance: user information is still handled in the classical files ("/etc/passwd", "/etc/group", ...), but extended attributes of user accounts (max time for a password to expire, etc.) are stored in the ODM. There is a command ("chuser") to manipulate user accounts which will do all the necessary changes to the ODM as well as the files automatically.

Another example: static routes are stored in the ODM as part of the systems attributes. There is a command "chsys", which would do the necessary changes (like issuing a "route" command wiht the appropriate options) and also stores the changes in the ODM. The user can use the "route" command alone too, generating a change in the routing table which will not survive reboot. "chsys" itself has a flag to change the system immediately, coming into effect only after next reboot or both. It would be possible (but is not recommended) to use low-level commands ("odmchange", ...) directly to manipulate the ODM the same way "chsys" does and the effect would take place with the next reboot.

This is another major difference between ODM and the registry: the ODM comes with all the necessary tools to manipulate it (odmget, odmdelete, odmchange, ...).

I hope this helps.

bakunin