@echo off&set FileName=%~n0&shift :: ============================================= :: AutoHelp PlugLab Concept: 2006 by Reatogo :: ============================================= :: Help Info: :: ======================= set Routine_Type=1 :: 1=Getting Data 2=Prompts 3=Getting Files 4=Creating Files 5=General set Routine_Vers=1 set Routine_Date=2007-02-15 set RoutineName=RegRead set RoutineAuthor=Siegfried set Using_work_from= set Example_call_1=%%RegRead%% "HKEY_LOCAL_MACHINE\SOFTWARE\Acronis\DiskDirector\Settings" "ExePath" "MyVarName" set Example_call_2= set Example_call_3= set text_01=Returns the registry value as a variable e.g. %%MyVarName%%. set text_02=If param 3 is left empty, the value is returned as %%result%%. if "%~1" == "GetHelp" goto :EOF echo.&echo %* :: ============================================= set MyRegKey=%~1 set MyRegVal=%~2 set MyVarName=%~3 if "%~3" == "" set MyVarName=result "%APPs%\xFUNCs.exe" "REGREAD" "%MyRegKey%" "%MyRegVal%" set MyRegKey= set MyRegVal= if exist "%temp%\TempLab.cmd" ( call "%temp%\TempLab.cmd" del "%temp%\TempLab.cmd" ) set %MyVarName%=%result% echo %MyVarName% is "%result%" goto :EOF