Installation

USBDLM

 

Installation


 

Unzip the distribution file (USBDLM.ZIP), e.g. to your programs folder (a USBDLM folder is included). On NTFS formatted drives this requires admin privileges.

As result the files should be in a folder like C:\Program Files\USBDLM

 

Under Vista and Windows 7/8 I suggest to install USBDLM in a different folder than C:\Program Files, because under this folder changes of the USBDLM.INI made by a non elevated user are redirected into the "Vista Virtual Store" where USBDLM will not read it.

In a folder like C:\Tools\USBDLM there is no problem. Or just always open the INI file by means of the _edit-ini.cmd, it asks for admin privileges if required.

 

USBDLM will not run from a network or subst drive, it must be located on a "real" local drive.

 

Then enter your preferred configuration into the USBDLM.INI (see below). There is a sample file

included called USBDLM_sample.INI. Either rename the sample file or just run the _edit-ini.cmd, it creates and opens a basic USBDLM.INI if there is none.

On an NTFS formatted drive editing the USBDLM.INI requires admin privileges. Under Vista/Win7/8 you should start the Editor elevated, otherwise the USBDLM.INI might be redirected into the Vista virtual store where it has no effect. This is what the _edit-ini.cmd does.

 

If you are logged on with administrator privileges you can simply register the USBDLM service.

 

_service_register.cmd

 

This does not copy any files, it only registers USBDLM as service and starts the service.

Without administrator privileges you will be asked for.

 

Once installed USBDLM is permanently running as Windows service. The service starts automatically on Windows startup.

Remember: Once installed as service it does not matter from where the service is started. The USBDLM.EXE is loaded from the folder where the _service_register.cmd had been started from!

 

 

Deinstallation:

You can deregister the service using parameter -deregister, this is what the _service_deregister.cmd does:

 

_service_deregister.cmd

 

This stops the service and deregisters it. It does not remove any files.

 

 

Silent

 

Installation and deinstallation can be done without the message box by using

 

USBDLM -silentregister

USBDLM -silentderegister

 

It returns Errorlevel 0 on success, 1 on failure.

 

 

Start and stop the USBDLM service

 

You can stop and start the installed service by means of the NET command:

 

net stop USBDLM

net start USBDLM

 

or by means of the _service_stop and _service_start command script which are using the USBDLM.EXE and request admin privileges if required.

 

 

You can change the drive letter settings in the USBDLM.INI without restarting the service because it's checked for changes each time a drive event occurs.

 

Since V4.2 most other settings take effect without restarting the service. The only exception are settings which result in registration for device notifications (as NoMediaNoLetter=1 or [OnRemovalRequest]). This is done then when the device in question is reattached or the service is restarted.

 

See configuration.

 

 

Hint:

 

The command scripts contain simple command lines like

"%~dp0USBDLM" -register

 

%~dp0 is the placeholder for the drive and path to the CMD file. How does it work? %0 is placeholder for the running CMD file like C:\Program Files\USBDLM\_service_register.cmd.

~dp is a "modifier" which delivers drive and path like C:\Program Files\USBDLM. Because of the possible space character in the path it must be quoted.

 

Read more about batch parameters and modifiers here:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx