/build/static/layout/Breadcrumb_cap_w.png

edit host file

Dim WshObj

Dim fsoObj

Dim WinFolder

Dim hostsFile

 

Set WshObj = CreateObject("WScript.Shell")

Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set fsoObj = CreateObject("Scripting.FileSystemObject")

WinFolder = WshObj.ExpandEnvironmentStrings("%SystemRoot%")

Set hostsFile = fsoObj.OpenTextFile(WinFolder & "\system32\drivers\etc\hosts", ForAppending, True)

 

hostsFile.WriteLine("192.168.255.255                     myhosts.com")

hostsFile.Close

 

Set WshObj = Nothing

Set fsoObj = Nothing


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