Guest User

Untitled

a guest
Aug 3rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. Editting the registry in VB.NET
  2. Dim regVersion As RegistryKey
  3. regVersion = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\services\USBSTOR", True)
  4.  
  5. Try
  6. Dim intVersion As Integer = 4
  7. intVersion = regVersion.GetValue("Start", 0)
  8. intVersion = intVersion + 1
  9. End If
  10. Dim p As New ProcessInfo(regVersion.SetValue("Start", intVersion))
  11. p.UseShellExecute = False
  12. p.Domain = "domain"
  13. p.UserName = "Yoosuf"
  14. p.Password = New System.Security.SecureString()
  15. Dim q As New System.Security.SecureString()
  16. For Each c As Char In
  17. q.Password.AppendChar(c)
  18. Next
  19. Process.Start(p)
  20. regVersion.Close()
  21. Catch es As Exception
  22. End Try
  23.  
  24. Dim p As New ProcessInfo()
  25.  
  26. Dim p As New ProcessInfo(regVersion.SetValue("Start", intVersion))
  27.  
  28. <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Add Comment
Please, Sign In to add comment