Scripting Question

Extraction Script

01/19/2009 2566 views
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
echo Can't find correct driverpackage to your computer
echo Please fix this problem and run start_sysprep.cmd again
exit 1
7za.exe x -y -o..\Drivers\ driverpacks\%DRVPACK%
0 Comments   [ + ] Show comments


Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

All Answers

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.
Answered 01/19/2009 by: aogilmor
9th Degree Black Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


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