/build/static/layout/Breadcrumb_cap_w.png

Extraction Script

Here is a script that I am using. it pulls info from a driverpacks.ini. the info listed in this file looks like:
optiplex 755=755.7z
optiplex 960=906.7z and so on
I have verified that the first 2 values %%i and %%k are pulled corectly and match up but the %%l value does not. it is suppose to get the name of the device match it with the name in the driverpack.ini file the set DRVPACK to the value after the = sign from driverpacks.ini. I need help getting this to work please. Thank You ahead of time.


@echo off
rem Get computer model and extract right driverpackage
winbios.exe | findstr "Product Name" > info.txt
FOR /F "usebackq delims== tokens=2 delims==" %%i IN (`type info.txt`) DO set MODEL=%%i
FOR /F "usebackq delims== tokens=1,2 delims==" %%k IN (`type driverpacks.ini`) DO (
if "%%k"=="%MODEL%" set DRVPACK=%%l && GOTO EXTRACT
)
:ERROR
echo Can't find correct driverpackage to your computer
echo Please fix this problem and run start_sysprep.cmd again
echo.
pause
exit 1
:EXTRACT
7za.exe x -y -o..\Drivers\ driverpacks\%DRVPACK%
:END

0 Comments   [ + ] Show comments

Answers (1)

Posted by: aogilmor 15 years ago
9th Degree Black Belt
0
hm, would like to help more but it's my day off :-) but first thing i'd do is check to see that the values do indeed match, if your script depends on it. run the utils manually and compare the output.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