@ECHO OFF
:: make shortcut menu ::::::::::::::::::::::::::::::::::::::::::::::
set subdir1=true
set em_shortcut_name=Emulator Manager
set execute_path=tools\emulator\bin
set em_execute_file=emulator-manager.exe
set icon_path=tools\emulator\icons
set em_icon_file=em.ico

set program_path=%INSTALLED_PATH%\%execute_path%
set desktop_menu_icon_path=%INSTALLED_PATH%\%icon_path%

echo Program path : %program_path%
echo Desktop menu icon path : %desktop_menu_icon_path%
echo Setting shortcut...
if not "%MAKESHORTCUT_PATH%" == "" (
	wscript.exe "%MAKESHORTCUT_PATH%" /shortcut:"%em_shortcut_name%" /target:"%program_path%\%em_execute_file%" /icon:"%desktop_menu_icon_path%\%em_icon_file%" /subdir1:"%subdir1%"
)
echo Setting registry
reg add "hklm\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"  /f /v "%program_path%\%em_execute_file%" /t REG_SZ /d RUNASADMIN

:: make $USERNAME.lock file
echo %SDK_DATA_PATH%> "%program_path%\.%USERNAME%.lock"
echo COMPLETE
