@echo off
:: ===============================================================================
:: AppFileName:	InstallAppMenu.bat
:: Date:		2025-03-23 21:00:58
:: Version:		1.25.03.23
:: Author:		lsl
:: ===============================================================================
rem ====----	EndCmd
if "%~1"=="" (
	set "EndCmd=k"
) else (
	set "EndCmd=c"
)

rem ====	基本系統設定 set 一定要加""避免空白
set "Driver=%~d0"
set "FilePath=%~p0"
set "ConfFile=%~n0"
set "FullPath=%~dp0"
set "FullPathFile=%~f0"

set "InstallAppMenuPath=%FullPath%"

title %~nx0

rem ====----	IsAdmin
call :IsAdmin

cd /D "%Driver%%FilePath%"
rem ==--
::N:\Restore_T\
if exist "Apps\InstallApp\InstallApp_Menu.cmd" (
	echo	Apps\InstallApp\InstallApp_Menu.cmd
	cd Apps\InstallApp\
	call InstallApp_Menu.cmd c
	cd ..\..\
)

goto End

:IsAdmin
	reg.exe query "HKU\S-1-5-19\Environment" >nul
	if not %ERRORLEVEL% EQU 0 (
		echo 必須「以系統管理員身分執行」
		echo You must have administrator rights to continue ...
		pause & exit
	)
	exit /b

:End
	cd /D "%InstallAppMenuPath%"
	%ComSpec% /%EndCmd%