0% found this document useful (0 votes)
81 views2 pages

Realtek ALC255 Audio Codec Installation

This document is a batch script for installing the Realtek Audio Codec_M ALC255 driver. It logs the installation process, checks the operating environment, and uses either DISM or pnputil commands to add the driver based on the environment. The script also creates a log file to track the installation steps and any errors encountered.

Uploaded by

Paul Molin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views2 pages

Realtek ALC255 Audio Codec Installation

This document is a batch script for installing the Realtek Audio Codec_M ALC255 driver. It logs the installation process, checks the operating environment, and uses either DISM or pnputil commands to add the driver based on the environment. The script also creates a log file to track the installation steps and any errors encountered.

Uploaded by

Paul Molin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

@echo off

REM Created by MVP v2.0.9.5


REM Please replace DriverProvider, DriverCategory, DriverItemType variables with
exact names
title Installing Realtek Audio Codec_M ALC255
SET OSDST=%~d0
if not exist %~d0\OEM\Preload\Command\POP*.ini set OSDST=C:
if not exist %OSDST%\OEM\AcerLogs md %OSDST%\OEM\AcerLogs
SET LogPath=%OSDST%\OEM\AcerLogs\[Link]
ECHO.>>%LogPath%
ECHO Installing, please wait...
SETLOCAL ENABLEDELAYEDEXPANSION
pushd "%~dp0"

ECHO %DATE% %TIME%[Log START] ============ %~dpnx0 ============ >> %LogPath%

SET OSEnv=Online
ECHO %DATE% %TIME%[Log TRACE] reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\
Windows NT\CurrentVersion\WinPE" >>%LogPath% 2>&1
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinPE"
>>%LogPath% 2>&1
ECHO.>>%LogPath%
if !errorlevel! equ 0 (
ECHO !DATE! !TIME![Log TRACE] Running in the WinPE, SET OSEnv=Offline >>
%LogPath%
SET OSEnv=Offline
) else if /i "%SystemDrive%" neq "%OSDST%" (
ECHO !DATE! !TIME![Log TRACE] Running in the Offline, SET OSEnv=Offline >>
%LogPath%
SET OSEnv=Offline
) else (
ECHO !DATE! !TIME![Log TRACE] This is Online installation. >>%LogPath% 2>&1
)

if exist %OSDST%\OEM\Preload\Command\POP*.ini ECHO [Realtek Audio Codec_M ALC255]>>


%OSDST%\OEM\Preload\[Link]
for /f "tokens=*" %%v in ([Link]) do (
if /i "%OSEnv%" equ "Offline" (
ECHO !DATE! !TIME![Log TRACE] DISM /image:%OSDST%\ /add-driver
/driver:"%%v" >> %LogPath%
DISM /image:%OSDST%\ /add-driver /driver:"%%v" >> %LogPath% 2>&1

) else (
ECHO !DATE! !TIME![Log TRACE] pnputil /add-driver "%%v" /install >>
%LogPath%
pnputil /add-driver "%%v" /install >> %LogPath% 2>&1
ECHO !DATE! !TIME![Log TRACE] pnputil -i -a "%%v" >> %LogPath%
pnputil -i -a "%%v" >> %LogPath% 2>&1
)
ECHO.>>%LogPath%

for /f "skip=1 tokens=2 delims=,;" %%s in ('find /i "DriverVer" "%%v"') do (


if exist %OSDST%\OEM\Preload\Command\POP*.ini ECHO %%~nxv=%%s>> %OSDST%\
OEM\Preload\[Link]
)
)
if exist %OSDST%\OEM\Preload\Command\POP*.ini ECHO.>> %OSDST%\OEM\Preload\
[Link]

ECHO %DATE% %TIME%[Log Leave] ============ %~dpnx0 ============ >> %LogPath%


ECHO.>>%LogPath%

popd
SETLOCAL DISABLEDELAYEDEXPANSION
ECHO Install finished

You might also like