2011年2月22日火曜日

單一網路卡(DHCP+NAT)設定修改

使用實體網路卡(PPPOE)+虛擬網路卡(DHCP)
dhcpd.conf 的寫法沒有改變(參考前篇)
不過這樣改的話
防火牆流量顯示都會集中顯示在 eth0
不知道算不算缺點
要注意的是 pppoeconf 設定時
選擇的網路卡要注意一下
設成 DHCP 的網路卡 可能會讓防火牆錯誤(沒試過就是)
vim /etc/network/interfaces
/*
auto eth0
iface eth0 inet static
address 192.168.10.50
netmask 255.255.255.0

auto eth0:0 //虛擬的網卡(之前兩張網路卡時是設 eth1)
iface eth0:0 inet static //這行的 eth 也要改
address 192.168.10.254
netmask 255.255.255.0
*/
/etc/init.d/networking restart //重新啟動網路
vim /etc/default/dhcp3-server //INTERFACES="eth0" eth0:0 還是算 eth0 的部份(應該XD)
                              //之前兩張網路卡時是設 eth1

2011年2月18日金曜日

vim 筆記

[2011/04/08 Update]
: //cmd
esc //normal mode
h,j,k,l //left , down , up , right
i,I //insert mode ; i = 遊標左邊 ; I = 行首
a,A //insert mode ; a = 遊標右邊 ; A = 行末
o,O //insert mode 插入一行空白 ; o = 遊標所在位置下一行 ; O = 遊標所在位置
r,R //r = 取代字元 ; R= replace mode
x,X //x = delete ; X = backspace
d,D(c,C) //dd = 刪除整行 ; D = 刪除現在字元到行末
         //d(h,l) = 刪左邊字元 , 刪右邊字元
         //d(j,k) = 刪整行到上一行 , 刪整行到下一行
         //c,C 功能相同 但刪完會進入 insert mode
0,$,^ //行首 , 行末 , 行首(不包括空白)
gg,G //檔案開始,檔案結束
w,W,e,E,b,B //w 單字字首(往下找)
            //e 單字字尾(往下找)
            //b 單字字首(往上找)
            //大小寫的差別在標點符號(大寫以標點符號區隔,小寫用單字區隔)
y,Y //y = 複制 ; Y = 複制整行
p,P //p = 遊標的右邊貼上 ; P = 遊邊的左邊貼上
v,V //v 標記模式 ; V 標記整行
ggVG //全選
u,^y //u undo , ^y redo
/,n,N // / 搜尋 ; n 找下一個 ; N 找上一個
:%s/x/y/g //搜尋取代 x -> y %:指定全檔 g:指定每行有2個以上符合的全置換
:X //vim 加密
:sp //視窗分割 ^w+j,k 來切換下,上 or ^ww 切換視窗
:files //查詢已開啟的檔案
:e path //開啟 path
:e ++enc=big5 path //指定編碼開啟檔案(省略 path 時可以改變編輯中檔案的編碼)
^oo //開啟上次關閉時的檔案
:se ff=unix //換行格式 unix
:se ff=dos //換行格式 dos
:tabe path //在 tab 中 開啟 path
:tabc //關閉 現在的 tab
:tabo //關閉 其它的 tab
:tabn //切換到下一個 tab ; gt ; ^PAGEDOWN
:tabp //切換到上一個 tab ; gT ; ^PAGEUP
:tabs //顯示所有 tab
:tabm number //切換 tab 順序
:tabr //第一個 tab
:tabl //最後一個 tab

2011年2月16日水曜日

Debian 快速設定

[2011/06/22 Update]
//Setting:
dpkg-reconfigure locales
vim /etc/hostname
vim /etc/hosts
vim /etc/sudoers


//Install:
apt-cdrom add -m
apt-get dist-upgrade
apt-get update
apt-get upgrade
apt-get install ia32-libs //64bit Only
apt-get install ia32-libs-gtk //64bit Only
apt-get install ntfs-3g
apt-get install pppoeconf //pppoeconf , pon dsl-provider , poff
apt-get install ibus
apt-get install scim-modules-table
apt-get install vim
apt-get install vim-gnome
apt-get install wine //env LC_ALL=ja_JP.UTF-8 wine
apt-get install ttf-wqy-microhei
apt-get install ttf-wqy-zenhei


//Depends:
//Rainlendar
apt-get install libcurl3
apt-get install tofrodos

//TrueCrypt
apt-get install cryptsetup
apt-get install fuse-utils

//VirtualBox
apt-get install libqt4-opengl

//Wine
apt-get install lib32nss-mdns //64bit Only


