Ir para conteúdo
Faça parte da equipe! (2024) ×

[N]ARUTO_
 Compartilhar

Posts Recomendados

Primeiramente crie um projeto com :

* 6 CheckBox

* 1 Listview

* 1 Button

* 1 Label

* 2 Timer

- Timer 2 Interval 3000 + deixe ele desativado

[spoiler=Print do Projeto]02GJ8ZB.png

 

* Depois de tudo pronto vamos para o codigo !

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

Public Class Form1

 

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

If (Me.CheckBox1.Checked = False) Then

 

Else

Label1.Visible = False

Timer1.Start()

Timer2.Start()

 

If CheckBox1.Checked = True Then

ProgressBar1.Value = 50

End If

If CheckBox2.Checked = True Then

ProgressBar1.Value = 50

End If

If CheckBox3.Checked = True Then

ProgressBar1.Value = 50

End If

If CheckBox4.Checked = True Then

Shell("netsh int ip reset c:\resetlog.txt", AppWinStyle.Hide, True)

End If

If CheckBox5.Checked = True Then

Shell("ipconfig /flushdns", AppWinStyle.Hide, True)

End If

If CheckBox6.Checked = True Then

Shell("ipconfig -release", AppWinStyle.Hide, True)

Shell("ipconfig -renew", AppWinStyle.Hide, True)

Shell("ipconfig -flushdns", AppWinStyle.Hide, True)

End If

End If

End Sub

 

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

ProgressBar1.Increment(10)

If ProgressBar1.Value = ProgressBar1.Maximum Then

Timer1.Stop()

If CheckBox1.Checked = True Then

 

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters", "EnableWsd", 0, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters", "FileInfoCacheEntriesMax", 64, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters", "DirectoryCacheEntriesMax", 16, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters", "FileNotFoundCacheEntriesMax", 128, Microsoft.Win32.RegistryValueKind.DWord)

Dim itm2 As New ListViewItem("EnableWsd")

itm2.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters")

ListView1.Items.Add(itm2)

itm2.ImageIndex = 1

Dim itm3 As New ListViewItem("FileInfoCacheEntriesMax")

itm3.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters")

ListView1.Items.Add(itm3)

itm3.ImageIndex = 1

Dim itm4 As New ListViewItem("DirectoryCacheEntriesMax")

itm4.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters")

ListView1.Items.Add(itm4)

itm4.ImageIndex = 1

Dim itm5 As New ListViewItem("FileNotFoundCacheEntriesMax")

itm5.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters")

ListView1.Items.Add(itm5)

End If

 

If CheckBox2.Checked = True Then

 

Dim itm37 As New ListViewItem("CacheHashTableBucketSize")

itm37.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm37)

itm37.ImageIndex = 1

Dim itm38 As New ListViewItem("CacheHashTableSize")

itm38.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm38)

itm38.ImageIndex = 1

Dim itm39 As New ListViewItem("MaxSOACacheEntryTtlLimit")

itm39.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm39)

itm39.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters", "CacheHashTableBucketSize", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters", "CacheHashTableSize", 180, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters", "MaxSOACacheEntryTtlLimit", 12D, Microsoft.Win32.RegistryValueKind.DWord)

End If

 

If CheckBox3.Checked = True Then

 

Dim itm40 As New ListViewItem(".NegativeCacheTime")

itm40.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm40)

itm40.ImageIndex = 3

Dim itm41 As New ListViewItem(".NetFailureCacheTime")

itm41.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm41)

itm41.ImageIndex = 3

Dim itm42 As New ListViewItem(".NegativeSOACacheTime")

itm41.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm42)

itm42.ImageIndex = 3

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache\Parameters", ".NegativeCacheTime", 0, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache\Parameters", ".NetFailureCacheTime", 0, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache\Parameters", ".NegativeSOACacheTime", 0, Microsoft.Win32.RegistryValueKind.DWord)

Dim itm11 As New ListViewItem("DefaultTTL")

itm11.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm11)

itm11.ImageIndex = 1

Dim itm12 As New ListViewItem("EnablePMTUBHDetect")

itm12.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm12)

itm12.ImageIndex = 1

Dim itm13 As New ListViewItem("EnablePMTUDiscovery")

itm13.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm13)

itm13.ImageIndex = 1

Dim itm14 As New ListViewItem("TcpMaxDupAcks")

