如果 kernel 有更新
編譯時會找不到對應的 header 路徑
造成無法編譯成功
這時要記得安裝對應的 header 即可
apt-get install linux-headers-`uname -r`
另外在虛擬機器安裝 vmware workstation 後
遇到執行後沒反應的情形
執行下列指令後即可
/usr/bin/vmware-config-tools.pl -m
apt-get install linux-headers-`uname -r`
/usr/bin/vmware-config-tools.pl -m
bsnes: apt-get install build-essential gcc-4.5 g++-4.5 libgtk2.0-dev libqt4-dev libsdl1.2-dev libpulse-dev libopenal-dev libao-dev libxv-dev desmume: apt-get install intltool libglade2-dev wine: apt-get install flex bison apt-get install ia32-libs-dev libc6-dev-i386 lib32z1-dev //64bit Only filezilla: apt-get install libwxgtk2.8-dev libidn11-dev libgnutls-dev libtinyxml-dev libsqlite3-dev wx-common truecrypt: apt-get install nasm libfuse-dev gimp: apt-get install libbabl-0.0-0-dev libgegl-0.0-dev libtiff4-dev python2.6-dev python-gtk2-dev vlc: apt-get install liblua5.1-0-dev lua5.1 libmad0-dev libavcodec-dev libavformat-dev libswscale-dev libpostproc-dev liba52-0.7.4-dev libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev libx11-xcb-dev libfribidi-dev libxpm-dev firestarter: apt-get install libgnome2-dev libgnomeui-dev virtualbox: apt-get install bin86 bcc iasl libxslt1-dev libcurl4-openssl-dev libxmu-dev apt-get install linux-headers- //uname -r apt-get install libcap-dev makeself apt-get install libpam0g-dev g++-multilib texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra
//2011-08-23aRagexe //CharName= //Search:esi, [ecx+12E8h] sub_703680 proc near push esi lea esi, [ecx+12E8h] push edi mov ecx, 10h mov edi, offset byte_87BEE0 //CharName= rep movsd mov ecx, off_7D64DC mov esi, ecx xor eax, eax sub esi, offset byte_87BEE0 //CharName= jmp short loc_7036B0 align 10h loc_7036B0: movzx edx, byte_87BEE0[esi+eax] //CharName= xor byte_87BEE0[eax], dl movzx edx, byte ptr [ecx+eax+1] xor byte_87BEE1[eax], dl movzx edx, byte ptr [ecx+eax+2] xor byte_87BEE2[eax], dl movzx edx, byte ptr [ecx+eax+3] xor byte_87BEE3[eax], dl add eax, 4 cmp eax, 40h jb short loc_7036B0 pop edi mov eax, offset byte_87BEE0 pop esi retn sub_703680 endp align 10h //Zeny= //BaseExp= //BaseExpNext= //JobExp= //JobExpNext= //Search:mov ecx, [esp+58h+var_10] loc_689B95: mov [esp+6Ch+var_4], 0FFFFFFFFh lea ecx, [esp+6Ch+var_2C] call //此行有點問題 貼不上來 mov ecx, [esp+6Ch+var_C] mov large fs:0, ecx pop ecx pop edi pop esi pop ebp pop ebx mov ecx, [esp+58h+var_10] xor ecx, esp call sub_722AB8 add esp, 58h retn 4 sub_6891C0 endp off_689BC8 dd offset loc_68922F dd offset loc_689253 dd offset loc_68926B dd offset loc_689344 dd offset loc_68941D dd offset loc_689459 dd offset loc_68946C dd offset loc_68947F dd offset loc_6894BA dd offset loc_6896A2 dd offset loc_6896C3 dd offset loc_6896DB dd offset loc_6896F3 dd offset loc_68970A dd offset loc_689722 dd offset loc_68973A dd offset loc_689751 dd offset loc_6898CE dd offset loc_6899D0 dd offset loc_6899E8 dd offset loc_689A00 dd offset loc_689A17 dd offset loc_689A2F dd offset loc_689A47 dd offset loc_689A5E dd offset loc_689A76 dd offset loc_689A8E dd offset loc_689AA5 dd offset loc_689ABD dd offset loc_689AD5 dd offset loc_689AEC dd offset loc_689B04 dd offset loc_689B19 dd offset loc_689327 dd offset loc_689B95 byte_689C54 db 0 db 2 dup(22h), 1 dd 5040302h, 8220706h, 0C0B0A09h, 220F0E0Dh dd 22222222h, 22221110h, 3 dup(22222222h) dd 14131222h, 18171615h, 1C1B1A19h, 201F1E1Dh dd 22222222h, 498D21h off_689C94 dd offset loc_689570 dd offset loc_6895AB byte_689C9C db 0 align 10h dword_689CA0 dd 0CC010101h, 3 dup(0CCCCCCCCh), 104EC81h dd 0C0A10000h, 33007DCCh, 248489C4h, 100h dd 24BC8B57h, 10Ch, 247B70Fh, 16F88348h dd 0D5870Fh, 0B60F0000h, 689DE080h, 8524FF00h dd 689DC8h, 18B9026Ah, 0E80087DDh, 55FFCh dd 5D74C085h, 5304478Bh, 0FCAC1D8Bh, 8B560087h dd 85F32BF0h, 854874C0h, 554474F6h, 0FCB82D8Bh dd 0C88B0087h, 0C32BC58Bh, 50FEF799h, 0CB2B5155h dd 244C8D51h, 6C886820h, 0FF510078h, 75637815h dd 18C48300h, 6A006Ah, 0F51EF568h, 24548D00h dd 16A521Ch, 819078B9h, 5EDEE800h, 5E5DFFE9h dd 4478B5Bh, 87FCACA3h, 8B46EB00h, 0D89044Fh //BaseExp=87F*** dd 87FD68h, 0B9833BEBh, 11Ch, 0C7147400h //JobExp=87F*** dd 11C81h, 0 add byte ptr dword_87DD18[ecx], bh call sub_6F1A70 mov edx, [edi+4] mov dword_87FD54, edx //Zeny= jmp short loc_689DA5 loc_689D92: mov eax, [edi+4] mov dword_87FCB8, eax //BaseExpNext= jmp short loc_689DA5 loc_689D9C: mov ecx, [edi+4] mov dword_87FD64, ecx //JobExpNext= //Weight= //WeightMax= //Search:; "Weight : %3d / %3d" loc_494BB4: ; "Weight : %3d / %3d" push offset aWeight3d3d loc_494BB9: ; char * push edx call ebx ; sprintf mov eax, dword_8797C0 //WeightMax= add esp, 10h xor edi, edi cmp eax, 1 mov ecx, eax jg short loc_494BD2 mov ecx, 1 loc_494BD2: mov eax, dword_8797CC //Weight= imul eax, 64h cdq idiv ecx cmp eax, 32h jl short loc_494BE7 mov edi, 0FFh //BaseLv= //JobLv= //Search:; "Base Lv. %d" //Search:; "Job Lv. %d" loc_494A8B: mov eax, dword_879710 //BaseLv= push eax push offset aBaseLv_D ; "Base Lv. %d" lea ecx, [esp+2Ch] push ecx ; char * loc_494ADB: mov eax, dword_87971C //JobLv= push eax push offset aJobLv_D ; "Job Lv. %d" lea ecx, [esp+2Ch] push ecx ; char * //HPIndex= //MaxHPTable= //Search:HPIndex & MaxHPTable 似乎是無解
Pause //暫停 IfWinExist,Ragnarok //檢查 RO 視窗是否存在 { Loop //迴圈 { Loop,4 //迴圈 4 次 { IfWinActive,Ragnarok //如果選擇的視窗是 RO { Send {F4} //送出按鍵(可以變更) } IfWinNotActive,Ragnarok //如果選擇的視窗不是 RO(背景執行用) { ControlSend,,{F4},Ragnarok //背景送出按鍵給 RO(可以變更) } Sleep, 250 //停止 0.25 秒 } Sleep, 180000 //停止 180 秒 Sleep, 5000 //停止 5秒 } } ^Home::Pause //設定 Ctrl+Home 暫停 or 關閉暫停 ^End::Reload //設定 Ctrl+End 重置(重置後 預設是暫停 要按 Ctrl+Home 開始) //使用暫停並不會使 Sleep 的計時重置 故加入此鍵 //沒有先使用詩舞技能就使用 Encore 的話 會沒反應 此時也必需重置Frost Misty & Jack Frost:
Pause IfWinExist,Ragnarok { Loop { Loop,2 //送 2 次是怕 LAG(約 1~3 次 JF 會 1次 FM) { IfWinActive,Ragnarok { Send {F7} //Frost Misty } IfWinNotActive,Ragnarok { ControlSend,,{F7},Ragnarok //建議使用 F1~F9(背景執行時 比較不會有問題) } Sleep, 250 } Loop,2 //送 2 次是怕 LAG(約 1~3 次 JF 會 1次 FM) { IfWinActive,Ragnarok { Send {F9} //Jack Frost } IfWinNotActive,Ragnarok { ControlSend,,{F9},Ragnarok //建議使用 F1~F9(背景執行時 比較不會有問題) } Sleep, 250 } } } ^Home::Pause ^End::Reload官網:http://www.autohotkey.com/
vim /etc/gdm3/daemon.conf // 在 xdmcp 下加入 Enable=true 即可 /* [xdmcp] Enable=true */
//2011-10-19aRagexe //CharName= //Search:esi, [ecx+12E8h] sub_703680 proc near push esi lea esi, [ecx+12E8h] push edi mov ecx, 10h mov edi, offset byte_87BEE0 //CharName= rep movsd mov ecx, off_7D64DC mov esi, ecx xor eax, eax sub esi, offset byte_87BEE0 //CharName= jmp short loc_7036B0 align 10h loc_7036B0: movzx edx, byte_87BEE0[esi+eax] //CharName= xor byte_87BEE0[eax], dl movzx edx, byte ptr [ecx+eax+1] xor byte_87BEE1[eax], dl movzx edx, byte ptr [ecx+eax+2] xor byte_87BEE2[eax], dl movzx edx, byte ptr [ecx+eax+3] xor byte_87BEE3[eax], dl add eax, 4 cmp eax, 40h jb short loc_7036B0 pop edi mov eax, offset byte_87BEE0 pop esi retn sub_703680 endp align 10h //Zeny= //BaseExp= //BaseExpNext= //JobExp= //JobExpNext= //Search:mov ecx, [esp+58h+var_10] loc_691EB9: mov [esp+6Ch+var_4], 0FFFFFFFFh lea ecx, [esp+6Ch+var_2C] call ds: //此行過長省略 mov ecx, [esp+6Ch+var_C] mov large fs:0, ecx pop ecx pop edi pop esi pop ebp pop ebx mov ecx, [esp+58h+var_10] xor ecx, esp call sub_72D078 add esp, 58h retn 4 sub_6914E0 endp off_691EEC dd offset loc_69154F dd offset loc_691573 dd offset loc_69158B dd offset loc_691668 dd offset loc_691741 dd offset loc_69177D dd offset loc_691790 dd offset loc_6917A3 dd offset loc_6917DE dd offset loc_6919C6 dd offset loc_6919E7 dd offset loc_6919FF dd offset loc_691A17 dd offset loc_691A2E dd offset loc_691A46 dd offset loc_691A5E dd offset loc_691A75 dd offset loc_691BF2 dd offset loc_691CF4 dd offset loc_691D0C dd offset loc_691D24 dd offset loc_691D3B dd offset loc_691D53 dd offset loc_691D6B dd offset loc_691D82 dd offset loc_691D9A dd offset loc_691DB2 dd offset loc_691DC9 dd offset loc_691DE1 dd offset loc_691DF9 dd offset loc_691E10 dd offset loc_691E28 dd offset loc_691E3D dd offset loc_69164B dd offset loc_691EB9 byte_691F78 db 0 db 2 dup(22h), 1 dd 5040302h, 8220706h, 0C0B0A09h, 220F0E0Dh dd 22222222h, 22221110h, 3 dup(22222222h) dd 14131222h, 18171615h, 1C1B1A19h, 201F1E1Dh dd 22222222h, 498D21h off_691FB8 dd offset loc_691894 dd offset loc_6918CF byte_691FC0 db 0 align 4 dd 0CC010101h, 2 dup(0CCCCCCCCh) sub_691FD0 proc near var_104= byte ptr -104h var_4= dword ptr -4 arg_0= dword ptr 4 sub esp, 104h mov eax, dword_7EA140 xor eax, esp mov [esp+104h+var_4], eax push edi mov edi, [esp+108h+arg_0] movzx eax, word ptr [edi+2] dec eax cmp eax, 16h ja loc_6920CF movzx eax, ds:byte_692100[eax] jmp ds:off_6920E8[eax*4] loc_692008: push 2 mov ecx, offset dword_88B1C0 call sub_6EA150 test eax, eax jz short loc_692075 mov eax, [edi+4] push ebx mov ebx, dword_88D0F4 push esi mov esi, eax sub esi, ebx test eax, eax jz short loc_692073 test esi, esi jz short loc_692073 push ebp mov ebp, dword_88D100 mov ecx, eax mov eax, ebp sub eax, ebx cdq idiv esi push eax push ebp push ecx sub ecx, ebx push ecx lea ecx, [esp+124h+var_104] push offset aDDDMoreD ; "%d : %d/%d More : %d" push ecx ; char * call ds:sprintf add esp, 18h push 0 push 0 push 0F51EF5h lea edx, [esp+120h+var_104] push edx push 1 mov ecx, offset unk_8264F8 call sub_5213D0 pop ebp loc_692073: pop esi pop ebx loc_692075: mov eax, [edi+4] mov dword_88D0F4, eax //BaseExp= jmp short loc_6920C5 loc_69207F: mov ecx, [edi+4] mov dword_88D1B0, ecx //JobExp= jmp short loc_6920C5 loc_69208A: cmp dword ptr [ecx+11Ch], 0 jz short loc_6920A7 mov dword ptr [ecx+11Ch], 0 mov ecx, offset dword_88B1C0 call sub_6FC280 loc_6920A7: mov edx, [edi+4] mov dword_88D19C, edx //Zeny= jmp short loc_6920C5 loc_6920B2: mov eax, [edi+4] mov dword_88D100, eax //BaseExpNext= jmp short loc_6920C5 loc_6920BC: mov ecx, [edi+4] mov dword_88D1AC, ecx //JobExpNext= //Weight= //WeightMax= //Search:; "Weight : %3d / %3d" loc_494BB4: ; "Weight : %3d / %3d" push offset aWeight3d3d loc_494BB9: ; char * push edx call ebx ; sprintf mov eax, dword_8797C0 //WeightMax= add esp, 10h xor edi, edi cmp eax, 1 mov ecx, eax jg short loc_494BD2 mov ecx, 1 loc_494BD2: mov eax, dword_8797CC //Weight= imul eax, 64h cdq idiv ecx cmp eax, 32h jl short loc_494BE7 mov edi, 0FFh //BaseLv= //JobLv= //Search:; "Base Lv. %d" //Search:; "Job Lv. %d" loc_494A8B: mov eax, dword_879710 //BaseLv= push eax push offset aBaseLv_D ; "Base Lv. %d" lea ecx, [esp+2Ch] push ecx ; char * loc_494ADB: mov eax, dword_87971C //JobLv= push eax push offset aJobLv_D ; "Job Lv. %d" lea ecx, [esp+2Ch] push ecx ; char * //HPIndex= //MaxHPTable= //Search:
分享: apt-get install samba //安裝 samba(安裝時會設定工作群組) dpkg -i *.deb //安裝 gadmin-samba(用這個來設定 samba)偷懶XD configuration //設定下面這些 /* netbios name = Samba24 //主機名稱 workgroup = Workgroup //工作群組 hosts allow = 127. 192.168.0. //允許的來源的連線 IP interfaces = 127.0.0.1/8 192.168.0.0/24 //選擇連線的網路卡 IP remote announce = 192.168.0.255 //空白即可 remote browse sync = 192.168.0.255 //空白即可 */ 設定完後 記得設定使用者名稱和密碼 讀取: Nautilus -> ^L -> "smb://192.168.*.*" //讀取 Windows 機器下分享的目錄(使用 IP 比較好)參考資料:
2011_0419-1730 //VH226C 開機不能 有電流聲和電子零件毀損聲 2011_0420-1030 //打完客服電話 等下午快遞來收件 1240 //中午就來收走了 2011_0423 //快遞寄回來測試後 目前使用沒問題
Linux: CONFIG -writeconf /home/username/dosbox.conf //Linux 版預設不會寫入設定檔 Windows: C:\Users\username\AppData\Local\DOSBox\dosbox-0.74.conf //版本號碼可能會變動 HotKey: ^F4 //HOST 變更 DOSBox mount 的目錄檔案時 可以按這個重新讀取 ^F10 //解除滑鼠鎖定(在 DOSBox 的視窗) 指令: mount x path //x=磁碟機代號 ; path=指定的路徑 mount x path -t cdrom//模擬成光碟機(Windows 下建議用這個 配合虛擬光碟比較方便) imgmount x path -t iso//指定 iso 檔模擬成光碟機(Linux 下 用這個 有 CD 音軌時比較完美) //只支援 ISO , CUE/BIN 其它的似乎不行參考資料
dpkg-reconfigure locales //得先增加欲執行的語系 不然會錯誤 env LC_ALL=ja_JP.UTF-8 wine //執行的 Windows 程式
about:config -> app.update.enabled -> false browser.startup.homepage -> about:config browser.startup.page -> 0 browser.tabs.autoHide -> true browser.tabs.closeWindowWithLastTab -> false signon.rememberSignons -> false New -> Boolean -> extensions.checkCompatibility.4.0 -> false參考網址:
uname -r (使用這個看安裝的 linux-headers-版本號碼) apt-get install gcc-4.3 make linux-headers-2.6.32-5-686 apt-get install gcc-4.3 make linux-headers-2.6.32-5-amd64
C:\ProgramData\VMware\VMware Workstation\config.ini vmmon.disableHostParameters = "TRUE"加入上面這行 然後"重開機"即可
cp /usr/lib/libcairo.so.2 /opt/libreoffice/basis3.3/program或
cd /opt/libreoffice/basis3.3/program ln -s /usr/lib/libcairo.so.2如果檔案已經存在就把它改名就好
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
: //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
//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 = */
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 */
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
apt-cdrom add -m //將光碟加入來源(/etc/apt/sources.list) apt-get dist-upgrade //升級到新版本參考資料:
//先取得下面 5 個檔案 ia32-sun-java6-bin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/ia32-sun-java6-bin java-common_0.30_all.deb // http://packages.debian.org/lenny/java-common sun-java6-bin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/sun-java6-bin sun-java6-jre_6-22-0lenny1_all.deb // http://packages.debian.org/lenny/sun-java6-jre sun-java6-plugin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/sun-java6-plugin //檔案準備好後 先把依存性相關的安裝好(下面3個) System -> Administration -> Syanaptic Package Manager Search "equivs" //java-common Mark for Installation "equivs" Search "unixodbc" //sun-java6-bin Mark for Installation "unixodbc" Search "ia32-libs" //ia32-sun-java6-bin Mark for Installation "ia32-libs" dpkg -i *.deb //檔案準備好 放一起後 執行就能安裝了32 位元的要抓 i386 版 ; ia32-sun-java6-bin_6-22-0lenny1_amd64.deb & ia32-libs 的部份不用裝
chmod //變更權限 history //顯示使用過的指令 !(number) //執行使用過的指令編號 history -c //清除使用過的指令(暫時) rm /home/username/.bash_history //清除使用過的指令(永久) iconv -f big5 -t utf-8 filename -o outfilename //轉碼 -f(原始編碼) -t(輸出編碼) uname //顯示系統資訊 tar -C 目錄 -xjvf 檔名.bz2 //解壓縮(x)檔案.bz2(z) tar -C 目錄 -xzvf 檔名.gz //解壓縮(x)檔案.gz(z) tar -tvf 檔名 //查看壓縮檔(t) 壓(解)縮處理中檔名(v) 處理的檔案(f) 視壓縮檔檔名加入 j,z tar -cvf 壓縮檔名 目標 //壓縮(c)檔案 視壓縮類型加入 j,z locale //環境變數 LANG=en_US.UTF-8 //設定環境 LANG=zh_TW.BIG5 //設定環境
vim /etc/hosts就可以解決緩慢的問題
vim /etc/hostname vim /etc/hosts建議是直接改這 2 個檔案來更改主機名稱比較沒有問題
/etc/init.d/hostname.sh不想重新開機可以這樣直接使用主機名稱
BOOTSECT.EXE /NT60 C: //這行不一定要執行 看你的 OS (VISTA 前的才需要) BCDBOOT C:\WINDOWS /L JA-JP /S C: //把開機程式安裝到 C 碟 (JA-JP 是語系 請參考 Boot 目錄自行設定)
TAKEOWN /F I:\boot\*.* /A CACLS I:\boot\*.* /E /G Administrators:F TAKEOWN /F I:\bootmgr /A CACLS I:\bootmgr /E /G Administrators:F執行完後 Boot 目錄和 bootmgr 就可以移除了