วันอังคารที่ 8 พฤศจิกายน พ.ศ. 2554
การล้าง Printer และ Add ใหม่ (Network)
reg add HKCU\Printers\Connections
@start \\itcenter01\CanoniP1
วันเสาร์ที่ 17 กันยายน พ.ศ. 2554
วิธีแก้ไข Android เข้า Market ไม่ได้
จะใส่ account เราต้อง factory reset ก่อนนะครับ
Setting > Privacy > Factory Data Reset
boot ขึ้นมาค่อยใส่ gmail หลัก
การต่อ edge ต้องไปตั้งค่า APN สำหรับเครือข่ายมือถือที่ใช้อยู่ด้วยนะครับ
Setting > Wireless > Mobile Network > Access Point Names
ค่าดูจากนี้ครับ
http://www.droidsans.com/node/1660
วันเสาร์ที่ 30 กรกฎาคม พ.ศ. 2554
วิธีทำ load balance ทั้ง win xp และ win 7 หน่อยครับ

อย่าไปเรียกว่า Loadbalance ครับ ให้เรียกว่า MultiWan จะถูกต้องกว่าครับ
กรณี WinXP ทำโดยตัวมันเองไม่ได้ครับ... แต่ก็มีSoftwareหลายตั้วที่ทำได้(ซึ่งก็ไม่เห็นว่าจะWorkสักตัว)
ส่วนกรณี Windows 7 ทำได้ทันทีและง่ายมาก...
แนะนำเอาเป็นไกด์ไลน์นะครับ

- เริ่มจากหาทางเชื่อมเราเตอร์สองตัวเข้า Windows 7 ให้ได้ก่อน.. อาจใช้การ์ดแลนสองใบ หรือ ถ้ามีการ์ดแลนออนบอร์ดอันเดียว ก็สามารถเสียบเราเตอร์สองตัวเข้า"สวิตซิง"แล้วค่อยเขาการืดแลนก็ได้ครับ
- ตั้งเราเตอร์ทุกตัวให้มันทำงานเป็นGateway(เปิดPPPoE ให้เราเตอร์ทำหน้าติดต่ออินเตอร์เน็ตเอง)
- กรณีเครื่องคอมของเรามีการ์ดแลนสองใบ ก็ให้เข้าไปที่ หน้าเซตติง IPv4 ของการ์ดแลนใบนั้นๆ แล้วตั่งค่า Metric ให้เป็นเลขเดียวกัน เช่น เลข1ทั้งสองใบ.. เท่านี้ก็จะพร้อมใช้ทันที
- กรณีต่อเราเตอร์ผ่าน Switch.. แบบนี้ที่เราเตอร์ทุกตัวจะต้องตั้งค่าIPให้เราเตอร์แต่ล่ะตัว(ใช้DHCPที่เรา เตอร์ไม่ได้) แล้วให้เราตั้งค่า Gateway/DNS ของเราเตอร์แต่ล่ะตัวให้ครบ.. เท่านี้ก็จะพร้อมใช้ทันที
- สุดท้ายแถม เพื่อให้ Windows7 ทำงานกับ Multiwanได้ดีขึ้น ให้เข้าไปแก้ REG นิดหน่อย เพื่อให้ Window7มันทำการสุมWanทุกครั้งที่โอนถ่ายข้อมูล
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters
แล้วให้เพิ่มDword Keys/Values ดังนี้
RandomAdapter = 1
SingleResponse = 1
* เมื่อทำแบบนี้แล้ว จะแก้ปัญหากรณีเน็ตสายใดสายนึงหลุดแล้วค้างได้ครับ
มันทำไม่ยากครับ ลองSearchในgoogleดูก็ได้ครับ มีรูป มีที่สอนทำเยอะแยะเลยครับ
(ลองขุดๆกระทู้เก่าๆดูนะครับ มีทั้งรูป แล้ววิธีการแนะนกันไว้เยอะแล้วครับ)
Ref http://www.overclockzone.com/forums/showthread.php/1271793-%E0%B8%82%E0%B8%AD%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%97%E0%B8%B3-load-balance-%E0%B8%97%E0%B8%B1%E0%B9%89%E0%B8%87-win-xp-%E0%B9%81%E0%B8%A5%E0%B8%B0-win-7-%E0%B8%AB%E0%B8%99%E0%B9%88%E0%B8%AD%E0%B8%A2%E0%B8%84%E0%B8%A3%E0%B8%B1%E0%B8%9A
วันอังคารที่ 19 เมษายน พ.ศ. 2554
ERROR The terminal server has exceeded the maximum number of allowed connections

