<In Story>

백그라운드 모드로 실행하기 // [BAT] [VBS] [Script] [MS Windows] [Programming] 본문

Programming/Script

백그라운드 모드로 실행하기 // [BAT] [VBS] [Script] [MS Windows] [Programming]

<In Story, Hi story, History> 2015. 4. 4. 19:38

@Echo off
:_ExecuteFilePath
cls
set /p ExecuteFilePath=Execute file path =
if not exist "%ExecuteFilePath%" (
cls
echo File does not exist or the path is incorrect
echo %ExecuteFilePath%
pause > NUL
goto _ExecuteFilePath
)
echo Dim WinScriptHost > "%TEMP%\ExecuteBG.vbs"
echo Set WinScriptHost = CreateObject("WScript.Shell") >> "%TEMP%\ExecuteBG.vbs"
echo WinScriptHost.Run Chr(34) ^& "%ExecuteFilePath%" ^& Chr(34), 0 >> "%TEMP%\ExecuteBG.vbs"
echo Set WinScriptHost = Nothing >> "%TEMP%\ExecuteBG.vbs"
"%TEMP%\ExecuteBG.vbs"
del /f "%TEMP%\ExecuteBG.vbs"


Run_in_background.zip