fix detection of script shell starting point

This commit is contained in:
2026-07-07 09:59:06 +02:00
parent fc3697be98
commit a02d857c12
+1 -1
View File
@@ -1,6 +1,6 @@
@echo off @echo off
echo %cmdcmdline% | findstr /i /c:"%~nx0" >NUL && set iscommandline=1 echo %cmdcmdline% | findstr /i /c:"%~nx0" >NUL && set iscommandline=1
echo %PSModulePath% | findstr "%USERPROFILE%" >NUL && set ispowershell=1 echo %PSModulePath% | findstr /i /c:"%USERPROFILE%" >NUL && set ispowershell=1
cd /D "%~dp0" cd /D "%~dp0"
echo. echo.