@echo off

echo Adding registry keys (%PROCESSOR_ARCHITECTURE%).

if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    set KEY=HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource
) else (
    set KEY=HKLM\SOFTWARE\Garmin\MapSource
)	
echo Root key = %KEY%

@echo on


reg DELETE %KEY%\Families\FAMILY_5748 /va /f

reg ADD %KEY%\Families\FAMILY_5748 /v ID /t REG_BINARY /d 7416 /f
reg ADD %KEY%\Families\FAMILY_5748 /v IDX /t REG_SZ /d "%~dp0osm.mdx" /f
reg ADD %KEY%\Families\FAMILY_5748 /v MDR /t REG_SZ /d "%~dp0osm_mdr.img" /f
reg ADD %KEY%\Families\FAMILY_5748 /v TYP /t REG_SZ /d "%~dp0osm_5748.typ" /f

reg ADD %KEY%\Families\FAMILY_5748\1 /v Loc /t REG_SZ /d "%~dp0\" /f
reg ADD %KEY%\Families\FAMILY_5748\1 /v Bmap /t REG_SZ /d "%~dp0osm.img" /f
reg ADD %KEY%\Families\FAMILY_5748\1 /v Tdb /t REG_SZ /d "%~dp0osm.tdb" /f
