zvMedia
-------
Upon insertion of media (CD/DVD or removable devices like USB stick or USB external hard drive)
it creates a subfolder in your media folder, names it after the media label, and mounts the media in it.

requirements
------------
I used it only on Windows XP, but I it should also work on 2000, Server 2003 or newer systems like Vista and 7.
It can not work on 9x.

usage
-----
You choose your media folder by setting an environment variable (My Computer / Properties / Advanced / Environment Variables
or use setx.exe, that is part of the Windows Support Tools, or alike).
The name of the variable must be "zvMedia". The value of the variable must be the path (with or without the trailing backslash)
of the folder you want to be your media folder. "D:\media" would be a good choice.

Then you just run zvMedia.exe with no arguments. Try to insert and remove your CD/DVD-s or removable drives and see what happens
in your media folder. Upon insertion and removal of media and removable devices the subfolder should appear and disappear.

If they do not, try to play with AutoPlay settings

Install TweakUI if you do not have it installed already, open it, go to "My Computer / AutoPlay / Types" and play with the settings there.
(TweakUI changes the registry value HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun.)
You might need to reboot.

It seems CD-ROM Autorun itself may not be disabled i.e.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\AutoRun must be 1.

I can not say for sure. I tried it and it did not work. Then I disabled "Autoplay for CD and DVD drives" and rebooted, and it worked :)
But ... I enabled it again and rebooted, I expected it not to work - it worked.
Windows is tricky business.

version
-------
This is an alfa version. If there will be enough interest for this app, I will recode it to be a Windows service.
Now it is a command line application that must be running if you want your media to be mounted and
unmounted automatically. If you want it to start automatically, make an appropriate entry in
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
or in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
or put zvMedia.exe in Start Menu / Programs / Startup.
If you want to hide the command window use nircmd (http://www.nirsoft.net/utils/nircmd.html).

This version is not a Unicode build.

limitations
-----------
While it is possible to mount your CD/DVD-s in a folder, not
all applications can work with that. For example, not all video players will work, and not with every file format.
Some examples: KMPlayer will not play avi files, but will play vob files. VLC plays avi files and probably everything else.
As far as I remember the Windows Media Player in XP did not work either. It seems the newer operating systems
deal with it better. I tried mounting a DVD in a folder on Windows 7 and Windows Media Player worked.

It would be nice to hide the drive letters for CD/DVD drives, but it seems it is not possible. When I removed the drive letters
in Disk Management, zvMedia did not work. I tried to hide them in TweakUI, but they have shown up again upon insertion.

It seems, if zvMedia.exe is started from a Remote Desktop session, it does not get notified of CD/DVD media insertion/removal (does
not receive WM_DEVICECHANGE message). I suppose this will work when I turn it into a service.
