@ECHO OFF

REM =============================================================
REM Batch file to configure Probate Plus options then launch app.
REM =============================================================
REM 	Assign your configuration variables below.
REM 	Surround with quotes "" if they contain spaces.
REM 	Use at your own risk!
REM 	(C) Law Systems Limited 2019 Web : lawsystems.co.uk
REM =============================================================

SET PP_DataFolderPath=
SET PP_CloudLM_StoreID=
SET PP_CloudLM_UserID=
SET PP_ExePath="C:\Program Files (x86)\Law Systems Limited\Probate Plus v5\Prowin32.exe"

REM =============================================================
REM *** DON'T EDIT BELOW THIS LINE ***
REM =============================================================


ECHO Probate Plus launch config utility

REM ********************************************
REM Sets Probate Plus data folder...
REM ********************************************
IF NOT [%PP_DataFolderPath%]==[] ( 
	ECHO|set /p="Set data folder entry..."
	REG ADD "HKCU\Software\Law Systems Limited\Probate Plus\5.0\Database" /v DataPath /t REG_SZ /d %PP_DataFolderPath% /f 
)

REM ********************************************
REM Sets Probate Plus CloudLM credentails...
REM ********************************************
IF NOT [%PP_CloudLM_StoreID%]==[] ( 
	ECHO|set /p="Set CloudLM Store ID..."
	REG ADD "HKCU\Software\Law Systems Limited\Probate Plus\5.0\Licencing" /v CloudLM_GUID /t REG_SZ /d %PP_CloudLM_StoreID% /f 
)

IF NOT [%PP_CloudLM_UserID%]==[] ( 
	ECHO|set /p="Set CloudLM User ID..."
	REG ADD "HKCU\Software\Law Systems Limited\Probate Plus\5.0\Licencing" /v CloudLM_Username /t REG_SZ /d %PP_CloudLM_UserID% /f 
)

REM ********************************************
REM Executes the Probate Plus application
REM ********************************************
IF NOT [%PP_ExePath%]==[] ( 
	START "" %PP_ExePath% 
	EXIT 0
) ELSE (
	pause
)
