Creating an MSI
Having USBDLM as an MSI with included USBDLM.INI file is useful for distributing USBDLM in a network by means of a group policy, admins know better than I do...
The USBDLM.MSI provided up to V4.5.9 is created by means of OnDemand WinInstall LE.
Bug: For all versions I used identical product and update GUIDs. The result is that you can use any version to uninstall another, but updates do not work. So, for an update it is necessary to uninstall the previous version and then install the new one.
Beginning with V4.6 the Microsoft WIX toolset is used for creating the MSI. Here correct GUIDs are used, so updates work but for uninstalling the exact version used for installing is required.
Updating very old version of USBDLM please install V4.4 first, then the latest version. The reason is that for stopping the USBDLM service USBDLM's command-line parameter -silentstop is used. This was not available until V4.4.
You need the Microsoft WIX toolset. Download the WIX3x.MSI, right click -> Install.
If there is no Visual Studio installed it may come first with a warning message. Just click OK, its about the Visual Studio integration only.
WiX installs to the default programs folder, e.g. to "C:\Program Files\WiX Toolset v3.8", the folder where the environment variable %ProgramFiles% points to.
WiX requires the .NET 3.5 Framework.
Under Win7 the .NET 3.5 framework can be activated in the Control Panel -> Programs and Features -> Turn Windows feature on or off.
Or by command-line:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /ALL /NoRestart
Here is the WIX script for USBDLM: USBDLM.WXS.ZIP
In this script there is a line for adding the "USBDLM_sample.ini", change this into "USBDLM.INI" if you need one.
Put the files from the USBDLM.ZIP archive into the USBDLM folder, the USBDLM.WXS, your customized USBDLM.INI and a make_msi.cmd like this:
@echo off
set WiX_Path=%ProgramFiles%\WiX Toolset v3.8\bin
if not exist "%WiX_Path%" echo !!!!!!!!!!! WiX not found !!!!!!!!!!!!! & pause & goto ExitPoint
rem -- ensure the folder of the CMD file is the current folder --
cd /D %~dp0
rem -- execute WiX candle and light, pause & exit if error --
"%WiX_Path%\candle.exe" -dProcessorArchitecture=x86 -arch x86 -out USBDLM.wixobj USBDLM.wxs
if errorlevel 1 pause & goto ExitPoint
"%WiX_Path%\light.exe" -out USBDLM.msi USBDLM.wixobj
if errorlevel 1 pause & goto ExitPoint
rem -- cleanup --
del USBDLM.wixobj
del USBDLM.wixpdb
:ExitPoint
For the x64 version change x86 to x64:
"%WiX_Path%\candle.exe" -dProcessorArchitecture=x64 -arch x64 -out USBDLM.wixobj USBDLM.wxs
The wixpdb file created where the MSI is created, so, if you change -out to another folder then put this path to the "del USBDLM.wixpdb" line too.