//Others:
//Java
apt-get install equivs
apt-get install unixodbc
apt-get install ia32-libs //64bit Only
dpkg -i *.deb
/*
ia32-sun-java6-bin //64bit Only
java-common
sun-java6-bin
sun-java6-fonts
sun-java6-jdk
sun-java6-jre
sun-java6-plugin
*/


//Services:
//DHCP
apt-get install dhcp3-server
vim /etc/network/interfaces
/*
auto eth0
iface eth0 inet static
address 192.168.10.50
netmask 255.255.255.0

auto eth0:0
iface eth0:0 inet static
address 192.168.10.254
netmask 255.255.255.0
*/
/etc/init.d/networking restart
vim /etc/default/isc-dhcp-server //INTERFACES="eth0"
vim /etc/dhcp/dhcpd.conf
/*
# option definitions common to all supported networks...
# option domain-name "example.org";
# option domain-name-servers ns1.example.org, ns2.example.org;

# default-lease-time 600;
# max-lease-time 7200;

# A slightly different configuration for an internal subnet.
subnet 192.168.10.0 netmask 255.255.255.0 {
  range 192.168.10.100 192.168.10.200;
  option domain-name-servers 168.95.192.1, 168.95.1.1;
  option domain-name "belldandy.org";
  option routers 192.168.10.254;
  option broadcast-address 192.168.10.255;
  default-lease-time 60000;
  max-lease-time 720000;
  host vm-debiandt {
    hardware ethernet 00:0C:29:96:A1:6A;
    fixed-address 192.168.10.55;
  }
  host vm-win7dt {
    hardware ethernet 00:0c:29:3c:16:5a;
    fixed-address 192.168.10.57;
  }
  host vm-ws2008r2dev {
    hardware ethernet 00:0c:29:39:fb:40;
    fixed-address 192.168.10.58;
  }
  host vm-debiandev {
    hardware ethernet 00:0c:29:6b:90:d4;
    fixed-address 192.168.10.59;
  }
  host vm-debian64dev {
    hardware ethernet 00:0c:29:51:a2:25;
    fixed-address 192.168.10.60;
  }
  host vm-win7 {
    hardware ethernet 00:0c:29:20:0f:71;
    deny booting;
  }
  host vm-ws2008r2 {
    hardware ethernet 00:0c:29:38:3e:90;
    deny booting;
  }
}
*/
/etc/init.d/isc-dhcp-server restart //vim /var/lib/dhcp/dhcpd.leases

//SSH
apt-get install ssh
vim /etc/ssh/sshd_config
/*
Port 22
PermitRootLogin no
*/
vim /etc/hosts.allow //sshd:192.168.0.0
vim /etc/hosts.deny //sshd:all
/etc/init.d/ssh restart

//SAMBA
apt-get install samba
dpkg -i *.deb //gadmin-samba
/*
netbios name =
workgroup =
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
remote announce =
remote browse sync =
*/

2011年2月13日日曜日

vimrc 設定

[2011/06/22 Update]
Windows 下是修改這個檔案
C:\Program Files (x86)\Vim\_vimrc
Linux 的話要看套件
Debian 是在 /etc/vim/vimrc(vim) /etc/vim/gvimrc(gvim)

另外就是修改設定時
有些副程式會更改設定值 要注意一下
C:\Program Files (x86)\Vim\_vimrc
/*
au GUIEnter * winpos 0 0
language english
se gfn=mingliu:h12
*/

/etc/vim/vimrc /etc/vim/gvimrc
/*
se gfn=WenQuanYi\ Zen\ Hei\ Mono\ 12
*/

Common:
/*
se clipboard=unnamed
se enc=utf-8
se fenc=utf-8
se fencs=ucs-bom,utf-8,big5
se ffs=dos,unix
se ic
se lines=32 columns=96
se list
se listchars=tab:>-,eol:<,trail:=
se nobackup
se nowritebackup
se noswapfile
se nu
se wrap
*/

2011年2月5日土曜日

Check & Setting Tool 0.4.1

