batch to copy extracted text to new txt

November 24, 2010 at 00:08:37
Specs: Windows 7
I have created a batch file to extract some texts from TXTSETUP.OEM

TXTSETUP.OEM has the following information:
iaAHCI_ESB2 = "Intel(R) ESB2 SATA AHCI Controller"
iaAHCI_7RDH = "Intel(R) ICH7R/DH SATA AHCI Controller"
...

The batch file is:
@echo off
setLocal enableDELAYedeXpansion
for /f "tokens=2* delims== " %%a in ('find /n "SATA" ^< TXTSETUP.OEM') do echo %%a %%b= OEM

result:
"Intel(R) ESB2 SATA AHCI Controller" = OEM
"Intel(R) ICH7R/DH SATA AHCI Controller" = OEM
..
what i want is batch to copy the result to WINNT.SIF in [MassStorageDrivers] section & after "IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller" = "RETAIL" line
please help..
sorry for bad english
hope it clear


See More: batch to copy extracted text to new txt

Report •


#1
November 24, 2010 at 01:30:00
Please post your WINNT.SIF


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
November 24, 2010 at 01:36:57
[Data]
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"
AutomaticUpdates=yes

[Unattended]
OemSkipEula=Yes
TargetPath=\WINDOWS
WaitForReboot="No"
Repartition=No
UnattendSwitch="yes"
OemPreinstall=Yes
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=No
OEMSkipRegional=1
TimeZone=215
OemSkipWelcome=1

[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768
Vrefresh=60

[UserData]
ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="OEM"
ComputerName=OEM-PC

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

[MassStorageDrivers]
"IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller" = "RETAIL"


Report •

#3
November 24, 2010 at 01:54:55
@echo off & setLocal enableDELAYedeXpansion
for /f "tokens=2* delims== " %%a in ('find /n "SATA" ^< TXTSETUP.OEM') do (
echo %%a %%b= OEM
) >> WINNT.SIF


=====================================
Life is too important to be taken seriously.

M2


Report •

Related Solutions

#4
November 24, 2010 at 02:08:11
thanks for the reply
but is there way add new line after "RETAIL"
because the result became like this:
"IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller" = "RETAIL""Intel(R) ESB2 SATA AHCI Controller"= OEM

Report •

#5
November 24, 2010 at 04:47:38
@echo off & setLocal enableDELAYedeXpansion

set V= & echo.!V!>> WINNT.SIF

for /f "tokens=2* delims== " %%a in ('find /n "SATA" ^< TXTSETUP.OEM') do (
echo %%a %%b= OEM
) >> WINNT.SIF


=====================================
Life is too important to be taken seriously.

M2


Report •

Ask Question