@echo off
::	MakeShortcut.bat
::
set "ShortCutRoot=%HOMEDRIVE%\PortableApps\ShortCut"
set "ShortCutName=ShortCut.exe"
::
set "AppNameRoot=%HOMEDRIVE%\PortableApps\ShortCut"
set "AppName=ShortCut.cmd"
::
set "AppLinkRoot=%PUBLIC%\desktop\PortableApps"
set "AppLinkFile=ShortCut.exe.lnk"
::
set "AppICON=%AppNameRoot%\Shortcut.exe,0"
::

::	2024-08-31
call :Checkdir "%AppLinkRoot%"
::
"%ShortCutRoot%\%ShortCutName%" /T:"%AppNameRoot%\%AppName%" /F:"%AppLinkRoot%\%AppLinkFile%" /I:"%AppICON%" /A:c
echo "%ShortCutRoot%\%ShortCutName%" /T:"%AppNameRoot%\%AppName%" /F:"%AppLinkRoot%\%AppLinkFile%" /I:"%AppICON%" /A:c

if "%~1"=="" (
	%ComSpec% /k
) else (
	%ComSpec% /%~1
)
goto End

::	2024-08-31
:Checkdir
	rem ====----	https://stackoverflow.com/questions/18639663/how-to-pass-command-line-parameters-with-space-in-batch-file

	if exist "%*" (
		exit /b
	)
	if not exist "%*" (
		mkdir "%*"
	)
	if exist "%*" (
		echo "%*" Created
	)
	exit /b

:End