[2011/02/11 Update]
Public Class Form1
    Dim regget(10) As String
    Dim regpath(5) As String
    Dim servicename(6) As String
    Dim strComputer = "."
    Dim objWMIService = GetObject("winmgmts:\\" & strComputer)
    Dim colSettings = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Text = "Check & Setting Tool 0.4.1(Need Administrator)"

        TabPage1.Text = "Check & Setting"
        TabPage2.Text = "ReadMe"

        TextBox1.Text = "ComputerName"
        TextBox2.Text = "ComputerWorkgroup"
        TextBox3.Text = "RegisteredOwner"
        TextBox4.Text = "RegisteredOrganization"
        TextBox5.Text = "AutoPlay"
        TextBox6.Text = "User Account Control"
        TextBox25.Text = "Folder Option"

        Button1.Text = "Refresh"
        Button2.Text = "Default All"
        Button3.Text = "Setting"
        Button4.Text = "Setting"
        Button13.Text = "Setting"

        regpath(0) = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
        regpath(1) = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
        regpath(2) = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers"
        regpath(3) = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
        regpath(4) = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services"

        Me.Button1.PerformClick()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For Each objComputer In colSettings
            TextBox7.Text = objComputer.Name
            TextBox8.Text = objComputer.Workgroup
        Next

        regget(0) = My.Computer.Registry.GetValue _
                    (regpath(0), "RegisteredOwner", Nothing)
        regget(1) = My.Computer.Registry.GetValue _
                    (regpath(0), "RegisteredOrganization", Nothing)
        regget(2) = My.Computer.Registry.GetValue _
                    (regpath(1), "Hidden", Nothing)
        regget(3) = My.Computer.Registry.GetValue _
                    (regpath(1), "HideFileExt", Nothing)
        regget(4) = My.Computer.Registry.GetValue _
                    (regpath(1), "ShowSuperHidden", Nothing)
        regget(5) = My.Computer.Registry.GetValue _
                    (regpath(1), "SeparateProcess", Nothing)
        regget(6) = My.Computer.Registry.GetValue _
                    (regpath(1), "ShowCompColor", Nothing)
        regget(7) = My.Computer.Registry.GetValue _
                    (regpath(1), "SharingWizardOn", Nothing)
        regget(8) = My.Computer.Registry.GetValue _
                    (regpath(2), "DisableAutoplay", Nothing)
        regget(9) = My.Computer.Registry.GetValue _
                    (regpath(3), "EnableLUA", Nothing)

        TextBox9.Text = regget(0)
        TextBox10.Text = regget(1)

        If regget(2) = 1 And _
            regget(3) = 0 And _
            regget(4) = 1 And _
            regget(5) = 1 And _
            regget(6) = 0 And _
            regget(7) = 0 Then
            TextBox26.Text = "Default Setting"
        Else
            TextBox26.Text = "User Setting"
        End If

        If regget(8) = 1 Then
            TextBox11.Text = "Disabled"
            Button5.Text = "Enabled"
        ElseIf regget(8) = 0 Then
            TextBox11.Text = "Enabled"
            Button5.Text = "Disabled"
        End If

        If regget(9) = 0 Then
            TextBox12.Text = "Disabled"
            Button6.Text = "Enabled"
        ElseIf regget(9) = 1 Then
            TextBox12.Text = "Enabled"
            Button6.Text = "Disabled"
        End If

        servicename(0) = "WinDefend"
        servicename(1) = "MpsSvc"
        servicename(2) = "Themes"
        servicename(3) = "AudioSrv"
        servicename(4) = "wscsvc"
        servicename(5) = "WSearch"
        For i = 0 To 5 Step 1
            If My.Computer.Registry.GetValue _
               (regpath(4) & "\" & servicename(i), _
               "DisplayName", Nothing) Is Nothing Then
                Select Case servicename(i)
                    Case servicename(0)
                        TextBox13.Text = "No Service"
                        TextBox19.Text = "No Service"
                        Button7.Text = "No Service"
                        Button7.Enabled = False
                    Case servicename(1)
                        TextBox14.Text = "No Service"
                        TextBox20.Text = "No Service"
                        Button8.Text = "No Service"
                        Button8.Enabled = False
                    Case servicename(2)
                        TextBox15.Text = "No Service"
                        TextBox21.Text = "No Service"
                        Button9.Text = "No Service"
                        Button9.Enabled = False
                    Case servicename(3)
                        TextBox16.Text = "No Service"
                        TextBox22.Text = "No Service"
                        Button10.Text = "No Service"
                        Button10.Enabled = False
                    Case servicename(4)
                        TextBox17.Text = "No Service"
                        TextBox23.Text = "No Service"
                        Button11.Text = "No Service"
                        Button11.Enabled = False
                    Case servicename(5)
                        TextBox18.Text = "No Service"
                        TextBox24.Text = "No Service"
                        Button12.Text = "No Service"
                        Button12.Enabled = False
                End Select
            Else
                Select Case servicename(i)
                    Case servicename(0)
                        Dim WinDefend = objWMIService.Get _
                        ("Win32_Service.Name='WinDefend'")
                        TextBox13.Text = WinDefend.DisplayName
                        TextBox19.Text = WinDefend.StartMode & "," & WinDefend.State()
                        If WinDefend.StartMode = "Disabled" Then
                            Button7.Text = "Auto"
                        ElseIf WinDefend.StartMode = "Auto" Then
                            Button7.Text = "Disabled"
                        End If
                    Case servicename(1)
                        Dim MpsSvc = objWMIService.Get _
                        ("Win32_Service.Name='MpsSvc'")
                        TextBox14.Text = MpsSvc.DisplayName
                        TextBox20.Text = MpsSvc.StartMode & "," & MpsSvc.State()
                        If MpsSvc.StartMode = "Disabled" Then
                            Button8.Text = "Auto"
                        ElseIf MpsSvc.StartMode = "Auto" Then
                            Button8.Text = "Disabled"
                        End If
                    Case servicename(2)
                        Dim Themes = objWMIService.Get _
                        ("Win32_Service.Name='Themes'")
                        TextBox15.Text = Themes.DisplayName
                        TextBox21.Text = Themes.StartMode & "," & Themes.State()
                        If Themes.StartMode = "Disabled" Then
                            Button9.Text = "Auto"
                        ElseIf Themes.StartMode = "Auto" Then
                            Button9.Text = "Disabled"
                        End If
                    Case servicename(3)
                        Dim AudioSrv = objWMIService.Get _
                        ("Win32_Service.Name='AudioSrv'")
                        TextBox16.Text = AudioSrv.DisplayName
                        TextBox22.Text = AudioSrv.StartMode & "," & AudioSrv.State()
                        If AudioSrv.StartMode = "Disabled" Then
                            Button10.Text = "Auto"
                        ElseIf AudioSrv.StartMode = "Auto" Then
                            Button10.Text = "Disabled"
                        End If
                    Case servicename(4)
                        Dim wscsvc = objWMIService.Get _
                        ("Win32_Service.Name='wscsvc'")
                        TextBox17.Text = wscsvc.DisplayName
                        TextBox23.Text = wscsvc.StartMode & "," & wscsvc.State
                        If wscsvc.StartMode = "Disabled" Then
                            Button11.Text = "Auto"
                        ElseIf wscsvc.StartMode = "Auto" Then
                            Button11.Text = "Disabled"
                        End If
                    Case servicename(5)
                        Dim WSearch = objWMIService.Get _
                        ("Win32_Service.Name='WSearch'")
                        TextBox18.Text = WSearch.DisplayName
                        TextBox24.Text = WSearch.StartMode & "," & WSearch.State
                        If WSearch.StartMode = "Disabled" Then
                            Button12.Text = "Auto"
                        ElseIf WSearch.StartMode = "Auto" Then
                            Button12.Text = "Disabled"
                        End If
                End Select
            End If
        Next
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim RegisteredOwner As String
        RegisteredOwner = TextBox9.Text
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOwner", RegisteredOwner, Microsoft.Win32.RegistryValueKind.String)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim RegisteredOrganization As String
        RegisteredOrganization = TextBox10.Text
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOrganization", RegisteredOrganization, Microsoft.Win32.RegistryValueKind.String)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        If regget(8) = 0 Then
            My.Computer.Registry.SetValue _
            (regpath(2), "DisableAutoplay", "1", Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf regget(8) = 1 Then
            My.Computer.Registry.SetValue _
            (regpath(2), "DisableAutoplay", "0", Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If regget(9) = 1 Then
            My.Computer.Registry.SetValue _
            (regpath(3), "EnableLUA", "0", Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf regget(9) = 0 Then
            My.Computer.Registry.SetValue _
            (regpath(3), "EnableLUA", "1", Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        If Button7.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WinDefend", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button7.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WinDefend", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        If Button8.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\MpsSvc", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button8.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\MpsSvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        If Button9.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\Themes", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button9.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\Themes", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        If Button10.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\AudioSrv", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button10.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\AudioSrv", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        If Button11.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\wscsvc", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button11.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\wscsvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        If Button12.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WSearch", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button12.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WSearch", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        My.Computer.Registry.SetValue _
        (regpath(1), "Hidden", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "HideFileExt", "0", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "ShowSuperHidden", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "SeparateProcess", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "ShowCompColor", "0", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "SharingWizardOn", "0", Microsoft.Win32.RegistryValueKind.DWord)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOwner", "Belldandy", Microsoft.Win32.RegistryValueKind.String)
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOrganization", "Syaorin", Microsoft.Win32.RegistryValueKind.String)
        My.Computer.Registry.SetValue _
        (regpath(2), "DisableAutoplay", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(3), "EnableLUA", "0", Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox13.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\WinDefend", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox14.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\MpsSvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox15.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\Themes", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox16.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\AudioSrv", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox17.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\wscsvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox18.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\WSearch", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        Me.Button13.PerformClick()
    End Sub
End Class