Question

  Asked: May 1 2006   8:30 AM GMT
  Asked by: MALSSLLP


How to modify driver file via vbscript?


Development, Distribution/logistics applications, Computer Associates, Microsoft Windows, VBScript

We need to modify the services driver file found in C:WindowsSystem32Driveretc. We want to include an addendum to the file not overwrite the file via an msi for a particular application. What is the easiest way to do this? If we use capture via Wise, we end up having the file overwritten.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Unless there are other circumstances precluding this, wouldn't it be best to simply read in the existing file and append your additions, then rewrite it? I may be missing something here, but that is the approach I would attempt first, as it is essentially a plain text file.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development, SAP and Storage.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

skbinmul  |   May 3 2006  11:02PM GMT

You might try the copy command, with the append option:

copy C:WindowsSystem32DriveretcSourcefile.ext + C:WindowsSystem32DriveretcAppendedDataFile.ext C:WindowsSystem32DriveretcDestinationfile.ext

then save your source file by renaming it, and either copy your destination file to the source file or simply rename the destination file to the source file’s name.

I’ve never had to use it, but if you’re not working with text files, you could try the /B copy commandline switch to indicate binary files.

Hope this helps.