OSDN Git Service

Version 5.91
[vbslib/main.git] / scriptlib / BatchFiles / ShortHandPrompt.bat
diff --git a/scriptlib/BatchFiles/ShortHandPrompt.bat b/scriptlib/BatchFiles/ShortHandPrompt.bat
new file mode 100644 (file)
index 0000000..5ed4bc5
--- /dev/null
@@ -0,0 +1,33 @@
+@echo off\r
+call :SetVariables "%~0"\r
+\r
+%close_at_end%  %cscript% //nologo "%vbslib_root%\vbslib Prompt.vbs"  %1 %2 %3 %4 %5 /pause\r
+\r
+goto :eof\r
+\r
+\r
+REM ********************************************************************\r
+REM  Function: SetVariables\r
+REM ********************************************************************\r
+:SetVariables\r
+if     "%ProgramFiles(x86)%" == ""  set cscript=cscript\r
+if not "%ProgramFiles(x86)%" == ""  set cscript=%windir%\SysWOW64\cscript.exe\r
+\r
+set close_at_end=\r
+set not_close=cmd.exe /K\r
+\r
+call :GetParentPath "%~1"\r
+call :GetParentPath "%ret%"\r
+call :GetParentPath "%ret%"\r
+set vbslib_root=%ret%\r
+\r
+goto :eof\r
+\r
+\r
+REM ********************************************************************\r
+REM  Function: GetParentPath\r
+REM ********************************************************************\r
+:GetParentPath\r
+set ret=%~dp1\r
+set ret=%ret:~0,-1%\r
+goto :eof\r