Re: adding a line to .ini file



"GYIPT" <GYIPT@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B0601C1A-E607-40F3-AD3F-24CA0CD1D376@xxxxxxxxxxxxxxxx
Hello Scripters,
I have found a good reading on how to edit a .ini file but what I wanted
to
do instead of editing the .ini File, I would like to add a line via
scripting. Help! I need a script that can add line on a .ini file.

If you simply want to append to the bottom, you could use something like
this:

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set oFSO = CreateObject("Scripting.FileSystemObject")

With oFSO.OpenTextFile("C:\MyINI.ini", 8)
.WriteLine "NewSetting=NewValue"
End With
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


.



Relevant Pages

  • Re: modify INI file with IP address
    ... > workstation just by using their IP address? ... Changing the content in the INI file or replace the file with another? ... is this Active Directory domain computers? ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: vbscript for texthandling WinXP
    ... Version 3 has an activeX control you can use from scripting. ... supports ini file reads and writes such as in ... set aut = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: Verifying Computer on the Network
    ... I am reading the computer name from a text file, and using a loop, ... > I am changing the .INI file. ... You could ping the computers first, take a look at the IsConnectible ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • adding a line to .ini file
    ... I have found a good reading on how to edit a .ini file but what I wanted to ... do instead of editing the .ini File, I would like to add a line via ... scripting. ...
    (microsoft.public.scripting.vbscript)
  • Re: ANN:subreal.PIN v1.0.1.12
    ... > and are added under automatic creation ini file. ... > # Window of editing the link has Mail Address. ... > # Corrections in property TPinRLink.ClipboardText ... > # Change syntax dialogue tag's in links. ...
    (borland.public.delphi.thirdpartytools.general)