สืบเนื่องจากบทความที่แล้ว ต้องมีการ remote ไปยัง server บ่อยมาก
โดยปกติ windows server 2003 จากอนุญาติให้เข้าใช้ server ได้เพียง 2 session เท่านั้น
ปัญหาเกิดก็คือ user ของผมกับเพื่อนหลุดพร้อมๆ กัน ทำให้ session มัน disconnect ไม่ใช่ log off ทำให้ไม่สามารถเข้าใช้ซ้ำกันได้ เมื่อพยายามจะรีโมตมันก็ฟ้องว่า
"Terminal server has exceeded maximum number of allowed connection"
เลยต้องหาวิธีตามเน็ตก็พบว่า เพียงใช้คำสั่ง
mstsc /v:<ไอพีของเครื่องเซิร์ฟเวอร์> /f -admin
ก็จะ log in เข้าระบบได้ แต่บางบทความก็พบว่าให้ใช้คำสั่งนี้แทน
mstsc -v:<ไอพีของเครื่องเซิร์ฟเวอร์> /f -console
ref http://www.demoncodez.com/os-network/145-error-the-terminal-server-has-exceeded-the-maximum-number-of-allowed-connections.html
Batch File แก้ปญหา : “Terminal Server Has Exceeded the Maximum Number of Allowed Connections”
- สร้าง batch file ตาม code ทางด้านล่าง
- เปิด batch file
- ป้อน ชื่อ Server
- ป้อน Username
- ป้อน Password
- ใส่ ID ที่ต้องการ Reset Session
@ECHO OFF
SET EXEC=%SYSTEMROOT%\system32\dllcache
SET SERVER=
SET /P SERVER=Enter IP or server name: %=%
SET USER=
SET /P USER=Enter user name: %=%
SET PASS=
SET /P PASS=Enter password: %=%
NET USE \\%SERVER% /user:%USER% %PASS%
:START
%EXEC%\query session /server:%SERVER%
SET SID=
SET /P SID=Enter session ID to reset: %=%
%EXEC%\reset session %SID% /server:%SERVER%
SET CONT=
SET /P CONT=Reset more sessions? %=%
IF /i “%CONT%” EQU “y” GOTO START
SET REMOTE=
SET /P REMOTE=Launch remote desktop? %=%
IF /i “%REMOTE%” NEQ “y” GOTO END
mstsc /v:%SERVER% /f
:END
ref http://km.ru.ac.th/computer/?p=359
วันเสาร์ที่ 9 เมษายน พ.ศ. 2554
การทำโปรแกรม ปิง (Ping)
Public Class PingCheck_V2Dim tmp(10) As String
Private Sub PingCheck_V2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
string_ip()
Button1.Enabled = False
Button2.Enabled = True
timer_data()
End Sub
Private Sub string_ip()
tmp(1) = "xx.xx.xx.xx"
tmp(2) = ""xx.xx.xx.xx"
tmp(3) = ""xx.xx.xx.xx"
tmp(4) = "209.85.175.147" 'Google
tmp(5) = "xx.xx.xx.xx"
tmp(6) = "xx.xx.xx.xx"
tmp(7) = "xx.xx.xx.xx"
tmp(8) = "xx.xx.xx.xx"
tmp(9) ="xx.xx.xx.xx"
tmp(10) = "xx.xx.xx.xx"
End Sub
Private Sub check_ip(ByVal string_ip As String, ByVal tag_name As Integer)
If My.Computer.Network.Ping(string_ip) Then
alert_string(tag_name, Color.Green)
Else
alert_string(tag_name, Color.Red)
End If
End Sub
Private Sub alert_string(ByVal tag_name As Integer, ByVal string_color As Color)
For Each object_label As Object In Me.Controls
If TypeOf object_label Is Label Then
If CType(object_label, Label).Tag = tag_name Then
If string_color = Color.Red Then
CType(object_label, Label).ForeColor = Color.Red
Else
CType(object_label, Label).ForeColor = Color.Green
End If
End If
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Button2.Enabled = True
PictureBox1.Image = ProPing.My.Resources.Resources.sonic
ProgressBar1.Value = 30
timer_data()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button1.Enabled = True
Button2.Enabled = False
PictureBox1.Image = ProPing.My.Resources.Resources.sonicwarp
ProgressBar1.Value = 0
Timer1.Stop()
Timer2.Stop()
Label1.ForeColor = Color.Orange
Label2.ForeColor = Color.Orange
Label3.ForeColor = Color.Orange
Label4.ForeColor = Color.Orange
Label5.ForeColor = Color.Orange
Label6.ForeColor = Color.Orange
Label7.ForeColor = Color.Orange
Label8.ForeColor = Color.Orange
Label9.ForeColor = Color.Orange
Label10.ForeColor = Color.Orange
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Time_Count.Text = Time_Count.Text - 1
ProgressBar1.Value = Time_Count.Text
If Time_Count.Text = "0" Then
Time_Count.Text = "30"
timer_data()
End If
End Sub
Private Sub timer_data()
Timer1.Interval = 30000 '1000 = 1 วินาที
Timer1.Enabled = True
Timer2.Interval = 1000 '1000 = 1 วินาที
Timer2.Enabled = True
Time_Count.Text = "30" 'Now.Second
Timer1.Start()
Timer2.Start()
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 30
For i As Integer = 1 To 10
check_ip(tmp(i), i)
Next
End Sub
End Class
การ Import Excel ทั้งหมดลง Datagrid
Public Class Test_Import_ExcelDim sFilePath, sFileName As String
Dim sSlash As Single
Dim strConnection As System.Data.OleDb.OleDbConnection
Dim myPath As String = sFilePath & sFileName
Private Sub Test_Import_Excel_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'B a s s i e
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With OpenFileDialog1
.Title = "Import Sage CSV file"
.InitialDirectory = "C:\Documents and Settings\htran\My Documents\vbnet\Welcome"
.Filter = "File (*.xls;*.csv;*.txt)|*.xls;*.csv;*.txt|All files (*.*)|*.*"
.ShowDialog()
sSlash = InStrRev(.FileName, "\")
sFilePath = Mid(.FileName, 1, sSlash)
sFileName = Mid(.FileName, sSlash + 1, Len(.FileName))
TextBox1.Text = .FileName
End With
myPath = sFilePath & sFileName
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim objDataSet As System.Data.DataSet
Dim objAdapter As System.Data.OleDb.OleDbDataAdapter
strConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" & myPath & " '; " & "Extended Properties=Excel 8.0;")
objAdapter = New System.Data.OleDb.OleDbDataAdapter("select * from [sheet1$]", strConnection)
objDataSet = New System.Data.DataSet
objAdapter.Fill(objDataSet, "Customers")
DataGridView1.DataSource = objDataSet.Tables(0).DefaultView
strConnection.Close()
Catch ex As Exception
Dim er As String
strConnection.Close()
End Try
End Sub
End Class
การ Import Excel แบบเลือกจุดได้
Option Explicit On'Option Strict On
Imports Microsoft.Office.Interop
Imports System.Object
Imports System.Exception
Imports System.SystemException
Imports System.Runtime.InteropServices.ExternalException
Imports System.Runtime.InteropServices.COMException
Public Class Test_Import_Excel_V2
Dim sFilePath, sFileName As String
Dim sSlash As Single
Dim myPath As String
Private Sub Test_Import_Excel_V2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'B a s s i e
End Sub
Private Sub export_to_excel()
OpenLgExcel()
Dim xlAPP As Excel.Application
Dim xlWB As Excel.Workbook
Dim XlWs As Excel.Worksheet
xlAPP = CreateObject("Excel.Application")
'##########################################################################################
'EX
'xlWB = xlAPP.Workbooks.Open(Application.StartupPath & "\Template\" & "Invoice.xls"))
xlWB = xlAPP.Workbooks.Open(myPath)
'##########################################################################################
'EX
'XlWs = xlWB.Sheets("Invoice")
'XlWs = xlWB.Sheets(2)
XlWs = xlWB.Sheets(2)
'##########################################################################################
TextBox2.Text = XlWs.Range("D2").Value
xlAPP.Visible = True
xlAPP.Workbooks.Close()
xlAPP.Quit()
XlWs = Nothing
xlWB = Nothing
xlAPP = Nothing
CloseLgExcel()
End Sub
Public Sub OpenLgExcel()
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US")
End Sub
Public Sub CloseLgExcel()
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("th-TH")
kill_process_Excel()
End Sub
Public Sub kill_process_Excel()
Try
Process.GetProcessesByName("EXCEL")(0).Kill()
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With OpenFileDialog1
.Title = "Import Sage CSV file"
.InitialDirectory = "C:\Documents and Settings\htran\My Documents\vbnet\Welcome"
.Filter = "File (*.xls;*.csv;*.txt)|*.xls;*.csv;*.txt|All files (*.*)|*.*"
.ShowDialog()
sSlash = InStrRev(.FileName, "\")
sFilePath = Mid(.FileName, 1, sSlash)
sFileName = Mid(.FileName, sSlash + 1, Len(.FileName))
TextBox1.Text = .FileName
End With
myPath = sFilePath & sFileName
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
export_to_excel()
End Sub
End Class
วันจันทร์ที่ 28 มีนาคม พ.ศ. 2554
วิธีแก้ไขปัญหา เปิด Excel แล้วช้า

2.เลือกแบบพิเศษ เลือก วัตถุ กด Delete 1 ที แล้วเซฟ

เปิดแล้วปิดใหม่ จบ
อ้างอิงจาก http://www.excelexperttraining.com/forums/showthread.php?t=594&page=1
"ให้กด เลือกทั้งหมด และกด F5 สั่งค้นหา Object กด Delete 1 ครั้ง"
และก้อ Save ลองเปิดดูใหม่ เร็วแล้วครับ ( ขอบคุณเพื่อนใน MSN ครับ)
"ใน Sheet มี Object ซึ่งไม่ทราบว่ามันมาได้ไง เป็น Object ที่มองไม่เห็น จริง ๆ ด้วย"
วันพฤหัสบดีที่ 3 กุมภาพันธ์ พ.ศ. 2554
โหมด Auto P A S M ของกล้อง แตกต่างกันอย่างไร
เรามาดูกันดีกว่าว่าแต่ละโหมดมีหน้าที่อย่างไรกันบ้าง
Auto : ชื่อ ก็บอกอยู่แล้วว่า Auto ก็คือการทำงานของกล้องแบบอัตโนมัติ ไม่ว่าจะอยู่ในสถานการณ์ใดก็ตาม ท่านสามารถถ่ายได้อย่างรวดเร็ว กด "ฉับ" เดียวได้รูปเลยครับ แต่ก็ต้องแลกมาด้วยภาพที่อาจจะไม่ค่อยดีเท่าที่กล้องควรจะทำได้ ถ้าเราลองถ่ายในสภาพแสงที่น้อยๆ มีความแปรปรวนของสภาพแสงมากหน่อย การใช้โหมด Auto อาจไม่ใช่คำตอบครับ
P : ก็คือ Program โหมดนี้ก็คือโหมด Auto แปลงร่างมานั่นเอง ซึ่งการทำงานโหมดนี้ กล้องจะคำนวนรูรับแสงและความไวชัตเตอร์ ให้โดยอัตโนมัติ แต่เราสามารถกำหนด ISO และการชดเชยแสงได้ โหมดนี้เหมาะสำหรับคนที่พอควบคุมกล้องได้บ้าง ถ่ายสนุกดีครับ แต่ก็ยังไม่สามารถรีดประสิทธิภาพของกล้องได้ไม่เต็มที่เช่นเดียวกับโหมด Auto
A, AV : ก็คือ Aperture Priority เป็นโหมดที่เรากำหนดรูรับแสงเอง โดยกล้องจะคำนวณความไวชัตเตอร์ให้โดยอัตโนมัติ เหมาะกับการถ่ายภาพบุคคล หรือภาพอะไรก็ตาม ที่ต้องการกำหนดรูรับแสงไว้ค่าใดค่าหนึ่งเสมอ แต่มีข้อควรระวังคือ เราต้องคอยดูความไวชัตเตอร์ไว้เสมอ เพราะถ้าไม่พอภาพก็อาจจะเบลอ เสียได้ครับ ทาแก้ก็คือ ดันISO เพิ่มขึ้นครับ เราจะได้ความไวชัตเตอร์ที่มากขึ้น
S : ก็คือ Shutter Priority คือโหมดที่เรากำหนดความไวชัตเตอร์เอง โดยกล้องจำคำนวณรูรับแสงให้โดยอัตโนมัติ เหมาะกับการถ่ายแบบ แพนกล้อง ถ่ายภาพAction ภาพกีฬา หรือภาพใดๆที่เราต้องการหยุดการเคลื่อนไหวของแบบเอาไว้ แต่ระวังภาพมืดนะครับ ถ้าหากเราปรับความไวชัตเตอร์มากไป แต่ลืมดูไปว่ารูรับแสงกว้างพอสำหรับสภาพแสงขณะนั้นหรือไม่ ทางแก้ก็คือ ดันISO ช่วยอีกแล้วครับ ^ ^
M : Manual คือโหมดที่เราควบคุมกล้องเองทั้งหมด ไม่ว่าจะเป็นรูรับแสง หรือความเร็วชัตเตอร์ เป็นโหมดที่ทำให้เราสามารถสร้างสรรค์ภาพของเราได้อย่างเต็มที่ครับ อาจจะช้าสำหรับการปรับตั้งค่าก่อนถ่าย ทำให้ไม่เหมาะกับการถ่ายภาพที่ต้องเร่งรีบซักเท่าไหร่ เว้นแต่ใครที่ปรับเก่งๆ ไวๆ วัดแสงแม่นๆ ก็ทำให้กล้องสามารถ สร้างภาพถ่าย ที่ดีที่สุดออกมาได้ครับ
ref http://www.jirath.com/%E0%B8%9A%E0%B8%97%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%96%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%A0%E0%B8%B2%E0%B8%9E/%E0%B9%82%E0%B8%AB%E0%B8%A1%E0%B8%94-Auto-P-A-S-M-%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%81%E0%B8%A5%E0%B9%89%E0%B8%AD%E0%B8%87-%E0%B9%81%E0%B8%95%E0%B8%81%E0%B8%95%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-243
วันจันทร์ที่ 17 พฤษภาคม พ.ศ. 2553
วิธีการสร้าง USB Flash Drive ไว้ Boot และติดตั้ง Windows 7 หรือ Vista
เตรียมอุปกรณ์
1. USB Flash Drive ควรจะมีความจุ 4 GB
2. แผ่นติดตั้ง Windows 7 หรือ Vista
3. คอมพิวเตอร์ที่สามารถที่มี BIOS บูตผ่าน USB Flash Drive ได้
ครบแล้วมาเริ่มกันเลย
หมายเหตุ : ขั้นตอนการทำผมใช้เครื่องที่มี Vista ลงอยู่แล้ว
ขั้นตอนการทำ
1. เสียบ USB Flash Drive เข้ากับช่อง USB ของเครื่อง ถ้า USB Flash Drive ยังมีข้อมูลก็ย้ายไปเก็บที่อื่นก่อน เพราะจะต้องมีการ Format
2. เปิดหน้า Command Prompt โดยสิทธิของ Admin. โดยพิมพ์คำสั่ง CMD ที่ Start Menu search box แล้วกดปุ่ม Ctrl + Shift แล้ว Enter หรือ คลืกที่ปุ่ม Start menu > All Programs > Accessories > คลิกขวาบน Command Prompt และเลือก Run as administrator
3. ที่ Command Prompt พิมพ์ DISKPART แล้ว เสร็จให้พิมพ์คำว่า LIST DISK เพื่อตรวจดูว่า USB Flash Drive อยู่ที่ Disk เท่าไร คุณจะเห็นรายการ Disk ทั้งหมดของคุณ
4. ต่อมาให้คุณเลือก Disk ที่เป็น USB Flash Drive ของคุณ ในที่นี่ เป็น Disk 5 ให้คุณพิมพ์คำสั่งต่อไปนี้
SELECT DISK 5
-คำสั่งเลือก Disk 5 เป็น เป้าหมาย
CLEAN
-คำสั่งล้างข้อมูลทั้งหมดใน USB Flash Drive
CREATE PARTITION PRIMARY
-คำสั่งสร้าง Partition ให้เป็นแบบ Primary
SELECT PARTITION 1
-เมื่อสร้างแล้วก็เลือก Partition 1
ACTIVE
-คำสั่งตั้งให้ เป็น Active เพื่อทำการบูตได้
FORMAT FS=NTFS
-Format ให้มันเป็นแบบ NTFS
ASSIGN
EXIT
หมายเหตุ: ตลอดขั้นตอนที่ทำห้ามปิดหน้าต่าง Command Prompt นะครับ จะต้องใช้ในขั้นตอนต่อไป แต่ minimize ได้
5. เมื่อจบขั้นที่ 4 ให้คุณเอาแผ่น Windows 7 หรือ Vista ใส่ใน DVD Drive ของคุณ ตรวจสอบดูว่า DVD Drive เป็นอะไร เช่น D , E , F ให้เปิด My Computer ดู ในที่นี่ DVD Drive เป็น <> USB Flash Drive เป็น <>
6. มาที่หน้าต่าง Command Prompt จากข้อ 4 ให้พิมพ์
D:
CD BOOT
7. เมื่อหน้าต่าง Command Prompt มาอยู่ที่ D:boot> ให้พิมพ์คำสั่ง BOOTSECT.EXE /NT60 I: เพื่อสร้าง Bootcode ไว้ที่ USB Flash Drive เสร็จแล้ว ปิดหน้าต่าง Command Prompt ได้
8. ให้คุณก็อปปี้ ข้อมูลบนแผ่น Windows 7 หรือ Vista ทั้งหมดลงที่ USB Flash Drive ใช้ก็อปทาง My computer
9. คุณก็จะได้ USB Flash Drive ที่สามารถ Boot และติดตั้ง Windows 7 หรือ Vista ได้ เพียงคุณไปตั้ง BIOS ของเครื่องที่ต้องการติดตั้งให้บูต USB Drive เป็นอันดับแรก เท่านั้น
เครดิต : augie@pantip.com / Thaigaming
ref http://yayee.spaces.live.com/blog/cns!70EBD1A96D280F5D!7924.entry
วันจันทร์ที่ 10 พฤษภาคม พ.ศ. 2553
การทำ VPN บน Windows 2003 Server
บทนำ
ในที่นี้เครื่อง Windows 2003 Server ที่ใช้มี Network Card จำนวน 2 การ์ดคือ
1. เชื่อมต่ออินเตอร์เน็ตเป็น 202.129.16.28
2. เชื่อมต่อกับเครือข่ายภายใน เป็น 172.24.51.12
ความต้องการ
ต้องการให้สำนักงานในสังกัดหน่วยงานของตัวเองซึ่งอยู่ที่อื่น ๆ ที่มีการเชื่อมต่อกับเครือข่าย Internet แล้ว สามารถ Access เข้ามาใช้งานเครือข่ายภายในที่มี IP ของเครือข่ายเป็น 172.24.51.0/24 ได้
จึงต้องทำให้ Server ตัวนี้เป็น VPN Server เพื่อให้สำนักงานอื่น ๆ ที่เชื่อมต่อกับเครือข่าย Internet สามารถ Access เข้าสู่เครือข่าย 172.24.51.0/24 ได้ โดยให้เชื่อมมาที่ขานอกของ Server ที่มี IP เป็น 202.129.16.28 จากนั้น Server ก็จะจ่าย IP ที่เป็น Private ให้กับเครื่องที่เชื่อมเข้ามา และสามารถทะลุเข้าไปยังยังเครือข่าย 172.24.51.0/24 โดยผ่านการ์ดที่เป็น Private ของ Server ที่มี IP เป็น 172.24.51.12 ต่อไปได้
ขั้นตอนการทำ
1. ไปที่เมนู Start --> Administrative Tools --> Routing and Remote Access ดังรูปที่ 1
รูปที่ 1
2. แล้วจะได้ดังรูปที่ 2
รูปที่ 2
3. ให้คลิ๊กที่คำว่า Server Status แล้วเลือกเมนู Add Server ดังรูปที่ 3
รูปที่ 3
4. จะได้ดังรูปที่ 4 ให้เลือก This computer แล้วคลิ๊กปุ่ม OK
รูปที่ 4
5. แล้วจะได้ดังรูปที่ 5
รูปที่ 5
6. จากรูปที่ 5 ให้คลิ๊กที่ชื่อ Server แล้วเลือกเมนู Configure and Enable Routing and Remote Access ดังรูปที่ 6
รูปที่ 6
7. เมื่อได้ดังรูปที่ 7 ให้คลิ๊กปุ่ม Next
รูปที่ 7
8. เมื่อได้ดังรูปที่ 8 ให้เลือกรายการตามต้องการ ซึ่งถ้าต้องการทำ NAT ด้วยก็ให้เลือกรายการ Virtual Private Network (VPN) access and NAT แต่ในที่นี้เราต้องการทำ VPN อย่างเดียว ก็ให้เลือกรายการ Remote access (dial-up or VPN)
รูปที่ 8
9. เมื่อได้ดังรูปที่ 9 ให้เลือก VPN
รูปที่ 9
10. เมื่อได้ดังรูปที่ 10 ก็จะเป็นขั้นตอนการเลือกการ์ดแลนว่าการ์ดไหนเป็นการ์ดที่ติดต่อกับ Internet เพื่อ enable VPN clients ก็ให้เลือกการ์ดที่เชื่อมต่อกับ Internet ครับ
รูปที่ 10
11. เมื่อได้ดังรูปที่ 11 ก็จะเป็นขั้นตอนวิธีการจ่าย IP address ให้กับเครื่องที่ connect เข้ามา ซึ่ออาจจะใช้ DHCP Server หรือการกำหนดช่วงเอง ในที่นี้เลือกการกำหนดช่วงเอง ก็ให้เลือก From a specified range of address
รูปที่ 11
12. จากรูปที่ 12 ให้คลิ๊กปุ่ม New เพื่อการกำหนดค่า IP Address ที่จะจ่ายให้เครื่อง Client
รูปที่ 12
13. ให้ป้อนค่า IP address ที่จะจ่ายให้เครื่อง Client ดังรูปที่ 13
รูปที่ 13
14. เมื่อได้ดังรูปที่ 14 ให้คลิ๊กปุ่ม Next
รูปที่ 14
15. เมื่อได้ดังรูปที่ 15 ก็เป็นการกำหนดว่าจะให้มีการ Authenticate ผ่าน Radius Server หรือไม่ ในที่นี้ไม่ครับ
รูปที่ 15
16. เมื่อได้ดังรูปที่ 16 ให้คลิ๊กปุ่ม Finish
รูปที่ 16
17. รูปที่ 17 จะเกี่ยวกับ DHCP Server ซึ่งในที่นี้ไม่ใช้ก็ให้คลิ๊กปุ่ม OK
รูปที่ 17
18. เมื่อได้ดังรูปที่ 18 ให้คลิ๊กที่เครื่องหมาย +
รูปที่ 18
19. ก็จะได้ดังรูปที่ 19 เป็นอันเสร็จขั้นตอนครับ แต่ถ้ายังไม่ได้ทำ Static Route ก็ต้องทำซะด้วยนะครับ
รูปที่ 19
Ref http://www.itmanage.info/technology/windows/vpn_on_win_2003_server.html
วันจันทร์ที่ 29 มีนาคม พ.ศ. 2553
Fix Error Nul managerment Hp Serial
Document ID: c01442875
Version: 1
Release Date: 2008-04-25
Last Updated: 2008-04-25
Unknown devices may appear under the Other devices section of the Windows Device Manager after installing Windows Server 2003 or Windows Server 2008 on a ProLiant 100-Series G5 server (See Figure 1).
Figure 1: Unknown devices displayed under Other devices section of the Windows Device Manager.
This occurs because the appropriate drivers have not been installed on the ProLiant 100-Series G5 server running Windows Server 2003 or Windows Server 2008. The Unknown devices should be labeled as "HP Null Management Controller" and "Microsoft Generic IPMI Compliant Devices."
Any ProLiant 100-Series G5 server running Windows Server 2003 or Windows Server 2008.
The Unknown devices displayed in the Other devices section can be safely ignored if there is not a plan to use Windows Management Instrumentation (WMI). One of the Unknown devices should be labeled as "Microsoft Generic IPMI Compliant Device," which is used for WMI.
If WMI must be used, install the HP Null Management Controller driver and HP Null IPMI Controller driver, which will replace the Unknown device display in the Other devices section.
Choose one of the following methods to install the HP Null Management Controller driver and the HP Null IPMI Controller driver, depending on which operating system update version is planned to be used:
Method 1: For Windows Server 2003 SP2
If Windows Server 2003 SP2 is installed, perform the following:
- Install Windows Server 2003 SP2 and the chipset, NIC, and VGA drivers.
- Locate the Control Panel and choose Add/Remove Windows Components .
- Choose Management and Monitoring Tools .
- Choose Hardware Management to install KCS (CA2 CA3) driver by highlighting (do not check the box in front).
- Check the box next to Hardware Management.
- Choose OK in the 3rd Party Drivers box.
- Place the SP1 or the R2/Disk2 CD into the drive.
- Choose Finish in the Completing the Windows Components Wizard window.
- Locate the Device Manager and view the status.
- Install the HP release Smart-Package for IPMI driver (CA0 CA1) from the Support CD Version 2.0. This is located under the System devices section of the Device Manager, labeled HP Null Management Controller and Microsoft Generic IPMI Compliant Device (See Figure 2.)
Figure 2: HP Null Management Controller and Microsoft Generic IPMI Compliant Device.
Note: If Windows Server 2003 SP1 is already installed on the server, HP recommends updating to Windows Server 2003 SP2 prior to installing the drivers in the above procedure. If Windows Server 2003 SP1 was never installed on the server, it is necessary to first install SP1 prior to installing SP2.
Method 2: For Windows Server 2003 SP1
If Windows Server 2003 SP1 is currently installed and there are no plans to update to Windows Server 2003 SP2, perform the following to download the HP Null IPMI Controller Driver:
- Go to
- Select Software and Driver downloads.
- In the Search field type: "cp008390.exe."
- In the Search Results box select: HP NULL IPMI Controller Driver for Windows Server 2003 .
- Choose to download .
After downloading the HP Null IPMI Controller Driver, perform the following to download the HP Null Management Controller Driver:
- Go to
- Select Software and Driver downloads.
- In the Search field type: "cp008388.exe."
- In the Search Results box select: HP NULL IPMI Controller Driver for Windows Server 2003 x64 Editions.
- Choose to download .
| RECEIVE PROACTIVE UPDATES : Receive support alerts (such as Customer Advisories), as well as updates on drivers, software, firmware, and customer replaceable components, proactively via e-mail through HP Subscriber's Choice. Sign up for Subscriber's Choice at the following URL: |
| NAVIGATION TIP : For hints on navigating HP.com to locate the latest drivers, patches, and other support software downloads for ProLiant servers and Options, refer to the Navigation Tips document . SEARCH TIP : For hints on locating similar documents on HP.com, refer to the Search Tips document . |
วันพุธที่ 10 กุมภาพันธ์ พ.ศ. 2553
Logon Script Map Drive แบบกำหนด User/Password
Map Drive z จาก Share File ที่ชื่อ Public จากเครื่อง 192.168.xx.xx ซึ่งเป็น Domain ชื่อ test.com ซึ่ง มี Username = test และ Password = 123456 ในการเข้าถึงได้แบบ Full Control
net use z: /delete /yes
net use z: \\192.168.xx.xx\Public /user:test.com\test "123456" /persistent:yes
Ex. Struct
===========
net use y: /delete /yes
net use y: \\Ipaddress\Folder /user:domain\user "password" /persistent:yes
===========
ใส่ Notepad แล้ว Save เป็น login.bat นำไปไว้ที่
C:\WINDOWS\SYSVOL\sysvol\rujirapong.com\scripts
ของเครื่อง Domain
หลังจากนั้นเปิด Active Directory Users and Computers ขึ้นมา แล้วคลิ๊กขวาที่ User ที่ต้องการจะทำ Logon Script โดยเลือก Properties
ไปที่ Tab Profile ในช่อง Logon Script ระบุ login.bat
จบ
วันอังคารที่ 9 กุมภาพันธ์ พ.ศ. 2553
วิธีแก้ Unknow Device ML150G5 Win2008
HP ProLiant 100 Series Servers Null Management INF Installer Smart Component for Microsoft Windows Server 2003/2008
| Type: | Driver - System Management |
| Version: | 1.0.0.0 (26 Feb 2008) |
| Operating System(s): | Microsoft Windows Server 2003, Microsoft Windows Server 2008 W32 |
| File name: | cp008464.exe (482 KB) |
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=3580698&prodNameId=3580699&swEnvOID=1005&swLang=8&mode=2&taskId=135&swItem=MTX-b8943f6c78904e42a93d8e6848
====================================================================
This component installs a driverless INF file for the management function that is provided by the ACPI\HPI0002 device on the HP ProLiant 100 Series platforms. The INF file prevents the "unknown device" entry (a yellow bang) from displaying for the device, ACPI\HPI0002, in Windows Device Manager. This component is only needed on Generation 5 platforms or later if the unknown device entry is present in Device Manager.
วันพฤหัสบดีที่ 7 มกราคม พ.ศ. 2553
เปิดการใช้งาน Load Balance For Xp
Code Reg
=============================================
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
"RandomAdapter"=dword:00000001
"SingleResponse"=dword:00000001
=============================================
Disable_Load_balancing
Code Reg
=============================================
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
"RandomAdapter"=dword:00000000
"SingleResponse"=dword:00000000
=============================================
วันพุธที่ 6 มกราคม พ.ศ. 2553
Forgotten root Password
Help! I forgot my root password. How do I log in now?
You can log in using single-user mode and create a new root password.
To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following:
1. At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.
2. You are presented with a prompt that looks similar to the following:
grub append> ro root=LABEL=/
3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:
ro root=LABEL=/ single
4. Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:
sh-2.05b#
5. You can now change the root password by typing
passwd root
You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.
==================================
ลืมรหัสผ่านของ root
- ขั้นตอนสำหรับ LILO
- เมื่อ Restart เครื่อง ก่อนเข้าระบบ ให้กด Alt-X ขณะที่อยู่ที่ LILO prompt แล้วพิมพ์ว่า linux single
- เมื่อเข้าไปจะได้สถานะเป็น root ทันที ก็เพียงแต่ใช้คำสั่ง passwd root แล้ว reboot ก็เรียบร้อยแล้ว
- ขั้นตอนสำหรับ GRUB
- เมื่อ Restart เครื่อง ก่อนเข้าระบบขณะที่อยู่ที่ GRUB prompt ให้กด e
- พบ Fedora กด e แล้วพบ Kernel กด e แล้วพิมพ์ single ต่อท้ายคำสั่งที่ใช้ boot ระบบ
- ออกมาแล้วกด b เพื่อ boot ตามคำสั่งที่แก้ไขนั้น ก็จะเข้า #
- เมื่อเข้าไปจะได้สถานะเป็น root ทันที ก็เพียงแต่ใช้คำสั่ง passwd root เพื่อเปลี่ยนรหัสผ่าน แล้ว reboot ก็เรียบร้อยแล้ว
- สำหรับเครื่อง Sun
- ซึ่งเป็น Unix server ที่ดี จะใช้การ Reboot และกดปุ่ม stop a แล้วใช้คำสั่ง boot -s
ทำการ boot แผ่นที่ 1 ขึ้นมา แล้วกด F5
boot : linux rescue
จากนั้นก็ set ค่าที่แสดงขึ้นมา จนถึงเครื่องหมาย #
sh-3.00# chroot /mnt/sysimage
sh-3.00# passwd root
New UNIX password : <
Retype new UNIX password : <
ถึงขั้นตอนนี้ก็สามารถเปลี่ยน password ได้แล้ว
วิธีแก้ password ใน fedora core 3
วิธีนี้ไม่จำเป็นต้องใช้แผ่น boot
พอเริ่มทำการ boot linux ให้กด a
grub append / ro root = LABLE = / rhgb guiet 1 <<<--- พิมพ์ 1 เพิ่มเข้าไป เพื่อให้ boot แบบ single mode
sh-3.00# passwd root
New UNIX password : <
Retype new UNIX password : <
ถึงขั้นตอนนี้ก็สามารถเปลี่ยน password ได้เช่นกัน
*** Alternatives (by Yoshijo)
Fedora Core 3
ใส่ Fedora Core 3 Disc 1 แล้ว boot เครื่องให้เริ่มจาก CD
ให้พิมพ์ที่ prompt ของ Fedora Installer Wizard ว่า linux-rescue (F5)
ทำตามขั้นตอนต่างๆ ที่กำหนด
sh-3.00# vi /chroot/etc/shadow
จากนั้น ลบ Password ของ root ออก และ ทำการ save ( พิมพ์ :wq ที่ global vi command mode)
จากนั้น กด CTRL+ALT+DEL เพื่อ reboot
เมื่อบูทถึงหน้า Login ให้ login เป็น root โดยไม่ต้องใส่ paasword
[root@localhost]#passwd
New UNIX password : <
Retype new UNIX password : <
ถึงขั้นตอนนี้ก็สามารถเปลี่ยน password ได้เช่นกัน
วิธีแก้ password ใน Slackware (หรือ Distro อื่นๆ ที่ใช้ Boot Loader เป็น LILO)
เมื่อ Restart เครื่อง ก่อนเข้าระบบ ให้กด Alt-X ขณะอยู่ที่ LILO prompt แล้วพิมพ์ว่า linux single เมื่อเข้าไปจะได้สถานะเป็น root ทันที ก็เพียงแต่ใช้คำสั่ง passwd root แล้ว reboot
เพิ่มเติมให้แล้วกัน อิอิ กรณีไม่มีแผ่นบูต
ใน Red Hat Family ในหน้า Grub ที่จะแสดง os ในเครื่องนั้น ให้เลือกไปที่ Linux ... และกดปุ่ม e จะสามารถเข้าไป Edit ให้เลือกบรรทัดไปที่ ส่วนของ linux จากนั้นให้กด e อีกครั้งจะสามารถ edit ข้อมูลบรรทัดนั้น ๆ ได้ ให้ เลื่อนไปสุดบรรทัด และพิมพ์ s
ทำสัก 2 บรรทัด ของ linux อะ จะออกมาเป็น
root (hd0,0) s
kernal /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet s
ตรง s ของทั้งสองบรรทัดเนี้ย เพิ่มมาทีหลัง จากนั้นกดที่ปุ่ม b จะเป็นการ reboot
เมื่อ boot มาใหม่จะเข้าสู่ single mode ซึ่งก็ทำการแก้ไขรหัส ด้วยคำสั่ง
passwd ได้เลย จะใส่ root หรือไม่ก็ได้ เพราะ หากเราพิมพ์คำสั่ง passwd เฉย ๆ ระบบจะรู้เองว่าเราต้องการแก้ไข password ของ root ครับผม
ปล.ข้อนี้เป็นข้อแรกของการสอบ RHCE นะครับ ไม่มีแผ่นบูตให้นะ อิอิ
ยังไงจะไปสอบก็อย่าตกม้าตายในข้อนี้นะ เอามาบอกแว้วอะ
อ๋อเพิ่มเติม เมื่อ reboot ครั้งต่อไปก็จะ boot อย่างปกตินะ ระบบจะตัว s ออกให้เองโดยอัตโนมัติ
วันจันทร์ที่ 4 มกราคม พ.ศ. 2553
ความหมายของเลขประจำตัวประชาชนทั้ง13หลัก
ประเภทที่ 1 ได้แก่ คนที่เกิดและมีสัญชาติไทย ได้แจ้งเกิดภายในกำหนดเวลา (ตั้งแต่ 1 มกราคม 2527)
ประเภทที่ 2 ได้แก่ คนที่เกิดและมีสัญชาติไทย ได้แจ้งเกิดเกินกำหนดเวลา (ตั้งแต่ 1 มกราคม 2527)
ประเภทที่ 3 ได้แก่ คนไทยและคนต่างด้าวที่มีใบสำคัญประจำตัวคนต่างด้าว และมีที่อยู่ในทะเบียนบ้าน ในสมัยเริ่มแรก (1 มกราคม - 31 พฤษภาคม 2527)
ประเภทที่ 4 ได้แก่ คนไทยและคนต่างด้าวที่มีใบสำคัญคนต่างด้าวแต่แจ้งย้ายเข้า โดยยังไม่มีเลขประจำตัวประชาชนในสมัยเริ่มแรก (1 มกราคม - 31 พฤษภาคม 2527)
ประเภทที่ 5 ได้แก่ คนไทยที่ได้รับอนุมัติให้เพิ่มชื่อเข้าในทะเบียนบ้านในกรณีตกสำรวจหรือกรณีอื่น ๆ
ประเภทที่ 6 ได้แก่ ผู้ที่เข้าเมืองโดยไม่ชอบด้วยกฏหมาย และผู้ที่เข้าเมืองโดยชอบด้วยกฏหมาย แต่จะอยู่ในลักษณะชั่วคราว
ประเภทที่ 7 ได้แก่ บุตรของบุคคลประเภทที่ 6 ซึ่งเกิดในประเทศไทย
ประเภทที่ 8 ได้แก่ คนต่างด้าวที่เข้าเมืองโดยถูกต้องตามกฏหมาย คือ ได้รับใบสำคัญประจำตัวคนต่างด้าว คนที่ได้รับการแปลงสัญชาติเป็นสัญชาติไทย และคนที่ได้รับการให้สัญชาติไทย
ประเภทที่ 9 ได้แก่ พระบรมวงศานุวงศ์ ทุกพระองค์ครับ
หลักที่ 2 ถึงหลักที่ 5 หมายถึงรหัสของสำนักทะเบียนที่ท่านมีชื่อในทะเบียนบ้านในขณะให้เลข สำหรับเด็กเกิดใหม่จะหมายถึงถิ่นที่เกิดเลยทีเดียว โดยหลักที่ 2 และ 3 หมายถึงจังหวัด หลักที่ 4 และ 5 หมายถึงอำเภอ หรือเทศบาล
หลักที่ 6 ถึงหลักที่ 10 หมายถึงกลุ่มที่ของบุคคลแต่ละประเภทตามหลักแรก หรือหมายถึงเล่มที่ ของสูติบัตร แล้วแต่กรณี
หลักที่ 11 และ 12 หมายถึงลำดับที่ของบุคคลในแต่ละกลุ่มประเภท หรือหมายถึงใบที่ของสูติบัตรแต่ละเล่ม แล้วแต่กรณี
หลักที่ 13 คือ ตัวเลขตรวจสอบความถูกต้องของเลข 12 หลักแรก
ที่มา : http://www.dopa.go.th/fop/pid13.htm
วันอังคารที่ 29 ธันวาคม พ.ศ. 2552
มาใช้งานอีเมล์ POP3 ของ Yahoo กันเถอะ
- เก็บอีเมล์และไฟล์แนบต่างๆไว้ในเครื่องของเรา
- เปิดอีเมล์อ่านได้แม้ไม่ได้เชื่อมต่ออินเตอร์
- จัดการอีเมล์อย่างมีประสิทธิภาพ
- การส่งอีเมล์เป็นแบบมืออาชีพ
ถ้าท่านผู้อ่านยังไม่มีแอคเคาท์ของ Yahoo ก็ต้องลงทะเบียนกันก่อน โดยลิงค์ไป url ที่นี่ครับ http://mail.yahoo.com หลังจากนั้นก็กด Sign Up
จากนั้นเลือก Yahoo! เว็บไทย แล้วป้อนข้อมูลส่วนตัวของเรา
ถ้าไม่อยากรับอีเมล์โฆษณาของ Yahoo ก็เอาเครื่องหมายถูกตรงหน้า ติดต่อฉันเป็นครั้งคราวเกี่ยวกับข้อเสนอพิเศษ ออกแล้วกด สร้างบัญชีผู้ใช้ของฉัน
หลังจากนั้นก็กลับไปล๊อกอินเข้า Yahoo mail อีกครั้งแล้วกด ตัวเลือก
กด การเข้าถึง POP และการส่งต่อ
ติ๊กที่ การเข้าถึงเว็บ&POP แล้วกด บันทึก
เสร็จเรียบร้อยแล้วก็เปิดโปรแกรม Microsoft Outlook Express โดยกดที่ Start->All Programs->Outlook Express ถ้าเป็นการใช้งาน Outlook Express ครั้งแรกก็จะให้เราเลือกเป็น default mail client จากนั้นกด Yes
ป้อนชื่อของเราแล้วกด Next
ป้อนอีเมล์แอดเดรสแล้วกด Next
ป้อน Incoming mail server: pop.mail.yahoo.co.th และ Outgoing mail server: smtp.mail.yahoo.co.th แล้วกด Next
ป้อนชื่อแอคเคาท์และรหัสผ่านแล้วติ๊ก Remember password จากนั้นกด Next
เรียบร้อยกด Finish
เสร็จแล้วเลือก Tools->Accounts...
เลือก pop.mail.yahoo.co.th กด Properties
ติ๊กเครื่องหมายถูกที่ My server requires authentication จากนั้นกด OK
กด Close
เรียบร้อยกดปุ่ม Send/Recv เพื่อรับอีเมล์จากเซิร์ฟเวอร์ของ Yahoo
จากนั้นอีเมล์ของ Yahoo ก็จะวิ่งเข้ามาที่ Inbox ของ Microsoft Outlook Express ส่วนการใช้งานหลังจากนี้คิดว่าคงจะใช้ได้ไม่ยากแล้วล่ะครับ
