|
Howto: Add lines of text from a specific point in a text file.. Hi all,
I wonder if you can help me... I have been doing allot of manual
updates to ini files that i am using and would like to make things a
little easier on myself by trying to automate as much as i can. What
i need at the moment is a way of adding some addition text to a file
that already exists - the catch is that i need to add it to the end of
a group of information and that information starts around the middle
of the file. E.g. below.
E.g. --- SVCPack.inf ---
[CatalogHeader]
[Version]
BuildNumber=2600
MinorVersion=1
MajorVersion=5
Signature="$WINDOWS NT$"
[SetupData]
CatalogSubDir="\I386\svcpack"
[SetupHotfixesToRun]
KB892130.exe /q /n /z
wmp11.exe /q /n /z /o
wmfdist11.exe /q /n /z /o
mscomppackv1.exe /q /n /z /o
wudf01000.exe /q /n /z /o
[ProductCatalogsToInstall]
KB892130.cat
wmp11.cat
WMFDist11.cat
MSCompPackV1.cat
Wudf01000.cat
--- End file ---
So i would like to be able to add additional commands (lines of text)
to the [SetupHotfixesToRun] section of the file by running a single
vbscript. The text/instructions i would like to be able to have
listed in the vbs (or a comma delimited file that can be called from
the vbs)
I would appreciate any suggestions, code snippets etc that can point
me in the write direction.
Cheers,
Darren |