itm14.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm14)

itm14.ImageIndex = 1

Dim itm15 As New ListViewItem("Sackopts")

itm15.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm15)

itm15.ImageIndex = 1

Dim itm16 As New ListViewItem("Tcp1323Opts")

itm16.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters")

ListView1.Items.Add(itm16)

itm16.ImageIndex = 1

Dim itm17 As New ListViewItem("MaxConnectionsPer1_0Server")

itm17.SubItems.Add("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings")

ListView1.Items.Add(itm17)

itm17.ImageIndex = 1

Dim itm18 As New ListViewItem("MaxConnectionsPerServer")

itm18.SubItems.Add("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings")

ListView1.Items.Add(itm18)

itm18.ImageIndex = 1

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "DefaultTTL", 80, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "EnablePMTUBHDetect", 0, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "EnablePMTUDiscovery", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "TcpMaxDupAcks", 2, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "Sackopts", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "Tcp1323Opts", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "MaxConnectionsPer1_0Server", 8, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "MaxConnectionsPerServer", 4, Microsoft.Win32.RegistryValueKind.DWord)

Dim itm43 As New ListViewItem("DefaultTTL")

itm43.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm43)

itm43.ImageIndex = 1

Dim itm44 As New ListViewItem("EnablePMTUBHDetect")

itm44.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm44)

itm44.ImageIndex = 1

Dim itm45 As New ListViewItem("EnablePMTUDiscovery")

itm45.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm45)

itm45.ImageIndex = 1

Dim itm46 As New ListViewItem("GlobalMaxTcpWindowSize")

itm46.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm46)

itm46.ImageIndex = 1

Dim itm47 As New ListViewItem("TcpMaxDupAcks")

itm47.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm47)

itm47.ImageIndex = 1

Dim itm48 As New ListViewItem("SackOpts")

itm48.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm48)

itm48.ImageIndex = 1

Dim itm49 As New ListViewItem("Tcp1323Opts")

itm49.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm49)

itm49.ImageIndex = 1

Dim itm50 As New ListViewItem("TcpWindowSize")

itm50.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm50)

itm50.ImageIndex = 1

Dim itm51 As New ListViewItem("MaxConnectionPerServer")

itm51.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm51)

itm51.ImageIndex = 1

Dim itm52 As New ListViewItem("MaxConnectionsPer1_0Server")

itm52.SubItems.Add("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Dnscache\Parameters")

ListView1.Items.Add(itm52)

itm52.ImageIndex = 1

'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "DefaultTTL", 128, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "EnablePMTUBHDetect", 0, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "EnablePMTUDiscovery", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "GlobalMaxTcpWindowSize", 32.767, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "TcpMaxDupAcks", 2, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "SackOpts", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "Tcp1323Opts", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters", "TcpWindowSize", 32767, Microsoft.Win32.RegistryValueKind.DWord)

'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "MaxConnectionPerServer", 1, Microsoft.Win32.RegistryValueKind.DWord)

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "MaxConnectionsPer1_0Server", 8, Microsoft.Win32.RegistryValueKind.DWord)

End If

 

End If

End Sub

 

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

ListView1.Items.Clear()

Label1.Visible = True

Label1.Text = "ListView Status: Limpa"

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 Internet 1.1", MsgBoxStyle.Exclamation, "Otimizador Internet")

End If

End Sub

End Class

 

* Pronto seu otimizador de internet está pronto para ser usado :)

* Agora com esses codigo vcs ja deve ter uma noção de como criar novas funçoes para seu programa :)

 

|=> [N]ARUTO <3

kp6mVWB.gif

Link para o comentário
Compartilhar em outros sites

[QUOTE="@rnxn, post: 9507008, member: 4620585"]A parte importante que é a explicação do código vc não dá? Isso era pra ser um tutorial?[/QUOTE] As funções dos codigo é modificar os registro do regedit assim acelerando a conexão !
kp6mVWB.gif

Link para o comentário
Compartilhar em outros sites

  • Velha Guarda

Bem explicativo.

Nos próximos dias vou tentar criar igual,porém com uma aparência diferenciada.

 

Abraços.

 

 

'Lembre-se dessa regra

Guarde-a em seu coração:

Talento tem um limite

Trabalho duro, não."

 

 

Link para o comentário
Compartilhar em outros sites

  • 1 mês depois...
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.