On error resume next ''THIS FILE WILL ADD MORE TO THE BOTTOM OF THE *HOSTS* FILE'' ''SET SOME VARIABLES'' Dim objFileSystem, objOutputFile Dim strOutputFile Const OPEN_FILE_FOR_APPENDING = 8 '''IF THE FILE DID NOT EXIST WE WILL CREATE IT'' Set objFileSystem = CreateObject("Scripting.fileSystemObject") If not objFileSystem.FileExists ("C:\WINDOWS\system32\drivers\etc\hosts") then strOutputFile = "C:\WINDOWS\system32\drivers\etc\hosts" Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE) objOutputFile.Close Err.Clear end if ''OPEN THE FILE THAT ALREADY EXISTS FOR WRITING'' Set objFileSystem = CreateObject("Scripting.fileSystemObject") strOutputFile = "C:\WINDOWS\system32\drivers\etc\hosts" Set objOutputFile = objFileSystem.OpenTextFile(strOutputFile, 8) ''THIS IS WHAT WE WRITE TO THE FILE'' objOutputFile.WriteLine("# Batch Rename 3.26 - Contacts the internet by itself#") objOutputFile.WriteLine("# This page must not be availible because the program will contact it#") objOutputFile.WriteLine(" ") objOutputFile.WriteLine("0.0.0.0 foryoursoft.com") objOutputFile.WriteLine(" ") ''WE CLOSE THE FILE'' objOutputFile.Close Set objFileSystem = Nothing msgbox "You have succesfully added 'foryoursoft.com' to Non-Allowed internet pages" WScript.Quit(0)