Installing Device Drivers for Hardlock Dongles
==============================================

05-01-2023    version 8.31 - 26-10-2021

The program haspdinst.exe is now the defined application for installing the 
device drivers for the Hardlock dongles.  In 2021, Thales (the supplier) 
removed the install from HASPUserSetup.exe, but continues to support it in 
haspdinst.exe.

However, Thales recently announced that support for the Hardlock dongle will 
finish in May 2023.  JKSimBlast uses a Sentinel dongle which is coded as a 
Hardlock, for compatibility.  Soft-Blast is now working on a new dongle for 
JKSimBlast, and this will be offered to users as an exchange when it is ready. 
However, it is expected that it will not be necessary for users to exchange 
their dongles until Windows is no longer compatible with the last version of 
the dongle drivers.

haspdinst.exe is a command line program only - this means that it runs in a 
command window.  Because it is an installer, it requires Administration 
rights to perform the install.

V8.31 is the last installer that supports Hardlock dongles.

The install can be run from a command window, or using the batch files 
provided with the JKSimBlast install (see below).



To download the relevant version of haspdinst.exe:
--------------------------------------------------
1. Go to this web page:
   https://cpl.thalesgroup.com/software-monetization/sentinel-drivers

2. Click the link for "Sentinel HL" or "Sentinel LDK Run Time & Drivers"

3. On the next web page, run a search for "Sentinel 8.31"

4. Click the link for the runtime package for v8.31, and follow the prompts to 
   download the file.

5. After download, right-click the downloaded file, select Properties, and 
   Unblock the file under Security.

6. Extract the contents to a temporary folder.



To install the dongle drivers:
------------------------------
1. Make sure that there are no applications running that use the Sentinel 
   dongle, and remove any dongles.


2. Open a command prompt - search under the Start menu - right-click on 
   Command Prompt and select "Run As Administrator"

3. Navigate to the extracted folder, enter:
      cd (type the folder path)

4. Run haspdinst to display the program options:
      haspdinst.exe -help

5. Display details of the currently installed version and in this installer:
      haspdinst.exe -info

6. If you have previously installed, or wish to update, then remove the 
   previous installation of the Hardlock drivers:
      haspdinst.exe -r -fr -kp -fss -purge
   
   After running this, it is recommended to reboot.

7. Run haspdinst to install the Hardlock drivers:
      haspdinst.exe -i -fi -kp -fss -ld



Installing from a batch file:
-----------------------------
Alternatively, a batch file can be used to perform the above functions.  The 
following section contains batch scripts to displ;ay options, information, 
install and remove an install;ation.  Copy the section to a new text file and 
save under the relevant file name.

Right-click one of the batch files and select "Run as Administrator"

- display the program options:
   haspdinst-help.bat

- display details of the currently installed version and in this installer:
   haspdinst-info.bat

- install the Hardlock drivers:
   haspdinst-install.bat

- remove a previous installation (after this, it is recommended to reboot):
   haspdinst-remove.bat



haspdinst-help.bat
-------------------------------------------------------------------------------
@echo off
setlocal EnableDelayedExpansion
%~d0
cd "%~dp0"

  net session >nul 2>&1
  if %ErrorLevel% EQU 0 (
    "%~dp0haspdinst.exe" -h
  ) else (
    echo.
    echo               Administrator Privileges not available.
    echo.
    echo               The batch program will terminate.
    echo               Press any key to close.
    pause >nul
  )
endlocal
-------------------------------------------------------------------------------



haspdinst-info.bat
-------------------------------------------------------------------------------
@echo off
setlocal EnableDelayedExpansion
%~d0
cd "%~dp0"

  net session >nul 2>&1
  if %ErrorLevel% EQU 0 (
    "%~dp0haspdinst.exe" -info
  ) else (
    echo.
    echo               Administrator Privileges not available.
    echo.
    echo               The batch program will terminate.
    echo               Press any key to close.
    pause >nul
  )
endlocal
-------------------------------------------------------------------------------



haspdinst-install.bat
-------------------------------------------------------------------------------
@echo off
setlocal EnableDelayedExpansion
%~d0
cd "%~dp0"

  net session >nul 2>&1
  if %ErrorLevel% EQU 0 (
    "%~dp0haspdinst.exe" -i -fi -kp -fss -ld
  ) else (
    echo.
    echo               Administrator Privileges not available.
    echo.
    echo               The batch program will terminate.
    echo               Press any key to close.
    pause >nul
  )
endlocal
-------------------------------------------------------------------------------



haspdinst-remove.bat
-------------------------------------------------------------------------------
@echo off
setlocal EnableDelayedExpansion
%~d0
cd "%~dp0"

  net session >nul 2>&1
  if %ErrorLevel% EQU 0 (
    "%~dp0haspdinst.exe" -r -fr -kp -fss -purge
  ) else (
    echo.
    echo               Administrator Privileges not available.
    echo.
    echo               The batch program will terminate.
    echo               Press any key to close.
    pause >nul
  )
endlocal
-------------------------------------------------------------------------------
