[windows2000] Re: Using KIXtart to update HOST files??

  • From: Dogers <dogers@xxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Thu, 4 Nov 2004 16:29:15 +0000

If you just want to add lines, it should be a simple case of opening
the file for writing, writing the line out and closing it..

Something like-
IF Open($handle, "path/to/hosts/ive/forgotten", 4) = 0
    Writeline($handle, "          somecomputer" + @CRLF)

KiX isnt really that great at editing lines in a text file however.
Removing them would be rather trickier! You'd have to read through
each line, checking to see if its the one you want, skipping it if it
is and carrying on writing the rest back out..!


On Thu, 4 Nov 2004 11:11:20 -0500, Etts, Russell <retts@xxxxxxxxxx> wrote:
> Hi all 
> I am using Kixtart as my login script (WARNING - I'm a scripting newbie!). 
> Has anyone had any luck in creating a script that will update a HOST file? 
> Help?? 
> Thanks 
> Russell 
> Remember, you can't spell "Quality" without "IT"
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
To Unsubscribe, set digest or vacation
mode or view archives use the below link.


Other related posts: