Ir para conteúdo
Faça parte da equipe! (2024) ×
Conheça nossa Beta Zone! Novas áreas a caminho! ×
  • Quem está por aqui   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.

visual basic Como criar um otimizador de Windows [ Regedit ]


[N]ARUTO_
 Compartilhar

Posts Recomendados

Primeiramente Crie um projeto com :

* 11 Checkbox

* 1 Listview

* 1 Button

* 2 Timer

* 2 Label

- Label 1 => Necessario Reiniciar

- Label 2 => *

- Timer 1 Interval => 3000

- Timer 2 Interval => 3000

* o Timer " Clear" não é necessario !!

[spoiler=Print do Projeto]rDsfuD2.png

 

 

* Depois de ter montado seu projeto "igual" o da imagem acima vamos para o codigo.

dê 2 clique na form e apague tudo e cole esse codigo.

 

 

Imports Microsoft.Win32

Imports System.IO

 

Public Class Form1

 

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Timer1.Start()

Button1.Enabled = False

GroupBox1.Enabled = False

End Sub

 

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

Timer1.Stop()

Timer2.Start()

Label1.Visible = True

Label2.Visible = True

If CheckBox1.Checked = True Then

Dim itm8 As New ListViewItem("DisablePagingExecutive")

itm8.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management")

ListView1.Items.Add(itm8)

itm8.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "DisablePagingExecutive", 1, Microsoft.Win32.RegistryValueKind.DWord)

End If

 

If CheckBox2.Checked = True Then

Dim itm7 As New ListViewItem("WindowArrangementActive")

itm7.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Desktop")

ListView1.Items.Add(itm7)

itm7.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Desktop", "WindowArrangementActive", 0, Microsoft.Win32.RegistryValueKind.String)

End If

 

If CheckBox3.Checked = True Then

Dim itm9 As New ListViewItem("MenuShowDelay")

itm9.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Desktop")

ListView1.Items.Add(itm9)

itm9.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Desktop\", "MenuShowDelay", 0, Microsoft.Win32.RegistryValueKind.String)

End If

 

If CheckBox4.Checked = True Then

Dim itm10 As New ListViewItem("AlwaysUnloadDLL")

itm10.SubItems.Add("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer")

ListView1.Items.Add(itm10)

itm10.ImageIndex = 2

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "AlwaysUnloadDLL", 1, Microsoft.Win32.RegistryValueKind.String)

End If

 

If CheckBox5.Checked = True Then

Dim itm53 As New ListViewItem("TCPNoDelay")

itm53.SubItems.Add("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters")

ListView1.Items.Add(itm53)

itm53.ImageIndex = 2

Dim regKey As RegistryKey

regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\MSMQ", True)

regKey.CreateSubKey("Parameters")

regKey.Close()

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters", "TCPNoDelay", 1, Microsoft.Win32.RegistryValueKind.DWord)

End If

 

If CheckBox6.Checked = True Then

Dim itm19 As New ListViewItem("AutoRepeatDelay")

itm19.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response")

ListView1.Items.Add(itm19)

itm19.ImageIndex = 1

Dim itm20 As New ListViewItem("AutoRepeatRate")

itm20.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response")

ListView1.Items.Add(itm20)

itm20.ImageIndex = 1

Dim itm21 As New ListViewItem("BounceTime")

itm21.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response")

ListView1.Items.Add(itm21)

itm21.ImageIndex = 1

Dim itm22 As New ListViewItem("DelayBeforeAcceptance")

itm22.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response")

ListView1.Items.Add(itm22)

itm22.ImageIndex = 1

Dim itm23 As New ListViewItem("Flags")

itm23.SubItems.Add("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response")

ListView1.Items.Add(itm23)

itm23.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "AutoRepeatDelay", 200, Microsoft.Win32.RegistryValueKind.String)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "AutoRepeatRate", 15, Microsoft.Win32.RegistryValueKind.String)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "BounceTime", 0, Microsoft.Win32.RegistryValueKind.String)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "DelayBeforeAcceptance", 0, Microsoft.Win32.RegistryValueKind.String)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response", "Flags", 59, Microsoft.Win32.RegistryValueKind.String)

End If

 

If CheckBox7.Checked = True Then

Dim itm29 As New ListViewItem("MaximumTransferLength")

itm29.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbstor")

ListView1.Items.Add(itm29)

itm29.ImageIndex = 2

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbstor", "MaximumTransferLength", 2097120, Microsoft.Win32.RegistryValueKind.DWord)

End If

 

If CheckBox8.Checked = True Then

Dim itm34 As New ListViewItem("net stop uxsms")

itm34.SubItems.Add("CMD")

ListView1.Items.Add(itm34)

itm34.ImageIndex = 4

Shell("net stop uxsms", AppWinStyle.Hide)

End If

 

If CheckBox9.Checked = True Then

Dim itm30 As New ListViewItem("netsh int tcp set global congestionprovider=ctcp")

itm30.SubItems.Add("CMD")

ListView1.Items.Add(itm30)

itm30.ImageIndex = 4

Dim itm31 As New ListViewItem("netsh int tcp set global dca=enabled")

itm31.SubItems.Add("CMD")

ListView1.Items.Add(itm31)

itm31.ImageIndex = 4

Dim itm32 As New ListViewItem("netsh int tcp set global ecncapability=enabled")

itm32.SubItems.Add("CMD")

ListView1.Items.Add(itm32)

itm32.ImageIndex = 4

Dim itm33 As New ListViewItem("netsh int tcp set global chimney=enabled")

itm33.SubItems.Add("CMD")

ListView1.Items.Add(itm33)

End If

 

If CheckBox10.Checked = True Then

Try

Dim arrStr As String() = {}

arrStr = System.IO.Directory.GetFiles("C:\Windows\Temp", "*.*")

For i As Integer = 0 To arrStr.Length - 1

Try

System.IO.File.Delete(arrStr(i))

Catch ExIO As Exception

Debug.Print(ExIO.Message)

End Try

Next i

Catch ExIO As IOException

 

MsgBox(ExIO.Message)

End Try

End If

 

If CheckBox11.Checked = True Then

Try

Dim arrStr As String() = {}

arrStr = System.IO.Directory.GetFiles("C:\Windows\Prefetch", "*.*")

For i As Integer = 0 To arrStr.Length - 1

Try

System.IO.File.Delete(arrStr(i))

Catch ExIO As Exception

Debug.Print(ExIO.Message)

End Try

Next i

Catch ExIO As IOException

 

MsgBox(ExIO.Message)

End Try

End If

End Sub

 

Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick

Timer2.Stop()

ListView1.Items.Clear()

Button1.Enabled = True

GroupBox1.Enabled = True

End Sub

 

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then

 

Else

MsgBox("Para todas funçoes funcionarem execute o programa como Administrator" + vbCrLf + "Otimizador Windows 1.1", MsgBoxStyle.Exclamation, "Otimizador Windows")

End If

 

End Sub

end class

 

* Pronto seu Otimizador de Windows está Criado !!

* Com esses codigo vcs ja tem uma noção de como criar novas funçoes para deixar seu windows mais rapido ainda :) !!

 

* SEMPRE EXECUTE COMO ADMINISTRADOR POIS ELE PRECISA DE PERMISSÃO PARA USAR O REGEDIT

kp6mVWB.gif

Link para o comentário
Compartilhar em outros sites

Este tópico está impedido de receber novos posts.
 Compartilhar

×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.