반응형

드라이브 루트 경로에 아래와 같은 폴더(SDI*) 구조로 있으면 찾아서 자동 설치 합니다.

 

Snappy Driver Launcher.bat
0.00MB

 

└▶ Windows 상에서 수동 실행 시: 옵션 없이 실행됨

└▶ Windows 무인 설치(Specialize 구간) 시: -autoinstall -autoclose 옵션 적용됨
└▶ 2025년 4월 30일 갱신

드라이브 루트 경로에 아래와 같은 폴더(SDI*) 구조로 있으면 찾아서 자동 설치 합니다.

│  
└─SDI_KOR_2025.04
    │  DelOldDP.bat
    │  sdi.cfg
    │  SDI_R2503.exe
    │  SDI_x64_R2503.exe
    │  
    ├─drivers
    │      
    ├─Index
    │
    ├─indexes
    │  └─SDI
    │          
    └─tools

 

무인설치 응답파일(unattend.xml) - Specialize 구간에서 자동 설치 됩니다.

 

:: made by	: 무월(Geheimnis)
:: Source URL	: https://noways.tistory.com/2159
@echo off
color 1F
cd /d %~dp0
title EasyDrv Run
mode con cols=100 lines=25

echo.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. 루트 경로에 Snappy 문자가 포함된 폴더를 찾아 설치를 시작합니다. 
echo ────────────────────────────────────────────────────────────────────────────────────────
echo  1. Snappy 경로 [내/외장] rootdrive:\Snappy****
echo.
echo  2. Exit
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. 미선택시 10초 후 Snappy 자동 설치 됩니다.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo.    
CHOICE /C:12 /T 10 /D:1 /M "Pick a Number 1 or 2"
IF ERRORLEVEL 2 exit
IF ERRORLEVEL 1 GOTO Bitcheck1

:Bitcheck1
setlocal enabledelayedexpansion

rem 32비트(x86) / 64비트(x64) 확인
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set bit=x64) else (set bit=x86)

rem 특수 경로 확인 (Setup\Scripts) 및 완료 체크
if /i "%cd%"=="%windir%\Setup\Scripts" if %bit%==x86 if exist "%tmp%\완료.txt" goto :exit
if /i "%cd%"=="%windir%\Setup\Scripts" goto :next

:next
echo.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. Snappy Driver를 설치합니다
echo ────────────────────────────────────────────────────────────────────────────────────────
echo.

ping localhost -n 3 >nul

:usb
for %%a in (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) do (
    for /F "tokens=*" %%b in ('"dir /a:d /b "%%a:\SDI*""') do (
        set "usb=%%a"
        set "folder=%%b"
        goto :find
    )
)

cls
echo.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. 각 드라이브 루트에 Snappy 포함된 폴더가 없습니다
echo ────────────────────────────────────────────────────────────────────────────────────────
echo.     
ping localhost -n 7 >nul
exit

:find
cls
echo.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. Snappy Driver Installer (%bit%) 버전 실행 파일을 찾고 있습니다
echo ────────────────────────────────────────────────────────────────────────────────────────
echo.

set "target="
set "targetpath="

if "%bit%"=="x64" (
    for /f "delims=" %%f in ('dir /b /s "%usb%:\%folder%\SDI_x64_R*.exe"') do (
        set "targetpath=%%~dpf"
        set "target=%%~nxf"
        goto :run
    )
) else (
    for /f "delims=" %%f in ('dir /b /s "%usb%:\%folder%\SDI_R*.exe"') do (
        set "targetpath=%%~dpf"
        set "target=%%~nxf"
        goto :run
    )
)

rem 파일을 찾지 못한 경우
cls
echo.
echo ────────────────────────────────────────────────────────────────────────────────────────
echo. "%usb%:\%folder%" 에서 Snappy 실행 파일을 찾지 못 했습니다
echo ────────────────────────────────────────────────────────────────────────────────────────
echo.     
ping localhost -n 7 >nul
exit

:run
setlocal enabledelayedexpansion

set "original_cd=%cd%"

for %%I in ("%targetpath%%target%") do (
    set "drv_path=%%~dpI"
    set "exe_name=%%~nxI"
)

pushd "!drv_path!"

echo.
echo ─────────────────────────────────────────────────────────────────────
echo. "!exe_name!" 실행 중...
echo ─────────────────────────────────────────────────────────────────────
echo.

set "CommonOptions=-autoinstall -autoclose"

if /i "%original_cd%"=="%windir%\Setup\Scripts" (
    "!exe_name!" !CommonOptions!
) else (
    "!exe_name!"
)

popd

if /i "%original_cd%"=="%windir%\Setup\Scripts" if "%bit%"=="x64" (
    echo.>"%tmp%\완료.txt"
    exit
)

if /i "%original_cd%"=="%windir%\Setup\Scripts" (
    del /f /a /q "%~0"
    exit
)

exit

:exit
if exist "%tmp%\완료.txt" del /f /a /q "%tmp%\완료.txt"
del /f /a /q "%~0"
exit

 

Snappy Driver 자동설치 테스트 - 움짤 GIF

 

반응형

+ Recent posts