This simple tutorial will walk you through the steps to configure you thumbnails to be bigger than the default size. Alternatively, you could make them smaller as well, if you would like to fit more on a page but still have the thumbnail view. This will only change it for one user as well, so if other people use your machine, it will not affect them. Keep in mind that if the thumbnails are getting made bigger than they should they may distort after a certain size. Let’s get started.
This is the default size of the thumbnail images in windows XP.
We will be modifying the registry to make this change. To open the registry editor, click on Start and select Run (Please note that my start menu says TeamTutorials instead of “start” – Learn how to change that by following http://teamtutorials.com/windows-tutorials/changing-your-start-button-text)
Type in “regedit” (without the quotes) and press enter to launch the Registry Editor.
This is the default view of the registry. Click the expand button (the plus signs) next to the proper keys to navigate to the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
Once you are there, click on Explorer instead of click the expand sign in the left pane and the right pane will fill up with keys.
You editor should now look like the above picture. Look for a key called ThumbnailSize. If one does not exist (like the picture above) we will need to create it. If it does exist you can skip this step.
Right-click on any whitespace located in the right pane, hover over new, and select DWORD Value. This will create a key in the right pane. Name it ThumbnailSize. Make sure you have no spaces in the name.
Once you double-click on the value a box will pop up that looks like the picture above. You can now enter the value you wish to use. You can select either decimal or hexadecimal, doesn’t really matter, except the number limits are different. If you are using decimal, the number can be 32 (smallest) to 256 (largest) which converts to 20 (smallest) and 100 (largest) if you are using hexadecimal. You can now close out of your windows you have open and check your work.
Smallest:
Hex – 20
Decimal – 32
Windows Default:
Hex – 64
Decimal – 100
Largest:
Hex – 100
Decimal – 256
This concludes this tutorial. I hope you were able to follow it with little trouble. Please comment with problems and suggestions for new tutorials. Thank you for reading.
วันพุธที่ 27 ตุลาคม พ.ศ. 2553
วันพฤหัสบดีที่ 21 ตุลาคม พ.ศ. 2553
Alternate Row Color in Crystal Report
Most of the time while developing reports people wonder how to have alternating row colors in the report like below.
Customer Name Address City State Zip
Suparba panda 123 olive rd St Louis MO 54678
John Doe 456 Tree drive Raleigh NC 14676
Jane Doe 768 Hudson rd Atlanta GA 76555
There is a cool trick to it.
Go to the format section of the Details. Click the Color Tab. Then click the button next to the Background Color CheckBox..
In the formula editor of background color, type the following:
if RecordNumber mod 2 = 0 then crSilver else crNoColor
Save and close the editor.
And now when you run the report you will see alternate colors of silver and white in the details section.
Conclusion
Customer Name Address City State Zip
Suparba panda 123 olive rd St Louis MO 54678
John Doe 456 Tree drive Raleigh NC 14676
Jane Doe 768 Hudson rd Atlanta GA 76555
There is a cool trick to it.
Go to the format section of the Details. Click the Color Tab. Then click the button next to the Background Color CheckBox..
In the formula editor of background color, type the following:
if RecordNumber mod 2 = 0 then crSilver else crNoColor
Save and close the editor.
And now when you run the report you will see alternate colors of silver and white in the details section.
Conclusion
วันอังคารที่ 19 ตุลาคม พ.ศ. 2553
SQL Server::Cursor::ทำความรู้จักกับ Cursorsubject
SQL Server::Cursor::ทำความรู้จักกับ Cursorsubject:ทำความรู้จักกับ Cursorcontent:Cursor ใช้เพื่อเข้าถึงกลุ่มผลลัพธ์ ( ResultSet ) และสามารถทำสิ่งต่างๆต่อไปนี้ได้
1) สามารถเข้าถึงตำแหน่ง Record ของกลุ่มผลลัพธ์ได้
2) สามารถดึงข้อมูลจาก Column ของ Record ที่ชี้อยู่ได้
3) สามารถเปลี่ยนแปลงแก้ไขข้อมูลใน Record ที่ชี้อยู่ได้SQL Server::Cursor::ขั้นตอนการสร้าง Cursorsubject:ขั้นตอนการสร้าง Cursorcontent:ขั้นตอนการสร้าง Cursor ดังนี้
1) ประกาศ Cursor
2) เปิด Cursor
3) เข้าถึง Record ข้อมูลด้วย Cursor
4) ปิด Cursor
5) คืนทรัพยากรที่ถูกใช้โดย Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DECLARE CURSORsubject:DECLARE CURSORsyntax:DECLARE cursor_name [ INSENSITIVE ] [ SCROLL ] CURSOR
FOR
[ FOR { READ ONLY | UPDATE [ OR column1 [, columnN ] ] } ]content:ใช้ในการประกาศ Cursor
> โดย INSENSITIVE เป็นการกำหนดให้สร้างเป็นตารางชั่วคราวแยกต่างหากไว้ในฐานข้อมูลระบบ tempdb
ดังนั้นการแก้ไขข้อมูลจากตารางหลัก จะไม่มีผลกับข้อมูลที่เกิดจาก Cursor นี้ และการแก้ไขข้อมูลที่ Cursor
นี้ ไม่สามารถทำได้
> โดย SCROLL เป็นการกำหนดให้สามารถใช้คำสั่ง FIRST, LAST, PRIOR, NEXT, RELATIVE และ ABSOLUTE
เพื่อเข้าถึงแต่ละ Record ของ Cursor ได้ ( ถ้าไม่กำหนดคำสั่งนี้จะใช้ได้เพียง NEXT เท่านั้น )
> โดย สามารถใช้คำสั่ง COMPUTE, COMPUTE BY, FOR BROWSE และ INTO ไม่ได้
> โดย READ ONLY เป็นการกำหนดว่า Cursor นี้สามารถอ่านได้อย่างเดียว
> โดย UPDATE เป็นการกำหนดว่า Cursor นี้สามารถ UPDATE ข้อมูลได้ และ UPDATE คอลัมน์ใดได้บ้าง
ถ้าไม่ระบุ จะหมายถึงสามารถ UPDATE ได้ทุก COLUMNexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DECLARE CURSOR [ แบบที่ 2 ]subject:DECLARE CURSOR [ แบบที่ 2 ]syntax:DECLARE cursor_name CURSOR
[ LOCAL | GLOBAL ]
[ FORWARD_ONLY | SCROLL ]
[ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ]
[ READ_ONLY | SCROLL_LOCKS | OPTIMISTIC ]
[ TYPE_WARNING ]
FOR
[ FOR UPDATE [ OR column1 [, columnN ] ] ]content:ใช้ในการประกาศ Cursor โดยปกติ Cursor จะเป็นแบบ GLOBAL
( สามารถเปลี่ยนได้โดย sp_dboption db_name, "default to local cursor", "TRUE" )
> โดย FORWARD_ONLY จะทำให้ใช้ได้แค่คำสั่ง FETCH NEXT เท่านั้น
> โดย SCROLL จะทำให้สามารถใช้คำสั่ง FIRST, LAST, PRIOR, NEXT, RELATIVE และ ABSOLUTE ได้
> โดย STATIC คือเป็นการกำหนดให้สร้างเป็นตารางชั่วคราวแยกต่างหากไว้ในฐานข้อมูลระบบ tempdb
ดังนั้นการแก้ไขข้อมูลจากตารางหลัก จะไม่มีผลกับข้อมูลที่เกิดจาก Cursor นี้ และการแก้ไขข้อมูลที่ Cursor
นี้ ไม่สามารถทำได้
> โดย KEYSET คือหมายความว่า Cursor นี้จะอาศัย Unique Indexes ในการเข้าถึงข้อมูลจริงที่เก็บไว้ในตารางหลัก
ดังนั้นหากมีการเปลี่ยนแปลงข้อมูลในตารางหลักจะทำให้ข้อมูลจาก Cursor ได้รับผลกระทบตามไปด้วย
( ถ้าหาก Table ไม่มี Unique Indexes แล้วก็จะถูกเปลี่ยนไปเป็น STATIC โดยอัตโนมัติ )
> โดย DYNAMIC เป็นการกำหนดว่าหากมีการเปลี่ยนแปลงข้อมูลที่ตารางหลักแล้ว จะมีผลต่อ Cursor ด้วย
จะทำให้ไม่สามารถใช้คำสั่ง FETCH ABSOLUTE ได้ ( วิธีการทำงานของ Cursor นี้นั้น ทุกๆครั้งที่มีการ FETCH
ข้อมูล Cursor จะถูกสร้างใหม่ ทำให้ข้อมูลมีการ UPDATE อยู่เสมอ แต่จะทำให้ใช้ Resource สูงมากตามลำดับ )
> โดย FAST_FORWARD คือจะเข้าถึง Record แรกโดยอัตโนมัติหลังจากเปิด Cursor และจะปิด Cursor
ดยอัตโนมัติทันทีเมื่อเข้าถึง Record สุดท้าย ( ไม่สามารถใช้ได้พร้อมกับคำสั่ง SCROLL, SCROLL_LOCKS,
OPTIMISTIC, FOR UPDATE ได้ )
(
เงื่อนไขของการใช้ FAST_FORWARD ดังนี้
1) เมื่อมีการ Query ระหว่าง 2 ตามรางแล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น STATIC
2) เมื่อมีการ Query โดย Distributed Query แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น KEYSET
3) เมื่อมีการใช้คีย์เวิร์ด FOR UPDATE แล้ว FAST_FORWARD จะถูกเปลี่ยนแป็น DYNAMIC
4) ถ้า Query มีการอ้างถึง column ที่มีข้อมูลประเภท text, ntext หรือ image แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น DYNAMIC
5) ถ้า Query มีการอ้างถึง column ที่มีข้อมูลประเภท text, ntext หรือ image และมีคีย์เวิร์ด TOP ด้วย แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น DYNAMIC
)
> โดย READ_ONLY เป็นการกำหนดให้ Cursor อ่านได้อย่างเดียว
> โดย SCROLL_LOCKS เป็นการ Lock ข้อมูลในตารางจริง เมื่อมีการอ่านมายัง Cursor ทำให้ไม่สามารถแก้ไขข้อมูลในตารางจริงได้
> โดย OPTIMISTIC เป็นการอ่านและบันทึกลงได้ และไม่มีการ Lock ใดๆ
> โดย TYPE_WARNING กำหนดให้มีการแจ้งเตือน หากมีการเปลี่ยนแปลงประเภทของ Cursor ( ที่เปลี่ยนแปลงโดยอัตโนมัติตามเงื่อนไขต่างๆ )
> โดย FOR UPDATE เป็นการกำหนดว่า Cursor นี้สามารถ UPDATE ข้อมูลได้ และ UPDATE คอลัมน์ใดได้บ้าง
ถ้าไม่ระบุ จะหมายถึงสามารถ UPDATE ได้ทุก COLUMNexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::OPEN cursorsubject:OPEN cursorsyntax:OPEN { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการเปิด Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::FETCH cursorsubject:FETCH cursorsyntax:FETCH
[ [ NEXT | PRIOR | FIRST | LAST | ABSOLUTE n | RELATIVE n ] FROM ]
{ { [ GLOBAL ] cursor_name } | cursor_variable_name }
[ INTO @varname1 [, @varnameN ] ]content:ใช้ในการเข้าถึงข้อมูลของ Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::CLOSE cursorsubject:CLOSE cursorsyntax:CLOSE { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการปิด Cursor
example:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DEALLOCATE cursorsubject:DEALLOCATE cursorsyntax:DEALLOCATE { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการคืนทรัพยากร ในกรณีที่ไม่ได้ใช้ Cursor นั้นแ้ล้วexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::@@CURSOR_ROWSsubject:@@CURSOR_ROWSsyntax:@@CURSOR_ROWS content:ถ้าคืนค่า -n เพื่อบอกว่าพบจำนวน n record และจะมากขึ้นเรื่อยๆ เพราะยังโหลดไม่เสร็จ
ถ้าคืนค่า n เพื่อบอกว่าพบจำนวน n record ( เพราะโหลดเสร็จแล้ว )
ถ้าคืนค่า -1 เพื่อบอกว่าเป็นการเปิดแบบ DYNAMIC
ถ้าคืนค่า 0 เพื่อบอกว่ามีจำนวน 0 recordexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
END
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::@@FETCH_STATUSsubject:@@FETCH_STATUSsyntax:@@FETCH_STATUScontent:ถ้าคืนค่า 0 คือเข้าถึง Record สำเร็จ
ถ้าคืนค่า -1 คือเข้าถึง Record ไม่สามารถกระทำได้ หรือได้ชี้เกิดกลุ่มของผลลัพธ์ไปแล้ว ( EOF )
ถ้าคืนค่า -2 คือการเข้าถึง Record มีความผิดพลาดเกิดขึ้นexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
END
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::ตัวอย่างการ UPDATE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่subject:ตัวอย่างการ UPDATE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่example:UPDATE table_name
SET column_name = value
WHERE CURRENT OF { { [ GLOBAL ] cursor_name } | cursor_variable_name }
UPDATE person
SET sex = 2
WHERE CURRENT OF cur_personSQL Server::Cursor::ตัวอย่างการ DELETE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่subject:ตัวอย่างการ DELETE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่example:DELETE table_name
WHERE CURRENT OF { { [ GLOBAL ] cursor_name } | cursor_variable_name }
DELETE person
WHERE CURRENT OF cur_person
1) สามารถเข้าถึงตำแหน่ง Record ของกลุ่มผลลัพธ์ได้
2) สามารถดึงข้อมูลจาก Column ของ Record ที่ชี้อยู่ได้
3) สามารถเปลี่ยนแปลงแก้ไขข้อมูลใน Record ที่ชี้อยู่ได้SQL Server::Cursor::ขั้นตอนการสร้าง Cursorsubject:ขั้นตอนการสร้าง Cursorcontent:ขั้นตอนการสร้าง Cursor ดังนี้
1) ประกาศ Cursor
2) เปิด Cursor
3) เข้าถึง Record ข้อมูลด้วย Cursor
4) ปิด Cursor
5) คืนทรัพยากรที่ถูกใช้โดย Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DECLARE CURSORsubject:DECLARE CURSORsyntax:DECLARE cursor_name [ INSENSITIVE ] [ SCROLL ] CURSOR
FOR
[ FOR { READ ONLY | UPDATE [ OR column1 [, columnN ] ] } ]content:ใช้ในการประกาศ Cursor
> โดย INSENSITIVE เป็นการกำหนดให้สร้างเป็นตารางชั่วคราวแยกต่างหากไว้ในฐานข้อมูลระบบ tempdb
ดังนั้นการแก้ไขข้อมูลจากตารางหลัก จะไม่มีผลกับข้อมูลที่เกิดจาก Cursor นี้ และการแก้ไขข้อมูลที่ Cursor
นี้ ไม่สามารถทำได้
> โดย SCROLL เป็นการกำหนดให้สามารถใช้คำสั่ง FIRST, LAST, PRIOR, NEXT, RELATIVE และ ABSOLUTE
เพื่อเข้าถึงแต่ละ Record ของ Cursor ได้ ( ถ้าไม่กำหนดคำสั่งนี้จะใช้ได้เพียง NEXT เท่านั้น )
> โดย
> โดย READ ONLY เป็นการกำหนดว่า Cursor นี้สามารถอ่านได้อย่างเดียว
> โดย UPDATE เป็นการกำหนดว่า Cursor นี้สามารถ UPDATE ข้อมูลได้ และ UPDATE คอลัมน์ใดได้บ้าง
ถ้าไม่ระบุ จะหมายถึงสามารถ UPDATE ได้ทุก COLUMNexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DECLARE CURSOR [ แบบที่ 2 ]subject:DECLARE CURSOR [ แบบที่ 2 ]syntax:DECLARE cursor_name CURSOR
[ LOCAL | GLOBAL ]
[ FORWARD_ONLY | SCROLL ]
[ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ]
[ READ_ONLY | SCROLL_LOCKS | OPTIMISTIC ]
[ TYPE_WARNING ]
FOR
[ FOR UPDATE [ OR column1 [, columnN ] ] ]content:ใช้ในการประกาศ Cursor โดยปกติ Cursor จะเป็นแบบ GLOBAL
( สามารถเปลี่ยนได้โดย sp_dboption db_name, "default to local cursor", "TRUE" )
> โดย FORWARD_ONLY จะทำให้ใช้ได้แค่คำสั่ง FETCH NEXT เท่านั้น
> โดย SCROLL จะทำให้สามารถใช้คำสั่ง FIRST, LAST, PRIOR, NEXT, RELATIVE และ ABSOLUTE ได้
> โดย STATIC คือเป็นการกำหนดให้สร้างเป็นตารางชั่วคราวแยกต่างหากไว้ในฐานข้อมูลระบบ tempdb
ดังนั้นการแก้ไขข้อมูลจากตารางหลัก จะไม่มีผลกับข้อมูลที่เกิดจาก Cursor นี้ และการแก้ไขข้อมูลที่ Cursor
นี้ ไม่สามารถทำได้
> โดย KEYSET คือหมายความว่า Cursor นี้จะอาศัย Unique Indexes ในการเข้าถึงข้อมูลจริงที่เก็บไว้ในตารางหลัก
ดังนั้นหากมีการเปลี่ยนแปลงข้อมูลในตารางหลักจะทำให้ข้อมูลจาก Cursor ได้รับผลกระทบตามไปด้วย
( ถ้าหาก Table ไม่มี Unique Indexes แล้วก็จะถูกเปลี่ยนไปเป็น STATIC โดยอัตโนมัติ )
> โดย DYNAMIC เป็นการกำหนดว่าหากมีการเปลี่ยนแปลงข้อมูลที่ตารางหลักแล้ว จะมีผลต่อ Cursor ด้วย
จะทำให้ไม่สามารถใช้คำสั่ง FETCH ABSOLUTE ได้ ( วิธีการทำงานของ Cursor นี้นั้น ทุกๆครั้งที่มีการ FETCH
ข้อมูล Cursor จะถูกสร้างใหม่ ทำให้ข้อมูลมีการ UPDATE อยู่เสมอ แต่จะทำให้ใช้ Resource สูงมากตามลำดับ )
> โดย FAST_FORWARD คือจะเข้าถึง Record แรกโดยอัตโนมัติหลังจากเปิด Cursor และจะปิด Cursor
ดยอัตโนมัติทันทีเมื่อเข้าถึง Record สุดท้าย ( ไม่สามารถใช้ได้พร้อมกับคำสั่ง SCROLL, SCROLL_LOCKS,
OPTIMISTIC, FOR UPDATE ได้ )
(
เงื่อนไขของการใช้ FAST_FORWARD ดังนี้
1) เมื่อมีการ Query ระหว่าง 2 ตามรางแล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น STATIC
2) เมื่อมีการ Query โดย Distributed Query แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น KEYSET
3) เมื่อมีการใช้คีย์เวิร์ด FOR UPDATE แล้ว FAST_FORWARD จะถูกเปลี่ยนแป็น DYNAMIC
4) ถ้า Query มีการอ้างถึง column ที่มีข้อมูลประเภท text, ntext หรือ image แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น DYNAMIC
5) ถ้า Query มีการอ้างถึง column ที่มีข้อมูลประเภท text, ntext หรือ image และมีคีย์เวิร์ด TOP ด้วย แล้ว FAST_FORWARD จะถูกเปลี่ยนเป็น DYNAMIC
)
> โดย READ_ONLY เป็นการกำหนดให้ Cursor อ่านได้อย่างเดียว
> โดย SCROLL_LOCKS เป็นการ Lock ข้อมูลในตารางจริง เมื่อมีการอ่านมายัง Cursor ทำให้ไม่สามารถแก้ไขข้อมูลในตารางจริงได้
> โดย OPTIMISTIC เป็นการอ่านและบันทึกลงได้ และไม่มีการ Lock ใดๆ
> โดย TYPE_WARNING กำหนดให้มีการแจ้งเตือน หากมีการเปลี่ยนแปลงประเภทของ Cursor ( ที่เปลี่ยนแปลงโดยอัตโนมัติตามเงื่อนไขต่างๆ )
> โดย FOR UPDATE เป็นการกำหนดว่า Cursor นี้สามารถ UPDATE ข้อมูลได้ และ UPDATE คอลัมน์ใดได้บ้าง
ถ้าไม่ระบุ จะหมายถึงสามารถ UPDATE ได้ทุก COLUMNexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::OPEN cursorsubject:OPEN cursorsyntax:OPEN { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการเปิด Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::FETCH cursorsubject:FETCH cursorsyntax:FETCH
[ [ NEXT | PRIOR | FIRST | LAST | ABSOLUTE n | RELATIVE n ] FROM ]
{ { [ GLOBAL ] cursor_name } | cursor_variable_name }
[ INTO @varname1 [, @varnameN ] ]content:ใช้ในการเข้าถึงข้อมูลของ Cursorexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::CLOSE cursorsubject:CLOSE cursorsyntax:CLOSE { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการปิด Cursor
example:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::DEALLOCATE cursorsubject:DEALLOCATE cursorsyntax:DEALLOCATE { { [ GLOBAL ] cursor_name } | cursor_variable_name }content:ใช้ในการคืนทรัพยากร ในกรณีที่ไม่ได้ใช้ Cursor นั้นแ้ล้วexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::@@CURSOR_ROWSsubject:@@CURSOR_ROWSsyntax:@@CURSOR_ROWS content:ถ้าคืนค่า -n เพื่อบอกว่าพบจำนวน n record และจะมากขึ้นเรื่อยๆ เพราะยังโหลดไม่เสร็จ
ถ้าคืนค่า n เพื่อบอกว่าพบจำนวน n record ( เพราะโหลดเสร็จแล้ว )
ถ้าคืนค่า -1 เพื่อบอกว่าเป็นการเปิดแบบ DYNAMIC
ถ้าคืนค่า 0 เพื่อบอกว่ามีจำนวน 0 recordexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
END
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::@@FETCH_STATUSsubject:@@FETCH_STATUSsyntax:@@FETCH_STATUScontent:ถ้าคืนค่า 0 คือเข้าถึง Record สำเร็จ
ถ้าคืนค่า -1 คือเข้าถึง Record ไม่สามารถกระทำได้ หรือได้ชี้เกิดกลุ่มของผลลัพธ์ไปแล้ว ( EOF )
ถ้าคืนค่า -2 คือการเข้าถึง Record มีความผิดพลาดเกิดขึ้นexample:DECLARE @person_id int
DECLARE @person_firstname varchar(200)
DECLARE @person_lastname varchar(200)
DECLARE @person_sex int
DECLARE cur_person CURSOR FOR SELECT id, firstname, lastname, sex FROM person
OPEN cur_person
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'ID : ' + @person_id
PRINT 'NAME : ' + @person_firstname + ' ' + @person_lastname
PRINT 'SEX : ' + @person_sex
FETCH NEXT FROM cur_person INTO @person_id, @person_firstname, @person_lastname, @person_sex
END
CLOSE cur_person
DEALLOCATE cur_personSQL Server::Cursor::ตัวอย่างการ UPDATE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่subject:ตัวอย่างการ UPDATE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่example:UPDATE table_name
SET column_name = value
WHERE CURRENT OF { { [ GLOBAL ] cursor_name } | cursor_variable_name }
UPDATE person
SET sex = 2
WHERE CURRENT OF cur_personSQL Server::Cursor::ตัวอย่างการ DELETE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่subject:ตัวอย่างการ DELETE ข้อมูล ณ ตำแหน่งที่ Cursor ชี้อยู่example:DELETE table_name
WHERE CURRENT OF { { [ GLOBAL ] cursor_name } | cursor_variable_name }
DELETE person
WHERE CURRENT OF cur_person
วันศุกร์ที่ 8 ตุลาคม พ.ศ. 2553
Desktop background/wallpaper unlocked
Desktop background/wallpaper locked using regedit how do i unlock it?
well i have a friend who got to know a trick from his bro who the head of IT in a firm n he locked my laptop`s wallpaper
how do i unlock it ???????????
i have tried
"HKLM\SOFTWARE\Microsoft\Windows\
CurrentVersion\policies\ActiveDesktop"
&
"HKCU\Software\Microsoft\Windows\
CurrentVersion\Policies\ActiveDesktop"
In those entries look for: "NoChangingWallpaper".
If you see that make sure that the dword value is set to 0 (zero).
HKLM does not have ActiveDesktop folder in the policy folde
GO TO START
RUN
Type gpedit.msc
CLICK OK
go to user configuration (left window)
Administrative templates
Desktop
Active Desktop (single click)
on rght hand side
DOUBLE CLICK Active Desktop wallpaper
under settings
click disabled or not configured (whichever works one by one)
press ok
Restart computer,
Add: go to start , run.
Type desk.cpl
well i have a friend who got to know a trick from his bro who the head of IT in a firm n he locked my laptop`s wallpaper
how do i unlock it ???????????
i have tried
"HKLM\SOFTWARE\Microsoft\Windows\
CurrentVersion\policies\ActiveDesktop"
&
"HKCU\Software\Microsoft\Windows\
CurrentVersion\Policies\ActiveDesktop"
In those entries look for: "NoChangingWallpaper".
If you see that make sure that the dword value is set to 0 (zero).
HKLM does not have ActiveDesktop folder in the policy folde
GO TO START
RUN
Type gpedit.msc
CLICK OK
go to user configuration (left window)
Administrative templates
Desktop
Active Desktop (single click)
on rght hand side
DOUBLE CLICK Active Desktop wallpaper
under settings
click disabled or not configured (whichever works one by one)
press ok
Restart computer,
Add: go to start , run.
Type desk.cpl
วันพุธที่ 29 กันยายน พ.ศ. 2553
แก้ไขให้ Mouse wheel ใช้งานได้ใน Visual Basic 6.0
Method 1
loadTOCNode(3, 'workaround');Download the VB6 Mouse Wheel.exe file that includes the add-in DLL and the code that is used to create the add-in DLL.1. Download the VB6 Mouse Wheel.exe file. The following file is available for download from the Microsoft Download Center:
Download the VB6MouseWheel.EXE package now. (http://download.microsoft.com/download/e/f/b/efb39198-7c59-4ace-a5c4-8f0f88e00d34/vb6mousewheel.exe)
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 (http://support.microsoft.com/kb/119591/) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
2. Click Start, click Run, type regsvr32\VB6IDEMouseWheelAddin.dll, and then click OK.
3. Start Visual Basic 6.0.
4. Click Add-Ins, and then click Add-in Manager.
5. In the Add-in Manager list, click MouseWheel Fix.
6. Click to select the Loaded/Unloaded check box, and then click to select the Load on Startup check box.
7. Click OK.
loadTOCNode(3, 'workaround');Download the VB6 Mouse Wheel.exe file that includes the add-in DLL and the code that is used to create the add-in DLL.1. Download the VB6 Mouse Wheel.exe file. The following file is available for download from the Microsoft Download Center:
Download the VB6MouseWheel.EXE package now. (http://download.microsoft.com/download/e/f/b/efb39198-7c59-4ace-a5c4-8f0f88e00d34/vb6mousewheel.exe)
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 (http://support.microsoft.com/kb/119591/) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
2. Click Start, click Run, type regsvr32
3. Start Visual Basic 6.0.
4. Click Add-Ins, and then click Add-in Manager.
5. In the Add-in Manager list, click MouseWheel Fix.
6. Click to select the Loaded/Unloaded check box, and then click to select the Load on Startup check box.
7. Click OK.
วันจันทร์ที่ 23 สิงหาคม พ.ศ. 2553
Tip : ป้องกันโปรแกรมสุดหวง
Tip : ป้องกันโปรแกรมสุดหวง
โจทย์
คุณ ๆ ที่เขียนโปรแกรมด้วย Access บางคนก็หวงโปรแกรม ไม่อยากจะให้ใคร ๆ ดู Object ต่าง ๆ ว่ามีอะไรบ้าง เป็นอย่างไร เพราะ Access สามารถหยุดการ Start Up หรือ หยุดแมโคร Autoexec ได้ด้วยการกดปุ่ม Shift ตอนเปิดโปรแกรม
ก็เลยเป็นที่มาของเรื่องที่จะคุยกันวันนี้ว่า เราจะ Disable ปุ่ม Shift ไม่ให้สามารถใช้งานได้ตอนเปิดโปรแกรม และผมก็ไม่ได้เขียนโค๊ตเองหรอกครับ เอามาจาก Help ของ Microsoft Visaul Basic Help ใน Microsoft Access2003 โดยใช้คำว่า AllowBypassKey เข้าไปค้นหา แล้วก็เอามาคุยให้ฟังครับ
แก้โจทย์
ผลการค้นหาด้วยคำ AllowBypassKey ได้คำอธิบายและโค๊ต ดังนี้ คุณไม่ต้องสนใจอ่านมันก็ได้ครับ
AllowBypassKey Property
You can use the AllowBypassKey property to specify whether or not the SHIFT key is enabled for bypassing the startup properties and the AutoExec macro. For example, you can set the AllowBypassKey property to False to prevent a user from bypassing the startup properties and the AutoExec macro.
Setting
The AllowBypassKey property uses the following settings.
Setting Description
True Enable the SHIFT key to allow the user to bypass the startup properties and the AutoExec macro.
False Disable the SHIFT key to prevent the user from bypassing the startup properties and the AutoExec macro.
You can set this property by using a macro or Visual Basic.
To set the AllowBypassKey property by using a macro or Visual Basic, you must create the property in the following ways:
In a Microsoft Access database (.mdb), you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.
In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
Remarks
You should make sure the AllowBypassKey property is set to True when debugging an application.
This property's setting doesn't take effect until the next time the application database opens.
Example
The following example shows a procedure named SetBypassProperty that passes the name of the property to be set, its data type, and its desired setting. The general purpose procedure ChangeProperty attempts to set the AllowBypassKey property and, if the property isn't found, uses the CreateProperty method to append it to the Properties collection. This is necessary because this property doesn't appear in the Properties collection until its been added.
Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Change_Bye:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
เริ่มทำกันเลย
1. สมมติว่า คุณสร้างโปรแกรมด้วย Access เสร็จเรียบร้อย พร้อมจะเผยแพร่ต่อไป ขอแนะนำว่า คุณควรจะสำเนาต้นฉบับเอาไว้ก่อน เอาไว้คนละแห่งก็ได้
2. จากนั้นเอาไฟล์สำเนาที่ต้องการทำการจัดการต่อไป (หมายความว่า ไฟล์นี้มีฟอร์มทำหน้าที่ฟอร์มแรก หรือ Startup Form แล้วนะครับ)
3. เปิดไฟล์ แล้วไปที่ Module สร้าง Module ขึ้นใหม่ 1 ตัว
4. Copy โค๊ตทั้งหมด ตั้งแต่
Sub SetBypassProperty()
...
End Function
ไปวางใน Module ตามข้อ 3
5. จากนั้นคลิกเอา Cursor ไว้ที่หน้าแถวแรก
6. คลิกแถบเมนู Run > Run Sub/Userform หรือ กด F5 ก็ได้ ข้อนี้เป็นการ Add the CreateProperty method เพิ่มเข้าไปใน the Properties collection
7. ทดลองเปิดใช้งานได้เลย จะปรากฎว่าคุณกด Shift ไว้ก็ไม่มีผลอะไร
ท้ายบทความนี้ มีไฟล์ตัวอย่างให้ดาวน์โหลดไปดูครับ ถ้านำวิธีการดังกล่าวไปใช้แล้ว กลับมาคุยให้ฟังบ้างนะครับ
โจทย์
คุณ ๆ ที่เขียนโปรแกรมด้วย Access บางคนก็หวงโปรแกรม ไม่อยากจะให้ใคร ๆ ดู Object ต่าง ๆ ว่ามีอะไรบ้าง เป็นอย่างไร เพราะ Access สามารถหยุดการ Start Up หรือ หยุดแมโคร Autoexec ได้ด้วยการกดปุ่ม Shift ตอนเปิดโปรแกรม
ก็เลยเป็นที่มาของเรื่องที่จะคุยกันวันนี้ว่า เราจะ Disable ปุ่ม Shift ไม่ให้สามารถใช้งานได้ตอนเปิดโปรแกรม และผมก็ไม่ได้เขียนโค๊ตเองหรอกครับ เอามาจาก Help ของ Microsoft Visaul Basic Help ใน Microsoft Access2003 โดยใช้คำว่า AllowBypassKey เข้าไปค้นหา แล้วก็เอามาคุยให้ฟังครับ
แก้โจทย์
ผลการค้นหาด้วยคำ AllowBypassKey ได้คำอธิบายและโค๊ต ดังนี้ คุณไม่ต้องสนใจอ่านมันก็ได้ครับ
AllowBypassKey Property
You can use the AllowBypassKey property to specify whether or not the SHIFT key is enabled for bypassing the startup properties and the AutoExec macro. For example, you can set the AllowBypassKey property to False to prevent a user from bypassing the startup properties and the AutoExec macro.
Setting
The AllowBypassKey property uses the following settings.
Setting Description
True Enable the SHIFT key to allow the user to bypass the startup properties and the AutoExec macro.
False Disable the SHIFT key to prevent the user from bypassing the startup properties and the AutoExec macro.
You can set this property by using a macro or Visual Basic.
To set the AllowBypassKey property by using a macro or Visual Basic, you must create the property in the following ways:
In a Microsoft Access database (.mdb), you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.
In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
Remarks
You should make sure the AllowBypassKey property is set to True when debugging an application.
This property's setting doesn't take effect until the next time the application database opens.
Example
The following example shows a procedure named SetBypassProperty that passes the name of the property to be set, its data type, and its desired setting. The general purpose procedure ChangeProperty attempts to set the AllowBypassKey property and, if the property isn't found, uses the CreateProperty method to append it to the Properties collection. This is necessary because this property doesn't appear in the Properties collection until its been added.
Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Change_Bye:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
เริ่มทำกันเลย
1. สมมติว่า คุณสร้างโปรแกรมด้วย Access เสร็จเรียบร้อย พร้อมจะเผยแพร่ต่อไป ขอแนะนำว่า คุณควรจะสำเนาต้นฉบับเอาไว้ก่อน เอาไว้คนละแห่งก็ได้
2. จากนั้นเอาไฟล์สำเนาที่ต้องการทำการจัดการต่อไป (หมายความว่า ไฟล์นี้มีฟอร์มทำหน้าที่ฟอร์มแรก หรือ Startup Form แล้วนะครับ)
3. เปิดไฟล์ แล้วไปที่ Module สร้าง Module ขึ้นใหม่ 1 ตัว
4. Copy โค๊ตทั้งหมด ตั้งแต่
Sub SetBypassProperty()
...
End Function
ไปวางใน Module ตามข้อ 3
5. จากนั้นคลิกเอา Cursor ไว้ที่หน้าแถวแรก
6. คลิกแถบเมนู Run > Run Sub/Userform หรือ กด F5 ก็ได้ ข้อนี้เป็นการ Add the CreateProperty method เพิ่มเข้าไปใน the Properties collection
7. ทดลองเปิดใช้งานได้เลย จะปรากฎว่าคุณกด Shift ไว้ก็ไม่มีผลอะไร
ท้ายบทความนี้ มีไฟล์ตัวอย่างให้ดาวน์โหลดไปดูครับ ถ้านำวิธีการดังกล่าวไปใช้แล้ว กลับมาคุยให้ฟังบ้างนะครับ
windowsXP access denied
เมื่อเราพยายามจะเชื่อมต่อเข้าไปในคอมพิวเตอร์บนเครือข่ายที่รัน Windows XP ทั้งๆ ที่ Username และ Password ก็ถูกต้อง แต่กลับได้รับการแจ้งข้อผิดพลาด โดยปฏิเสธไม่ให้เข้าถึงได้ (Access Denied)
สำหรับวิธีแก้ปัญหานี้ เราคงต้องเข้าไปแก้ไขรีจิสทรีอีกแล้วครับทั่น.น.น ซึ่งขั้นตอนการแก้ไขมีดังนี้
เปิดไดอะล็อกบ็อกซ์ Run (คลิ้กปุ่ม Start เลือกคำสั่ง Run หรือกดปุ่ม Windows+R ) จากนั้นพิมพ์คำสั่ง regedit เข้าไปในช่อง Open: แล้วคลิ้กปุ่ม OK
ในกรอบซ้ายมือของหน้าต่างโปรแกรม Registry Editor ให้คลิ้กเข้าไปที่HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa
สังเกตที่กรอบด้านขวา ดับเบิลคลิ้กบนคีย์ restrictanonymous แก้ค่าให้เป็น 0
ไม่ต้องเปลี่ยนค่าของ restrictanonymoussam (ระวังคลิ้กผิดด้วยนะครับ)
รีบูตเครื่อง แล้วลองเชื่อมต่อเข้าไปใหม่
เพื่อนคนไหนที่พบปัญหาทำนองนี้ ก็ลองใช้วิธีที่นายเกาเหลาแนะนำดูนะครับ
สำหรับวิธีแก้ปัญหานี้ เราคงต้องเข้าไปแก้ไขรีจิสทรีอีกแล้วครับทั่น.น.น ซึ่งขั้นตอนการแก้ไขมีดังนี้
เปิดไดอะล็อกบ็อกซ์ Run (คลิ้กปุ่ม Start เลือกคำสั่ง Run หรือกดปุ่ม Windows+R ) จากนั้นพิมพ์คำสั่ง regedit เข้าไปในช่อง Open: แล้วคลิ้กปุ่ม OK
ในกรอบซ้ายมือของหน้าต่างโปรแกรม Registry Editor ให้คลิ้กเข้าไปที่HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa
สังเกตที่กรอบด้านขวา ดับเบิลคลิ้กบนคีย์ restrictanonymous แก้ค่าให้เป็น 0
ไม่ต้องเปลี่ยนค่าของ restrictanonymoussam (ระวังคลิ้กผิดด้วยนะครับ)
รีบูตเครื่อง แล้วลองเชื่อมต่อเข้าไปใหม่
เพื่อนคนไหนที่พบปัญหาทำนองนี้ ก็ลองใช้วิธีที่นายเกาเหลาแนะนำดูนะครับ
windowsXP access denied
เมื่อเราพยายามจะเชื่อมต่อเข้าไปในคอมพิวเตอร์บนเครือข่ายที่รัน Windows XP ทั้งๆ ที่ Username และ Password ก็ถูกต้อง แต่กลับได้รับการแจ้งข้อผิดพลาด โดยปฏิเสธไม่ให้เข้าถึงได้ (Access Denied)
สำหรับวิธีแก้ปัญหานี้ เราคงต้องเข้าไปแก้ไขรีจิสทรีอีกแล้วครับทั่น.น.น ซึ่งขั้นตอนการแก้ไขมีดังนี้
เปิดไดอะล็อกบ็อกซ์ Run (คลิ้กปุ่ม Start เลือกคำสั่ง Run หรือกดปุ่ม Windows+R ) จากนั้นพิมพ์คำสั่ง regedit เข้าไปในช่อง Open: แล้วคลิ้กปุ่ม OK
ในกรอบซ้ายมือของหน้าต่างโปรแกรม Registry Editor ให้คลิ้กเข้าไปที่HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa
สังเกตที่กรอบด้านขวา ดับเบิลคลิ้กบนคีย์ restrictanonymous แก้ค่าให้เป็น 0
ไม่ต้องเปลี่ยนค่าของ restrictanonymoussam (ระวังคลิ้กผิดด้วยนะครับ)
รีบูตเครื่อง แล้วลองเชื่อมต่อเข้าไปใหม่
เพื่อนคนไหนที่พบปัญหาทำนองนี้ ก็ลองใช้วิธีที่นายเกาเหลาแนะนำดูนะครับ
สำหรับวิธีแก้ปัญหานี้ เราคงต้องเข้าไปแก้ไขรีจิสทรีอีกแล้วครับทั่น.น.น ซึ่งขั้นตอนการแก้ไขมีดังนี้
เปิดไดอะล็อกบ็อกซ์ Run (คลิ้กปุ่ม Start เลือกคำสั่ง Run หรือกดปุ่ม Windows+R ) จากนั้นพิมพ์คำสั่ง regedit เข้าไปในช่อง Open: แล้วคลิ้กปุ่ม OK
ในกรอบซ้ายมือของหน้าต่างโปรแกรม Registry Editor ให้คลิ้กเข้าไปที่HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa
สังเกตที่กรอบด้านขวา ดับเบิลคลิ้กบนคีย์ restrictanonymous แก้ค่าให้เป็น 0
ไม่ต้องเปลี่ยนค่าของ restrictanonymoussam (ระวังคลิ้กผิดด้วยนะครับ)
รีบูตเครื่อง แล้วลองเชื่อมต่อเข้าไปใหม่
เพื่อนคนไหนที่พบปัญหาทำนองนี้ ก็ลองใช้วิธีที่นายเกาเหลาแนะนำดูนะครับ
วันพุธที่ 18 สิงหาคม พ.ศ. 2553
Automatically log in a user on startup?
1. Create a script file using following commands and configure it as a shutdown script using policy.
@echo off
Rem Following commands will set registry values required for Aumatic Login
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v AutoAdminLogon /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultUserName /d /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultPassword /d /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultDomainName /d TEST.LOCAL /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_DWORD /v ForceAutoLogon /d 1 /f
Rem Following commands will delete Logon Banner related Values.
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v LegalNoticeCaption /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v LegalNoticeText /f
This will enable autologon feature on your server. But will be applicable at next reboot. I tried using it at the startup but it requires one more restart. There is one more reason for using it at shutdown which will be explained in next step. Additionally I converted this bat file into exe using some utility (there are many utilities available on internet ,but make sure you use the reliable and recommended one) so that it can not be viewed/editted using notepad (text editor ) as there is a password mentioned in it.
Now configure exe thus created as a shutdown script. This will configure registry settings required to enable autoLogon feature.
2. Create a script using following commands and configure it as a startup script. This time no bat to exe conversion is required.
@echo off
Rem Following commands will delete registry values required for Aumatic Login
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v AutoAdminLogon /f reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultUserName /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultPassword /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultDomainName /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v ForceAutoLogon /f
REM This will not show logged in user information while machine is locked..
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v dontdisplaylockeduserid /t REG_DWORD /d 3 /f
Note:- As I said earlier, reason behind using this script at startup is to destroy settings defined in shutdown script once the purpose is over. Settings defined in step 1 will be read at next reboot and will be applicable as 'Startup Script' execution will be done after reading registry values. This will ensure that password is not available in registry and still AutoLogon is enabled.
Refer http://support.microsoft.com/kb/324737 for more details about automatic logon.
Rerer http://support.microsoft.com/default.aspx/kb/837022?p=1 for more details about HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System/dontdisplaylockeduserid
3. Create a logon script for user specified in AutoLogon settings with following commands.
@echo off...
REM ...........following command will Lock the workstation..Use same syntax..........
%windir%\system32\rundll32.exe user32.dll,LockWorkStation
Rem .............following command will launch the application.....
The first command will lock the machine immediately after user logs in and second command will launch the application while user is logged in..
I tried to auto logon and launch some built in windows applications like notepad, calc and it worked. Depeding upon how the application is designed you may need to specify more than one command..
This is how it works..
1. Machine configures AutoLogon during shutdown.
2. Machine reads AutoLOgon settings at next reboot.
3. Deletes AutoLogon values from registry.
4. Logs in using settings read at step 2
5. User login script gets executed ...Locks the machine and launches the application.
@echo off
Rem Following commands will set registry values required for Aumatic Login
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v AutoAdminLogon /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultUserName /d
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultPassword /d
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_SZ /v DefaultDomainName /d TEST.LOCAL /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /t REG_DWORD /v ForceAutoLogon /d 1 /f
Rem Following commands will delete Logon Banner related Values.
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v LegalNoticeCaption /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v LegalNoticeText /f
This will enable autologon feature on your server. But will be applicable at next reboot. I tried using it at the startup but it requires one more restart. There is one more reason for using it at shutdown which will be explained in next step. Additionally I converted this bat file into exe using some utility (there are many utilities available on internet ,but make sure you use the reliable and recommended one) so that it can not be viewed/editted using notepad (text editor ) as there is a password mentioned in it.
Now configure exe thus created as a shutdown script. This will configure registry settings required to enable autoLogon feature.
2. Create a script using following commands and configure it as a startup script. This time no bat to exe conversion is required.
@echo off
Rem Following commands will delete registry values required for Aumatic Login
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v AutoAdminLogon /f reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultUserName /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultPassword /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v DefaultDomainName /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\winlogon" /v ForceAutoLogon /f
REM This will not show logged in user information while machine is locked..
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v dontdisplaylockeduserid /t REG_DWORD /d 3 /f
Note:- As I said earlier, reason behind using this script at startup is to destroy settings defined in shutdown script once the purpose is over. Settings defined in step 1 will be read at next reboot and will be applicable as 'Startup Script' execution will be done after reading registry values. This will ensure that password is not available in registry and still AutoLogon is enabled.
Refer http://support.microsoft.com/kb/324737 for more details about automatic logon.
Rerer http://support.microsoft.com/default.aspx/kb/837022?p=1 for more details about HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System/dontdisplaylockeduserid
3. Create a logon script for user specified in AutoLogon settings with following commands.
@echo off...
REM ...........following command will Lock the workstation..Use same syntax..........
%windir%\system32\rundll32.exe user32.dll,LockWorkStation
Rem .............following command will launch the application.....
The first command will lock the machine immediately after user logs in and second command will launch the application while user is logged in..
I tried to auto logon and launch some built in windows applications like notepad, calc and it worked. Depeding upon how the application is designed you may need to specify more than one command..
This is how it works..
1. Machine configures AutoLogon during shutdown.
2. Machine reads AutoLOgon settings at next reboot.
3. Deletes AutoLogon values from registry.
4. Logs in using settings read at step 2
5. User login script gets executed ...Locks the machine and launches the application.
Use Registry Editor to turn on automatic logon
Use Registry Editor to turn on automatic logon
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
To use Registry Editor (Regedt32.exe) to turn on automatic logon, follow these steps:
Click Start, and then click Run.
In the Open box, type Regedt32.exe, and then press ENTER.
Locate the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK.NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
On the Edit menu, click New, and then point to String Value.
Type DefaultPassword, and then press ENTER.
Double-click DefaultPassword.
In the Edit String dialog, type your password and then click OK.
NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press ENTER.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
Quit Registry Editor.
Click Start, click Shutdown, and then type a reason in the Comment text box.
Click OK to turn off your computer.
Restart your computer. You can now log on automatically.
Notes To bypass the AutoAdminLogon process and to log on as a different user, hold down the SHIFT key after you log off or after Windows restarts.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
To use Registry Editor (Regedt32.exe) to turn on automatic logon, follow these steps:
Click Start, and then click Run.
In the Open box, type Regedt32.exe, and then press ENTER.
Locate the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK.NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
On the Edit menu, click New, and then point to String Value.
Type DefaultPassword, and then press ENTER.
Double-click DefaultPassword.
In the Edit String dialog, type your password and then click OK.
NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press ENTER.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
Quit Registry Editor.
Click Start, click Shutdown, and then type a reason in the Comment text box.
Click OK to turn off your computer.
Restart your computer. You can now log on automatically.
Notes To bypass the AutoAdminLogon process and to log on as a different user, hold down the SHIFT key after you log off or after Windows restarts.
วันอังคารที่ 17 สิงหาคม พ.ศ. 2553
ปรับคอมให้เร็ว
1. ปิด animation ของ windows
a. เปิด My Computer
b. คลิกขวา (บนพื้นที่สีขาว) แล้วเลือก Properties
c. ไปที่ Advance > Settings (อันแรก)
d. ใน Tab Visual Effects ให้เลือก Adjust for the best performance
e. เลื่อนลงไปด้านล่างและหาคำว่า:
i. Use Common tasks in folders
ii. Use drop shadows for icon labels on the desktop
iii. Use visual styles on Windows and buttons
f. ให้ติ้กกล้องสามกล่องนี้ถ้าต้องการ แนะนำให้ติ้ก กล่องแรกกับสองก็พอ แต่ถ้าอยากให้สวยๆหน่อยก็เอาอันที่สามด้วย
g. OK > OK
2. ปิด Background Services
a. ไปที่ Start > Run… พิมพ์ msconfig
b. เลือก tab Services
c. ให้เอาเครื่องหมายติ้กออกจากตัวเลือกต่อไปนี้ถ้ามี
i. Background Intelligence Transfer
ii. Remote Desktop Help Session Manager
iii. Remote Access Connection Manager
iv. Task scheduler
v. Network Location Awareness
vi. Netmeeting Remote Desktop Sharing
vii. Net Logon
viii. Indexing Services
d. OK > Exit Without Restart
3. Scan หา Virus, Spyware ฯลฯ
a. คงไม่ต้องอธิบายมากมาย
i. สำหรับ Virus ก็ใช้ anti-virus
ii. และให้ใช้ Spybot Search and Destroy ลองหาจาก google ได้
iii. ก่อนเริ่ม scan ทุกครั้งควรอัพเดทก่อน AntiVirus? ควรอัพเดททุกวันยิ่งดี
4. ปิด’การค้นหา’
a. ไปที่ My Computer
b. Tools > Folder Options > View
c. เอาติ้กออกจาก Automatically Search for network folders and printer
d. OK
5. ปิด Error Reporting
a. ไปที่ My Computer
b. คลิกขวาเลือก properties
c. Advance > Error Reporting
d. เลือก Disable error reporting
e. OK > OK
6. ตั้งค่าการใช้ Memory
a. ไปที่ My Computer
b. คลิกขวาเลือก Properties
c. Advance > Settings (อันแรก) > Advanced
d. ในช่องทั้งสองอัน Processor Scheduling, Memory usage ให้เลือก Programs
e. กด Change
f. ให้ใส่เลขที่มัน recommended (อยู่ด้านล่าง) ในช่อง Initial Size (MB)
g. ในช่อง Maximum Size (MB) ให้คูณ 2 กับตัวเลขด้านบน เช่น
i. Initial Size (MB) 1500
ii. Maximum Size (MB) 3000
h. OK > OK > OK Restart ก็ได้ถ้าต้องการ
7. อื่นๆ
a. บน desktop ไม่ควรมี icon มากกว่า 20-30 อัน ถ้ามี shortcut เยอะให้เอาใส่ใน folder
b. หลังจากเล่นเกมเสร็จให้คลิกขวาบน desktop แล้วเลือก refresh
c. ใช้งานโปรแกรม Disk defrag บ่อยๆสัปดาห์ละครั้งสองครั้ง ใช้ของ Auslogic ก็ได้เป็น freeware
a. เปิด My Computer
b. คลิกขวา (บนพื้นที่สีขาว) แล้วเลือก Properties
c. ไปที่ Advance > Settings (อันแรก)
d. ใน Tab Visual Effects ให้เลือก Adjust for the best performance
e. เลื่อนลงไปด้านล่างและหาคำว่า:
i. Use Common tasks in folders
ii. Use drop shadows for icon labels on the desktop
iii. Use visual styles on Windows and buttons
f. ให้ติ้กกล้องสามกล่องนี้ถ้าต้องการ แนะนำให้ติ้ก กล่องแรกกับสองก็พอ แต่ถ้าอยากให้สวยๆหน่อยก็เอาอันที่สามด้วย
g. OK > OK
2. ปิด Background Services
a. ไปที่ Start > Run… พิมพ์ msconfig
b. เลือก tab Services
c. ให้เอาเครื่องหมายติ้กออกจากตัวเลือกต่อไปนี้ถ้ามี
i. Background Intelligence Transfer
ii. Remote Desktop Help Session Manager
iii. Remote Access Connection Manager
iv. Task scheduler
v. Network Location Awareness
vi. Netmeeting Remote Desktop Sharing
vii. Net Logon
viii. Indexing Services
d. OK > Exit Without Restart
3. Scan หา Virus, Spyware ฯลฯ
a. คงไม่ต้องอธิบายมากมาย
i. สำหรับ Virus ก็ใช้ anti-virus
ii. และให้ใช้ Spybot Search and Destroy ลองหาจาก google ได้
iii. ก่อนเริ่ม scan ทุกครั้งควรอัพเดทก่อน AntiVirus? ควรอัพเดททุกวันยิ่งดี
4. ปิด’การค้นหา’
a. ไปที่ My Computer
b. Tools > Folder Options > View
c. เอาติ้กออกจาก Automatically Search for network folders and printer
d. OK
5. ปิด Error Reporting
a. ไปที่ My Computer
b. คลิกขวาเลือก properties
c. Advance > Error Reporting
d. เลือก Disable error reporting
e. OK > OK
6. ตั้งค่าการใช้ Memory
a. ไปที่ My Computer
b. คลิกขวาเลือก Properties
c. Advance > Settings (อันแรก) > Advanced
d. ในช่องทั้งสองอัน Processor Scheduling, Memory usage ให้เลือก Programs
e. กด Change
f. ให้ใส่เลขที่มัน recommended (อยู่ด้านล่าง) ในช่อง Initial Size (MB)
g. ในช่อง Maximum Size (MB) ให้คูณ 2 กับตัวเลขด้านบน เช่น
i. Initial Size (MB) 1500
ii. Maximum Size (MB) 3000
h. OK > OK > OK Restart ก็ได้ถ้าต้องการ
7. อื่นๆ
a. บน desktop ไม่ควรมี icon มากกว่า 20-30 อัน ถ้ามี shortcut เยอะให้เอาใส่ใน folder
b. หลังจากเล่นเกมเสร็จให้คลิกขวาบน desktop แล้วเลือก refresh
c. ใช้งานโปรแกรม Disk defrag บ่อยๆสัปดาห์ละครั้งสองครั้ง ใช้ของ Auslogic ก็ได้เป็น freeware
รวบรวมคำสั่ง Run ทั้งหมด
เรียกโปรแกรม Accessibility Options —> access.cpl
เรียกโปรแกรม Add Hardware —> hdwwiz.cpl
เรียกโปรแกรม Add/Remove Programs —> appwiz.cpl
เรียกโปรแกรม Administrative Tools control —> admintools
ตั้งค่า Automatic Updates —> wuaucpl.cpl
เรียกโปรแกรม Bluetooth Transfer Wizard —> fsquirt
เรียกโปรแกรม เครื่องคิดเลข (Calculator) —> calc
เรียกโปรแกรม Certificate Manager —> certmgr.msc
เรียกโปรแกรม Character Map —> charmap
เรียกโปรแกรม ตรวจสอบดิสก์ (Check Disk Utility) —> chkdsk
เรียกดูคลิปบอร์ด (Clipboard Viewer) —> clipbrd
เรียกหน้าต่างดอส (Command Prompt) —> cmd
เรียกโปรแกรม Component Services —> dcomcnfg
เรียกโปรแกรม Computer Management —> compmgmt.msc
เรียกดู/ตั้ง เวลาและวันที่ —> timedate.cpl
เรียกหน้าต่าง Device Manager —> devmgmt.msc
เรียกดูข้อมูล Direct X (Direct X Troubleshooter) —> dxdiag
เรียกโปรแกรม Disk Cleanup Utility —> cleanmgr
เรียกโปรแกรม Disk Defragment —> dfrg.msc
เรียกโปรแกรม Disk Management —> diskmgmt.msc
เรียกโปรแกรม Disk Partition Manager —> diskpart
เรียกหน้าต่าง Display Properties control desktop —> desk.cpl
เรียกหน้าต่าง Display Properties เพื่อปรับสีวินโดวส์ —> control color
เรียกดูโปรแกรมช่วยแก้ไขปัญหา (Dr. Watson) —> drwtsn32
เรียกโปรแกรมตรวจสอบไดร์ฟเวอร์ (Driver Verifier Utility) —> verifier
เรียกดูประวัติการทำงานของเครื่อง (Event Viewer) —> eventvwr.msc
เรียกเครื่องมือตรวจสอบไฟล์ File Signature Verification Tool —> sigverif
เรียกหน้าต่าง Folders Options control —> folders
เรียกโปรแกรมจัดการ Fonts —> control fonts
เปิดไปยังโฟลเดอร์ Fonts (Fonts Folder) —> fonts
เรียกเกม Free Cell —> freecell
เปิดหน้าต่าง Game Controllers —> joy.cpl
เปิดโปรแกรมแก้ไข Group Policy (ใช้กับ XP Home ไม่ได้) —> gpedit.msc
เรียกโปรแกรมสร้างไฟล์ Setup (Iexpress Wizard) —> iexpress
เรียกโปรแกรม Indexing Service —> ciadv.msc
เรียกหน้าต่าง Internet Properties —> inetcpl.cpl
เรียกหน้าต่าง Keyboard Properties —> control keyboard
แก้ไขค่าความปลอดภัย (Local Security Settings) —> secpol.msc
แก้ไขผู้ใช้ (Local Users and Groups) —> lusrmgr.msc
คำสั่ง Log-off —> logoff
เรียกหน้าต่าง Mouse Properties control mouse main.cpl
เรียกหน้าต่าง Network Connections control netconnections —> ncpa.cpl
เรียกหน้าต่าง Network Setup Wizard —> netsetup.cpl
เรียกโปรแกรม Notepad —> notepad
เรียกคีย์บอร์ดบนหน้าจอ (On Screen Keyboard) —> osk
เรียกหน้าต่าง Performance Monitor —> perfmon.msc
เรียกหน้าต่าง Power Options Properties —> powercfg.cpl
เรียกโปรแกรม Private Character Editor —> eudcedit
เรียกหน้าต่าง Regional Settings —> intl.cpl
เรียกหน้าต่าง Registry Editor —> regedit
เรียกโปรแกรม Remote Desktop —> mstsc
เรียกหน้าต่าง Removable Storage —> ntmsmgr.msc
เรียกหน้าต่าง Removable Storage Operator Requests —> ntmsoprq.msc
เรียกดู Policy ที่ตั้งไว้ (ใช้กับ XP Home ไม่ได้) —> rsop.msc
เรียกหน้าต่าง Scanners and Cameras —> sticpl.cpl
เรียกโปรแกรม Scheduled Tasks control —> schedtasks
เรียกหน้าต่าง Security Center —> wscui.cpl
เรียกหน้าต่าง Services —> services.msc
เรียกหน้าต่าง Shared Folders —> fsmgmt.msc
คำสั่ง Shuts Down —> shutdown
เรียกหน้าต่าง Sounds and Audio —> mmsys.cpl
เรียกเกม Spider Solitare —> spider
แก้ไขไฟล์ระบบ (System Configuration Editor) —> sysedit
แก้ไขการตั้งค่าระบบ (System Configuration Utility) —> msconfig
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มทันที) —> sfc /scannow
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มเมื่อบู๊ต) —> sfc /scanonce
เรียกหน้าต่าง System Properties —> sysdm.cpl
เรียกหน้าต่าง Task Manager —> taskmgr
เรียกหน้าต่าง User Account Management —> nusrmgr.cpl
เรียกโปรแกรม Utility Manager —> utilman
เรียกโปรแกรม Windows Firewall —> firewall.cpl
เรียกโปรแกรม Windows Magnifier —> magnify
เรียกหน้าต่าง Windows Management Infrastructure —> wmimgmt.msc
เรียกหน้าต่าง Windows System Security Tool —> syskey
เรียกตัวอัพเดตวินโดวส์ (Windows Update) —> wupdmgr
เรียกโปรแกรม Wordpad —> write
เรียกโปรแกรม Add Hardware —> hdwwiz.cpl
เรียกโปรแกรม Add/Remove Programs —> appwiz.cpl
เรียกโปรแกรม Administrative Tools control —> admintools
ตั้งค่า Automatic Updates —> wuaucpl.cpl
เรียกโปรแกรม Bluetooth Transfer Wizard —> fsquirt
เรียกโปรแกรม เครื่องคิดเลข (Calculator) —> calc
เรียกโปรแกรม Certificate Manager —> certmgr.msc
เรียกโปรแกรม Character Map —> charmap
เรียกโปรแกรม ตรวจสอบดิสก์ (Check Disk Utility) —> chkdsk
เรียกดูคลิปบอร์ด (Clipboard Viewer) —> clipbrd
เรียกหน้าต่างดอส (Command Prompt) —> cmd
เรียกโปรแกรม Component Services —> dcomcnfg
เรียกโปรแกรม Computer Management —> compmgmt.msc
เรียกดู/ตั้ง เวลาและวันที่ —> timedate.cpl
เรียกหน้าต่าง Device Manager —> devmgmt.msc
เรียกดูข้อมูล Direct X (Direct X Troubleshooter) —> dxdiag
เรียกโปรแกรม Disk Cleanup Utility —> cleanmgr
เรียกโปรแกรม Disk Defragment —> dfrg.msc
เรียกโปรแกรม Disk Management —> diskmgmt.msc
เรียกโปรแกรม Disk Partition Manager —> diskpart
เรียกหน้าต่าง Display Properties control desktop —> desk.cpl
เรียกหน้าต่าง Display Properties เพื่อปรับสีวินโดวส์ —> control color
เรียกดูโปรแกรมช่วยแก้ไขปัญหา (Dr. Watson) —> drwtsn32
เรียกโปรแกรมตรวจสอบไดร์ฟเวอร์ (Driver Verifier Utility) —> verifier
เรียกดูประวัติการทำงานของเครื่อง (Event Viewer) —> eventvwr.msc
เรียกเครื่องมือตรวจสอบไฟล์ File Signature Verification Tool —> sigverif
เรียกหน้าต่าง Folders Options control —> folders
เรียกโปรแกรมจัดการ Fonts —> control fonts
เปิดไปยังโฟลเดอร์ Fonts (Fonts Folder) —> fonts
เรียกเกม Free Cell —> freecell
เปิดหน้าต่าง Game Controllers —> joy.cpl
เปิดโปรแกรมแก้ไข Group Policy (ใช้กับ XP Home ไม่ได้) —> gpedit.msc
เรียกโปรแกรมสร้างไฟล์ Setup (Iexpress Wizard) —> iexpress
เรียกโปรแกรม Indexing Service —> ciadv.msc
เรียกหน้าต่าง Internet Properties —> inetcpl.cpl
เรียกหน้าต่าง Keyboard Properties —> control keyboard
แก้ไขค่าความปลอดภัย (Local Security Settings) —> secpol.msc
แก้ไขผู้ใช้ (Local Users and Groups) —> lusrmgr.msc
คำสั่ง Log-off —> logoff
เรียกหน้าต่าง Mouse Properties control mouse main.cpl
เรียกหน้าต่าง Network Connections control netconnections —> ncpa.cpl
เรียกหน้าต่าง Network Setup Wizard —> netsetup.cpl
เรียกโปรแกรม Notepad —> notepad
เรียกคีย์บอร์ดบนหน้าจอ (On Screen Keyboard) —> osk
เรียกหน้าต่าง Performance Monitor —> perfmon.msc
เรียกหน้าต่าง Power Options Properties —> powercfg.cpl
เรียกโปรแกรม Private Character Editor —> eudcedit
เรียกหน้าต่าง Regional Settings —> intl.cpl
เรียกหน้าต่าง Registry Editor —> regedit
เรียกโปรแกรม Remote Desktop —> mstsc
เรียกหน้าต่าง Removable Storage —> ntmsmgr.msc
เรียกหน้าต่าง Removable Storage Operator Requests —> ntmsoprq.msc
เรียกดู Policy ที่ตั้งไว้ (ใช้กับ XP Home ไม่ได้) —> rsop.msc
เรียกหน้าต่าง Scanners and Cameras —> sticpl.cpl
เรียกโปรแกรม Scheduled Tasks control —> schedtasks
เรียกหน้าต่าง Security Center —> wscui.cpl
เรียกหน้าต่าง Services —> services.msc
เรียกหน้าต่าง Shared Folders —> fsmgmt.msc
คำสั่ง Shuts Down —> shutdown
เรียกหน้าต่าง Sounds and Audio —> mmsys.cpl
เรียกเกม Spider Solitare —> spider
แก้ไขไฟล์ระบบ (System Configuration Editor) —> sysedit
แก้ไขการตั้งค่าระบบ (System Configuration Utility) —> msconfig
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มทันที) —> sfc /scannow
ตรวจสอบระบบด้วย System File Checker Utility (เริ่มเมื่อบู๊ต) —> sfc /scanonce
เรียกหน้าต่าง System Properties —> sysdm.cpl
เรียกหน้าต่าง Task Manager —> taskmgr
เรียกหน้าต่าง User Account Management —> nusrmgr.cpl
เรียกโปรแกรม Utility Manager —> utilman
เรียกโปรแกรม Windows Firewall —> firewall.cpl
เรียกโปรแกรม Windows Magnifier —> magnify
เรียกหน้าต่าง Windows Management Infrastructure —> wmimgmt.msc
เรียกหน้าต่าง Windows System Security Tool —> syskey
เรียกตัวอัพเดตวินโดวส์ (Windows Update) —> wupdmgr
เรียกโปรแกรม Wordpad —> write
วันเสาร์ที่ 14 สิงหาคม พ.ศ. 2553
ติดตั้ง Windows SharePoint Services 3.0
ติดตั้ง Windows SharePoint Services 3.0
• ทำความรู้จักกับ Windows SharePoint Services 3.0
Windows SharePoint คือ Web Application ที่ทำหน้าที่ในการให้บริการการสื่อสาร การจัดการเนื้อหา การอำนวยความสะดวกให้กับทีม โดยการสร้าง website จาก template สำเร็จรูป เพื่อรวบรวมเอกสารต่างๆ เข้าด้วยกันสำหรับการทำงานร่วมกันเป็นทีม ตัวอย่างเช่น Meeting site สำหรับการประชุมผ่านทาง Website ซึ่งมีลักษณะโครงสร้างเหมือนการประชุมจริง โดยจะมีผู้ดำเนินการประชุมและผู้เข้าร่วมประชุม และมีเครื่องมืออำนวยความสะดวกต่างๆ เช่น
1. เครื่องมือสำหรับแจ้งเวียนเชิญและตอบรับการประชุม
2. รายการและวาระการประชุม
3. รายละเอียดเกี่ยวกับสถานที่ เอกสารแผนที่ และวิธรการเดินทางไปประชุมเป็นต้น
4. พื้นที่สำหรับจัดเก็บบันทึกการประชุม
Windows SharePoint นั้นจะประกอบด้วย 2 ผลิตภัณฑ์ คือ Windows SharePoint Services และ Windows SharePoint Portal Server ข้อแตกต่างในการทำงานระหว่าง Windows SharePoint Portal Server และ Windows SharePoint Services คือ WSPS นั้นจะประกอบด้วย Area, Site collection และ Personal site ในขณะที่ WSSS นั้นจะประกอบขึ้นมาจาก Site collection เพียงอย่างเดียว
Windows SharePoint Services Site
Site Collection คือ web site ที่ประกอบขึ้นมาจาก Top-level site , Subsite, และ content ของแต่ละ subsite รวมถึง Document Workspace และ Meeting Workspace
Top-level site คือ Web site ที่ถูกสร้างขึ้นใน WSS ที่ไม่อยู่ภายใต้ site อื่นๆ โดยที่ Top-level site นั้น สามารถมี Subsite อยู่ภายใต้ได้ และ subsite ที่อยู่ภายใต้ Top-level site นั้น สามารถมี subsite ได้
Subsite คือ Web site ที่ถูกสร้างขึ้นภายใต้ Top-level site บางครั้งเรียกว่า workspace โดยที่ subsite นั้นอาจมี element ต่างๆ เหมือนกันกับ Top-level site ได้ แต่อย่างไรก็ตาม subsite นั้น โดยส่วนมากจะใช้งานในการนำเสนอข้อมูลต่างๆ ของส่วนงานย่อยขององค์กร ตัวอย่าง เช่น ฝ่าย Engineering ประกอบด้วยส่วนงาน Electrical Engineering, Computer Engineering, Mechanical Engineering ดังนั้น Top-level site คือ Engineering และ มี 3 Subsite คือ Electrical Engineering site, Computer Engineering site , Mechanical Engineering site
*Metadata คือ ข้อมูลที่อธิบายถึงรายละเอียดของเอกสารหรือเนื้อหา
Site Group
Site Group คือ กลุ่มของผู้ใช้ โดยจะใช้ site group ในการกำหนดสิทธิในการใช้งาน site collection ของผู้ใช้ โดย site group ของ Windows SharePoint Service นั้นมี 5 กลุ่ม คือ
1. Reader = อ่านได้อย่างเดียว
2. Contributor = สามารถเพิ่มเนื้อหา (Content) เข้าใน List และ Document Library ได้
3. Web Designer = สามารถสร้าง Document Library และปรับแต่งหน้า website ได้
4. Administrator = มีสิทธิการใช้งานสูงสุด สามารถจัดการ WSPS ได้ทุกอย่าง
5. Custom Group = มีสิทธิการใช้งานต่างๆ ตามการกำหนดของ Administrator
การใช้งาน Windows SharePoint Services 3.0
ก่อนทำการติดตั้ง Windows SharePoint Services 3.0 นั้น ต้องทำการติดตั้งและคอนฟิก
1. Internet Information Services (IIS)
2. Microsoft .NET Framework 2.0 and Microsoft .NET Framework 3.0
การคอนฟิกวินโดวส์เซิร์ฟเวอร์ 2003 ให้เป็นเว็บเซิร์ฟเวอร์
ในวินโดวส์เซิร์ฟเวอร์ 2003 นั้น Internet Information Services (IIS) จะไม่ถูกติดตั้งโดยอัตโนมัติพร้อมกับระบบปฏิบัติการ ดังนั้นหากต้องการให้เซิร์ฟเวอร์เป็นเว็บเซิร์ฟเวอร์ ต้องทำการติดตั้งด้วยตนเอง
การติดตั้งเว็บเซิร์ฟเวอร์(IIS 6.0) และคอนฟิกโหมดการทำงาน
ขั้นตอนการติดตั้ง IIS 6.0 และคอนฟิกให้ทำงานในโหมดไอโซเลต (Process Isolation Mode) มีดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Manage Your Server
2. บนหน้าต่าง Manage Your Server คลิก Add or remove a role
3. ในไดอะล็อก Preliminary Steps คลิก Next
4. ในไดอะล็อก Server Role คลิก Application server (IIS ASP.NET) จากนั้นคลิก Next.
5. ในไดอะล็อก Web Application Server Options ให้เลือก Enable ASP.Net จากนั้นคลิก Next.
6. ในไดอะล็อก Summary of Selections คลิก Next
7. ในไดอะล็อก This Server is Now an Application Server คลิก Finish.
8. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
9. ในหน้าต่าง Internet Information Services Manager คลิกที่เครื่องหมายบวก (+) ที่อยู่หน้าชื่อเซิร์ฟเวอร์ จากนั้นคลิกขวาที่โฟลเดอร์ Web Sites แล้วเลือก Properties จากชอร์ตคัทเมนู
10. ในไดอะล็อก Properties คลิกที่แท็ป Service
11. ในส่วน Isolation mode ให้เลือกเช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จากนั้นคลิก OK
หมายเหตุ:
เช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จะถูกเลือก () เฉพาะกรณีทำการอัพเกรดจาก IIS 5.0 บนวินโดวส์เซิร์ฟเวอร์ 2000 ไปเป็น IIS 6.0 บนวินโดวส์เซิร์ฟเวอร์ 2003 เท่านั้น ถ้าเป็นการติดตั้ง IIS 6.0 ใหม่นั้น IIS 6.0 จะทำงานในแบบไอโซเลต (Process Isolation Mode) โดยอัตโนมัติ
ติดตั้งไมโครซอฟต์ .NET Framework 2.0
Windows SharePoint Services ต้องการดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 (.NET Framework 2.0)ในการทำงาน ขั้นตอนการติดตั้งดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ดังนี้ (หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 2.0 Redistributable Package (x86) แล้วคลิก Download)
1.ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ดับเบิลคลิก dotnetfx.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 2.0 Setup คลิก Next
3. ในหน้า End-User License Agreement เลือกเช็คบ็อกซ์หน้า I accept the terms of the License Agreement จากนั้นคลิก Install
4. ในหน้า Setup Complete คลิก Finish
การคอนฟิก IIS ให้รองรับ ASP.NET 2.0
ถ้าหากเป็น Internet Information Services (IIS) มีการติดตั้งใช้งานอยู่ก่อนแล้ว ในการรัน Windows SharePoint Services จะต้องทำการเปิดใช้งาน ASP.NET v2.0 ก่อน ดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
2. ในหน้าต่าง IIS Manager ให้เลือกเว็บไซท์ที่ต้องการคอนฟิกให้ใช้งานงาน ASP.NET v2.0
ให้คลิกขวาที่เว็บไซท์ที่ต้องการจากนั้นคลิก Properties จากชอร์ตคัทเมนู
3. บนแท็ป ASP.NET ในช่อง ASP.NET version ให้เลือก 2.0.50727
4. คลิก Apply จากนั้นคลิก OK
การรีสตาร์ท IIS
1. คลิก Start จากนั้นคลิก Run
2. ในช่อง Open พิมพ์ cmd.exe จากนั้นคลิก OK
3. ที่คอมมานด์พรอมท์ให้พิมพ์ iisreset.exe จากนั้นกด ENTER
4. พิมพ์ exit จากนั้นกด ENTER เพื่อออกจากคอมมานต์พรอมท์
ติดตั้งไมโครซอฟท์ .NET Framework 3.0
หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 3.0 Redistributable Package (x86) แล้วคลิก Download
1. ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ดับเบิลคลิก dotnetfx3setup.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 3.0 Setup เลือกปุ่มเรดิโอ I have read and ACCEPT the terms of the License Agreement จากนั้นคลิก Install
3. คลิกบอลลูน Microsoft .NET Framework 3.0 Setup
4. ในหน้า Setup Complete คลิก Exit
ติดตั้ง Windows SharePoint Services 3.0 และ SQL Server 2005 Express
ในการติดตั้ง Windows SharePoint Services 3.0 แบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server) นั้นสามารถทำการติดตั้งโดยเลือกอ็อปชันการติดตั้งเดฟฟอลต์แบบ Basic ซึ่งการติดตั้งนั้นจะรวมการติดตั้ง SQL Server 2005 Express ด้วย ตามขั้นตอนดังนี้
1. หากยังไม่มีตัวติดตั้ง Windows SharePoint Services 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ จากนั้นให้ท่องไปยังโฟลเดอร์ที่เก็บไฟล์ที่ดาวน์โหลดมาแล้วให้รันไฟล์ SharePoint.exe
2. คลิก I accept the terms of this agreement จากนั้นคลิก Continue
3. คลิก Basic เพื่อทำการติดตั้งแบบแบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server)
4. เมื่อการติดตั้งแล้วเสร็จให้คลิก Close
5. ในหน้า SharePoint Products and Technologies Configuration Wizard คลิก Next
6. ในไดอะล็อก SharePoint Products and Technologies Configuration Wizard คลิก Yes
7. รอจนการทำงานของวิซาร์ดแล้วเสร็จ ซึ่งจะได้หน้า Configuration Successful ให้คลิก Finish.
จากนั้นให้ทดลองเปิดหน้าโฮมเพจของ SharePointโดยใช้ Internet Explorer เปิดหน้า http://servername ซึ่งอาจจะต้องใส่ชื่อผู้ใช้ (Username) และรหัสผ่าน (Password) สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์นั้น จะต้องทำการบายพาสเว็บไซต์ SharePoint ก่อนจึงจะสามารถเปิดโฮมเพจของ SharePoint ได้
การเพิ่มไซต์ SharePoint เข้ายังรายการ Intranet Sites
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Security ในช่อง Select a Web zone to view or change security settings คลิก Local intranet จากนั้นคลิก Sites
3. ในไดอะล็อกบ็อกซ์ Local intranet คลิก Advanced
4. ให้ลบเช็คบ็อกซ์ Require server verification (https:) for all sites in this zone ให้เป็น
5. ในช่อง Add this Website to the zone ให้พิมพ์ URL ของเว็บไซต์ (เช่น http://servername) จากนั้นคลิก Add
6. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
7. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
8. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
9. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
การบายพาส Proxy Serverสำหรับ Local Addresses
สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์ให้ทำการบายพาสเว็บไซต์ SharePoint ดังนี้
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Connections ในส่วน Local Area Network (LAN) Settings a คลิก LAN Settings
3. ในส่วน Proxy Server คลิกเช็คบ็อกซ์หน้า Bypass proxy server for local addresses ให้เป็น
4. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local Area Network (LAN) Settings
5. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
6. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
ทดลองใช้งาน Windows SharePoint Servic3.0
เมื่อทำการติดตั้ง Windows SharePoint Services 3.0 แล้วเสร็จ จากนั้นก็สามารถทดลองใช้งานโดยทำการเปิดดูหน้าโฮมเพจ เช่น http://servername ด้วย Internet Explorer และยังสามารถทำการเพิ่มเนื้อหาให้กับ SharePoint ไซท์ หรือทำการบริหาร SharePoint ไซท์ได้โดยใช้ Central Administration ตัวอย่างเช่น
1. เพิ่มผู้ใช้เข้ายังไซต์
2. ปรับแต่งโอมเพจและหน้าเว็บเพจต่างภายในไซท์
3. ทำการสร้างลิสต์รายการหรือห้องเก็บเอกสารและเพิ่มเนื้อหา
คุณสามารถใช้ Central Administration เพื่อทำการคอนฟิกเซิร์ฟเวอร์เพิ่มเติม ตัวอย่างเช่น
1. Configure incoming e-mail settings ซึ่งจะช่วยให้ผู้ใช้สามารถส่งเนื้อหาไปยัง SharePoint ผ่านทางอีเมล์ หรือทำการส่งอีเมล์ไปยังสมาชิกทั้งหมดของไซท์ SharePoint
2. Configure e-mail alert settings เมื่อทำการคอนฟิก e-mail alert จะทำให้ผู้ใช้สามารถลงชื่อเพื่อรับอีเมล์แจ้งเตือนเมื่อมีการเปลี่ยนแปลงเนื้อหาภายในไซท์
3. Configure antivirus protection settings ถ้าเซิร์ฟเวอร์ได้ติดตั้งโปรแกรมป้องกันไวรัสซึ่งสามารถใช้งานร่วมกันกับ Windows SharePoint Services ได้ ก็สามารถทำการคอนฟิกให้ทำการสแกนเอกสารต่างๆ เมื่อทำการอัพโหลดขึ้นไปยังหรือดาวน์โหลดจาก SharePoint ได้
.NET Framework Developer Center
โฮมเพจ .NET Framework เว็บไซต์ http://msdn.microsoft.com/en-us/netframework/default.aspx
เว็บไซต์สำหรับดาวน์โหลด .NET Framework
• Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 22.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 55 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
• Microsoft .NET Framework Version 2.0 Redistributable Package (x64)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: NetFx64.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 45.2 MB
เวลาในการดาวน์โหลดโดยประมาณ: 1 ชั่วโมง 51 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=B44A0000-ACF8-4FA1-AFFB-40E78D788B00&displaylang=en
• Microsoft .NET Framework 3.0 Redistributable Package (bootstrapper)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx3setup.exe
เวอร์ชัน: 3.0
วันที่ออก: 11/21/2006
ขนาดของไฟล์: 2.8 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en
• Microsoft .NET Framework 3.0 Service Pack 1
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx30SP1setup.exe
เวอร์ชัน: 3.0 SP1
วันที่ออก: 11/19/2007
ขนาดของไฟล์: 2.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 6 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&displaylang=en
• Microsoft .NET Framework 3.5
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotNetFx35setup.exe
เวอร์ชัน: 3.5
วันที่ออก: 11/20/2007
ขนาดของไฟล์: 2.7 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
SharePoint Services 3.0 Site group Microsoft .NET Framework 2.0 3.0 dotNetFx
• ทำความรู้จักกับ Windows SharePoint Services 3.0
Windows SharePoint คือ Web Application ที่ทำหน้าที่ในการให้บริการการสื่อสาร การจัดการเนื้อหา การอำนวยความสะดวกให้กับทีม โดยการสร้าง website จาก template สำเร็จรูป เพื่อรวบรวมเอกสารต่างๆ เข้าด้วยกันสำหรับการทำงานร่วมกันเป็นทีม ตัวอย่างเช่น Meeting site สำหรับการประชุมผ่านทาง Website ซึ่งมีลักษณะโครงสร้างเหมือนการประชุมจริง โดยจะมีผู้ดำเนินการประชุมและผู้เข้าร่วมประชุม และมีเครื่องมืออำนวยความสะดวกต่างๆ เช่น
1. เครื่องมือสำหรับแจ้งเวียนเชิญและตอบรับการประชุม
2. รายการและวาระการประชุม
3. รายละเอียดเกี่ยวกับสถานที่ เอกสารแผนที่ และวิธรการเดินทางไปประชุมเป็นต้น
4. พื้นที่สำหรับจัดเก็บบันทึกการประชุม
Windows SharePoint นั้นจะประกอบด้วย 2 ผลิตภัณฑ์ คือ Windows SharePoint Services และ Windows SharePoint Portal Server ข้อแตกต่างในการทำงานระหว่าง Windows SharePoint Portal Server และ Windows SharePoint Services คือ WSPS นั้นจะประกอบด้วย Area, Site collection และ Personal site ในขณะที่ WSSS นั้นจะประกอบขึ้นมาจาก Site collection เพียงอย่างเดียว
Windows SharePoint Services Site
Site Collection คือ web site ที่ประกอบขึ้นมาจาก Top-level site , Subsite, และ content ของแต่ละ subsite รวมถึง Document Workspace และ Meeting Workspace
Top-level site คือ Web site ที่ถูกสร้างขึ้นใน WSS ที่ไม่อยู่ภายใต้ site อื่นๆ โดยที่ Top-level site นั้น สามารถมี Subsite อยู่ภายใต้ได้ และ subsite ที่อยู่ภายใต้ Top-level site นั้น สามารถมี subsite ได้
Subsite คือ Web site ที่ถูกสร้างขึ้นภายใต้ Top-level site บางครั้งเรียกว่า workspace โดยที่ subsite นั้นอาจมี element ต่างๆ เหมือนกันกับ Top-level site ได้ แต่อย่างไรก็ตาม subsite นั้น โดยส่วนมากจะใช้งานในการนำเสนอข้อมูลต่างๆ ของส่วนงานย่อยขององค์กร ตัวอย่าง เช่น ฝ่าย Engineering ประกอบด้วยส่วนงาน Electrical Engineering, Computer Engineering, Mechanical Engineering ดังนั้น Top-level site คือ Engineering และ มี 3 Subsite คือ Electrical Engineering site, Computer Engineering site , Mechanical Engineering site
*Metadata คือ ข้อมูลที่อธิบายถึงรายละเอียดของเอกสารหรือเนื้อหา
Site Group
Site Group คือ กลุ่มของผู้ใช้ โดยจะใช้ site group ในการกำหนดสิทธิในการใช้งาน site collection ของผู้ใช้ โดย site group ของ Windows SharePoint Service นั้นมี 5 กลุ่ม คือ
1. Reader = อ่านได้อย่างเดียว
2. Contributor = สามารถเพิ่มเนื้อหา (Content) เข้าใน List และ Document Library ได้
3. Web Designer = สามารถสร้าง Document Library และปรับแต่งหน้า website ได้
4. Administrator = มีสิทธิการใช้งานสูงสุด สามารถจัดการ WSPS ได้ทุกอย่าง
5. Custom Group = มีสิทธิการใช้งานต่างๆ ตามการกำหนดของ Administrator
การใช้งาน Windows SharePoint Services 3.0
ก่อนทำการติดตั้ง Windows SharePoint Services 3.0 นั้น ต้องทำการติดตั้งและคอนฟิก
1. Internet Information Services (IIS)
2. Microsoft .NET Framework 2.0 and Microsoft .NET Framework 3.0
การคอนฟิกวินโดวส์เซิร์ฟเวอร์ 2003 ให้เป็นเว็บเซิร์ฟเวอร์
ในวินโดวส์เซิร์ฟเวอร์ 2003 นั้น Internet Information Services (IIS) จะไม่ถูกติดตั้งโดยอัตโนมัติพร้อมกับระบบปฏิบัติการ ดังนั้นหากต้องการให้เซิร์ฟเวอร์เป็นเว็บเซิร์ฟเวอร์ ต้องทำการติดตั้งด้วยตนเอง
การติดตั้งเว็บเซิร์ฟเวอร์(IIS 6.0) และคอนฟิกโหมดการทำงาน
ขั้นตอนการติดตั้ง IIS 6.0 และคอนฟิกให้ทำงานในโหมดไอโซเลต (Process Isolation Mode) มีดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Manage Your Server
2. บนหน้าต่าง Manage Your Server คลิก Add or remove a role
3. ในไดอะล็อก Preliminary Steps คลิก Next
4. ในไดอะล็อก Server Role คลิก Application server (IIS ASP.NET) จากนั้นคลิก Next.
5. ในไดอะล็อก Web Application Server Options ให้เลือก Enable ASP.Net จากนั้นคลิก Next.
6. ในไดอะล็อก Summary of Selections คลิก Next
7. ในไดอะล็อก This Server is Now an Application Server คลิก Finish.
8. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
9. ในหน้าต่าง Internet Information Services Manager คลิกที่เครื่องหมายบวก (+) ที่อยู่หน้าชื่อเซิร์ฟเวอร์ จากนั้นคลิกขวาที่โฟลเดอร์ Web Sites แล้วเลือก Properties จากชอร์ตคัทเมนู
10. ในไดอะล็อก Properties คลิกที่แท็ป Service
11. ในส่วน Isolation mode ให้เลือกเช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จากนั้นคลิก OK
หมายเหตุ:
เช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จะถูกเลือก () เฉพาะกรณีทำการอัพเกรดจาก IIS 5.0 บนวินโดวส์เซิร์ฟเวอร์ 2000 ไปเป็น IIS 6.0 บนวินโดวส์เซิร์ฟเวอร์ 2003 เท่านั้น ถ้าเป็นการติดตั้ง IIS 6.0 ใหม่นั้น IIS 6.0 จะทำงานในแบบไอโซเลต (Process Isolation Mode) โดยอัตโนมัติ
ติดตั้งไมโครซอฟต์ .NET Framework 2.0
Windows SharePoint Services ต้องการดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 (.NET Framework 2.0)ในการทำงาน ขั้นตอนการติดตั้งดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ดังนี้ (หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 2.0 Redistributable Package (x86) แล้วคลิก Download)
1.ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ดับเบิลคลิก dotnetfx.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 2.0 Setup คลิก Next
3. ในหน้า End-User License Agreement เลือกเช็คบ็อกซ์หน้า I accept the terms of the License Agreement จากนั้นคลิก Install
4. ในหน้า Setup Complete คลิก Finish
การคอนฟิก IIS ให้รองรับ ASP.NET 2.0
ถ้าหากเป็น Internet Information Services (IIS) มีการติดตั้งใช้งานอยู่ก่อนแล้ว ในการรัน Windows SharePoint Services จะต้องทำการเปิดใช้งาน ASP.NET v2.0 ก่อน ดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
2. ในหน้าต่าง IIS Manager ให้เลือกเว็บไซท์ที่ต้องการคอนฟิกให้ใช้งานงาน ASP.NET v2.0
ให้คลิกขวาที่เว็บไซท์ที่ต้องการจากนั้นคลิก Properties จากชอร์ตคัทเมนู
3. บนแท็ป ASP.NET ในช่อง ASP.NET version ให้เลือก 2.0.50727
4. คลิก Apply จากนั้นคลิก OK
การรีสตาร์ท IIS
1. คลิก Start จากนั้นคลิก Run
2. ในช่อง Open พิมพ์ cmd.exe จากนั้นคลิก OK
3. ที่คอมมานด์พรอมท์ให้พิมพ์ iisreset.exe จากนั้นกด ENTER
4. พิมพ์ exit จากนั้นกด ENTER เพื่อออกจากคอมมานต์พรอมท์
ติดตั้งไมโครซอฟท์ .NET Framework 3.0
หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 3.0 Redistributable Package (x86) แล้วคลิก Download
1. ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ดับเบิลคลิก dotnetfx3setup.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 3.0 Setup เลือกปุ่มเรดิโอ I have read and ACCEPT the terms of the License Agreement จากนั้นคลิก Install
3. คลิกบอลลูน Microsoft .NET Framework 3.0 Setup
4. ในหน้า Setup Complete คลิก Exit
ติดตั้ง Windows SharePoint Services 3.0 และ SQL Server 2005 Express
ในการติดตั้ง Windows SharePoint Services 3.0 แบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server) นั้นสามารถทำการติดตั้งโดยเลือกอ็อปชันการติดตั้งเดฟฟอลต์แบบ Basic ซึ่งการติดตั้งนั้นจะรวมการติดตั้ง SQL Server 2005 Express ด้วย ตามขั้นตอนดังนี้
1. หากยังไม่มีตัวติดตั้ง Windows SharePoint Services 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ จากนั้นให้ท่องไปยังโฟลเดอร์ที่เก็บไฟล์ที่ดาวน์โหลดมาแล้วให้รันไฟล์ SharePoint.exe
2. คลิก I accept the terms of this agreement จากนั้นคลิก Continue
3. คลิก Basic เพื่อทำการติดตั้งแบบแบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server)
4. เมื่อการติดตั้งแล้วเสร็จให้คลิก Close
5. ในหน้า SharePoint Products and Technologies Configuration Wizard คลิก Next
6. ในไดอะล็อก SharePoint Products and Technologies Configuration Wizard คลิก Yes
7. รอจนการทำงานของวิซาร์ดแล้วเสร็จ ซึ่งจะได้หน้า Configuration Successful ให้คลิก Finish.
จากนั้นให้ทดลองเปิดหน้าโฮมเพจของ SharePointโดยใช้ Internet Explorer เปิดหน้า http://servername ซึ่งอาจจะต้องใส่ชื่อผู้ใช้ (Username) และรหัสผ่าน (Password) สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์นั้น จะต้องทำการบายพาสเว็บไซต์ SharePoint ก่อนจึงจะสามารถเปิดโฮมเพจของ SharePoint ได้
การเพิ่มไซต์ SharePoint เข้ายังรายการ Intranet Sites
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Security ในช่อง Select a Web zone to view or change security settings คลิก Local intranet จากนั้นคลิก Sites
3. ในไดอะล็อกบ็อกซ์ Local intranet คลิก Advanced
4. ให้ลบเช็คบ็อกซ์ Require server verification (https:) for all sites in this zone ให้เป็น
5. ในช่อง Add this Website to the zone ให้พิมพ์ URL ของเว็บไซต์ (เช่น http://servername) จากนั้นคลิก Add
6. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
7. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
8. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
9. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
การบายพาส Proxy Serverสำหรับ Local Addresses
สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์ให้ทำการบายพาสเว็บไซต์ SharePoint ดังนี้
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Connections ในส่วน Local Area Network (LAN) Settings a คลิก LAN Settings
3. ในส่วน Proxy Server คลิกเช็คบ็อกซ์หน้า Bypass proxy server for local addresses ให้เป็น
4. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local Area Network (LAN) Settings
5. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
6. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
ทดลองใช้งาน Windows SharePoint Servic3.0
เมื่อทำการติดตั้ง Windows SharePoint Services 3.0 แล้วเสร็จ จากนั้นก็สามารถทดลองใช้งานโดยทำการเปิดดูหน้าโฮมเพจ เช่น http://servername ด้วย Internet Explorer และยังสามารถทำการเพิ่มเนื้อหาให้กับ SharePoint ไซท์ หรือทำการบริหาร SharePoint ไซท์ได้โดยใช้ Central Administration ตัวอย่างเช่น
1. เพิ่มผู้ใช้เข้ายังไซต์
2. ปรับแต่งโอมเพจและหน้าเว็บเพจต่างภายในไซท์
3. ทำการสร้างลิสต์รายการหรือห้องเก็บเอกสารและเพิ่มเนื้อหา
คุณสามารถใช้ Central Administration เพื่อทำการคอนฟิกเซิร์ฟเวอร์เพิ่มเติม ตัวอย่างเช่น
1. Configure incoming e-mail settings ซึ่งจะช่วยให้ผู้ใช้สามารถส่งเนื้อหาไปยัง SharePoint ผ่านทางอีเมล์ หรือทำการส่งอีเมล์ไปยังสมาชิกทั้งหมดของไซท์ SharePoint
2. Configure e-mail alert settings เมื่อทำการคอนฟิก e-mail alert จะทำให้ผู้ใช้สามารถลงชื่อเพื่อรับอีเมล์แจ้งเตือนเมื่อมีการเปลี่ยนแปลงเนื้อหาภายในไซท์
3. Configure antivirus protection settings ถ้าเซิร์ฟเวอร์ได้ติดตั้งโปรแกรมป้องกันไวรัสซึ่งสามารถใช้งานร่วมกันกับ Windows SharePoint Services ได้ ก็สามารถทำการคอนฟิกให้ทำการสแกนเอกสารต่างๆ เมื่อทำการอัพโหลดขึ้นไปยังหรือดาวน์โหลดจาก SharePoint ได้
.NET Framework Developer Center
โฮมเพจ .NET Framework เว็บไซต์ http://msdn.microsoft.com/en-us/netframework/default.aspx
เว็บไซต์สำหรับดาวน์โหลด .NET Framework
• Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 22.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 55 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
• Microsoft .NET Framework Version 2.0 Redistributable Package (x64)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: NetFx64.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 45.2 MB
เวลาในการดาวน์โหลดโดยประมาณ: 1 ชั่วโมง 51 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=B44A0000-ACF8-4FA1-AFFB-40E78D788B00&displaylang=en
• Microsoft .NET Framework 3.0 Redistributable Package (bootstrapper)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx3setup.exe
เวอร์ชัน: 3.0
วันที่ออก: 11/21/2006
ขนาดของไฟล์: 2.8 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en
• Microsoft .NET Framework 3.0 Service Pack 1
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx30SP1setup.exe
เวอร์ชัน: 3.0 SP1
วันที่ออก: 11/19/2007
ขนาดของไฟล์: 2.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 6 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&displaylang=en
• Microsoft .NET Framework 3.5
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotNetFx35setup.exe
เวอร์ชัน: 3.5
วันที่ออก: 11/20/2007
ขนาดของไฟล์: 2.7 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
SharePoint Services 3.0 Site group Microsoft .NET Framework 2.0 3.0 dotNetFx
วันอังคารที่ 3 สิงหาคม พ.ศ. 2553
วิธีแก้ปัญหา Active Desktop Recovery Script Error
วิธีแก้ปัญหา Active Desktop Recovery Script Error อีกวิธี ซึ่งเป็นการเข้าไปแก้ไขค่ารีจีสทรีที่มีปัญหา สามารถทำได้ตามขั้นตอนต่อไปนี้
ให้ไปที่เมนู Start > Run > แล้วพิมพ์ว่า regedit จากนั้น OK หรือ Enter ก็ได้
แล้วให้ไปที่คีย์ HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components
จากนั้นให้แก้ไขค่า DeskHtmlVersion ซึ่งจะอยู่ทางขวามือ โดยให้ดับเบิ้ลคลิกแล้วใส่ค่า 0(ศูนย์) ลงไป ซึ่งเดิมจะเป็น 272 หรือ 110 แล้วกดปุ่ม OK และปิด Windows Registry ออกไป
จากนั้นให้ไปคลิกที่ปุ่ม Active Desktop Recovery ที่อยู่ในหน้าจอ desktop สีขาว หรือคลิกขวาที่หน้าจอ แล้วเลือก Refresh(กดปุ่ม F5 ก็ได้เช่นกันครับ) เท่านี้ ปัญหา Active Desktop Recovery Script Error จะหาย error แล้วครับ
ลองนำทิปนี้ไปแก้ไขปัญหา Active Desktop
ให้ไปที่เมนู Start > Run > แล้วพิมพ์ว่า regedit จากนั้น OK หรือ Enter ก็ได้
แล้วให้ไปที่คีย์ HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components
จากนั้นให้แก้ไขค่า DeskHtmlVersion ซึ่งจะอยู่ทางขวามือ โดยให้ดับเบิ้ลคลิกแล้วใส่ค่า 0(ศูนย์) ลงไป ซึ่งเดิมจะเป็น 272 หรือ 110 แล้วกดปุ่ม OK และปิด Windows Registry ออกไป
จากนั้นให้ไปคลิกที่ปุ่ม Active Desktop Recovery ที่อยู่ในหน้าจอ desktop สีขาว หรือคลิกขวาที่หน้าจอ แล้วเลือก Refresh(กดปุ่ม F5 ก็ได้เช่นกันครับ) เท่านี้ ปัญหา Active Desktop Recovery Script Error จะหาย error แล้วครับ
ลองนำทิปนี้ไปแก้ไขปัญหา Active Desktop
วันจันทร์ที่ 1 กุมภาพันธ์ พ.ศ. 2553
รู้จัก LDAP คืออะไร?
รู้จัก LDAP คืออะไร?
LDAP (นิยมอ่านว่า "แอล-แด็บ") เป็น Protocol ที่พัฒนามาจาก Protocol X.500 ซึ่งใช้ในการเข้าถึงและ Update ข้อมูลของ Directory ซึ่งDirectory ในทาง Computer ที่จริงก็อาจเรียกได้ว่าเป็น Database แบบพิเศษหรือ Data repository ที่บรรจุรายละเอียดของ Object ต่างๆ เช่น Users, Application, Files, Printer และอื่นๆ รวมทั้ง Security information ของ Object เหล่านี้ด้วย โดยข้อแตกต่างของ Directory กับ Database ปกติ ได้แก่
1. Operation: ใน Directory จะเน้นที่การ Access ข้อมูลหรือ อ่านข้อมูล มากกว่า Update หรือ เขียนข้อมูล ในขณะที่ Database ทั่วไปจะเน้นการ Update มากกว่า
2. Transaction: ใน Database จะรองรับการทำ Transaction หรือการ Update ข้อมูลสองจุดที่ต้องสอดคล้องกัน แบบ All-or-nothing เช่นการโอนเงินจากบัญชีหนึ่ง ไปอีกบัญชีหนึ่ง ที่ต้องการความสมบูรณ์ทั้ง 2 ฝั่ง หรือไม่ก็ไม่ต้องทำเลย ในขณะที่ Directory ที่เน้นการอ่านอย่างเดียว อาจจะไม่ต้องการความสอดคล้องกันของข้อมูลบ้างนัก เช่นเมื่อมีการย้ายที่อยู่ระหว่างคน 2 คน ก็ต้องมีการปรับเปลี่ยนเบอร์ติดต่อของ 2 คนนั้น ซึ่งตรงนี้อาจจะไม่จำเป็นต้องทำทันที อย่างไรก็ตาม Feature นี้อาจจะมีการผนวกเข้ากับ LDAP Product ใหม่ๆ ในอนาคตก็ได้
3. Data Accuracy: Directory อาจจะมีข้อจำกัดในการจัดเก็บข้อมูลที่ไม่สมบูรณ์ เช่นมีแต่ชื่อ ไม่มีที่อยู่ แต่อย่างไรก็ตาม เราสามารถ Configure คุณสมบัติเหล่านี้ได้ในบาง Directory Service
4. Query: Directory ไม่ Support Query String (SQL, Structured Query Language)
อย่างไรก็ตามถึงแม้ Directory จะมีคุณสมบัติด้อยกว่า Database หลายประการ แต่เนื่องจาก Protocol ที่ใช้ในการเข้าถึง Directory เช่น LDAP มีความเร็วในการเข้าถึงข้อมูลสูง และก็ทำให้ Application ที่ทำงานบน Protocol เหล่านี้สามารถเข้าถึงข้อมูลอย่างรวดเร็ว ทำให้ระบบ Directory เป็นที่ยอมรับ และนำมาใช้งานทั่วไป
นอกจากประโยชน์ในการค้นหาข้อมูลได้อย่างรวดเร็วแล้ว Directory ยังเป็นโครงสร้างข้อมูลที่แสดงให้ User เห็นข้อมูลทั้งหมดได้จากมุมมองเดียว (Single Logical View) แม้ว่าแท้จริงแล้ว ข้อมูลเหล่านั้นอาจถูกเก็บแยกกันอยู่อย่างกระจัดกระจายตาม Host ต่างๆ บน Distributed System ซึ่งข้อดีต่างๆ เหล่านี้ ทำให้มีการพัฒนา Application ที่ใช้ Directory Service ออกมามากมาย และ LDAP ก็คือหนึ่งในมาตรฐานที่ใช้จัดการ การรับส่งข้อมูลระหว่าง Application Server ที่เก็บ Directory เหล่านี้ กับ Client Application ที่เป็นฝ่ายเรียกดูข้อมูลจาก Directory
อีกหนึ่งสาเหตุที่จำเป็นต้องมีมาตรฐานในการเข้าถึงข้อมูลใน Directory นั้นก็เพื่อให้การพัฒนา Application ที่ใช้ติดต่อกับ Directory Server นั้นมีความยืดหยุ่นขึ้น โดย Developer สามารถเรียกใช้ API (Application Programming Interface) เพื่อติดต่อกับ Directory Service ได้ โดยไม่ต้องทราบวิธีการเข้าถึงโดยละเอียด เช่นโครงสร้างของ Directory หรือ ชนิดของข้อมูล (Data Type) ภายใน หรือไม่จำเป็นต้องปรับแก้ Application ใหม่หากมีความต้องการ Data Type ใหม่ๆ เป็นต้น
นอกเหนือจากที่กล่าวมาข้างต้นแล้ว การมีมาตรฐานเดียวกัน ทำให้ผู้ผลิต Application และ Network device ที่รองรับการใช้งาน Directory Service มีระเบียบวิธีที่ชัดเจนเป็นกลาง ทำให้การติดต่อระหว่าง Application จากต่างผู้ผลิต หรือ ต่าง Platform นั้นเป็นไปได้อย่างรวดเร็ว ถูกต้อง และปลอดภัย โดยไม่ต้องทราบข้อมูลที่ใช้ในการติดต่อ เช่น Platform ที่ใช้, Host Name หรือ IP address เช่นเดียวกับการที่เราต้องมี TCI/IP, HTTP, FTP, RPC หรือ ORB เป็นมาตรฐานที่ใช้อยู่ทั่วโลก
LDAP เป็นมาตรฐานที่ได้รับการยอมรับอย่างกว้างขวาง และมี Application Vendor อยู่หลายราย อาทิ OpenLDAP, IBM, Oracle, Microsoft ซึ่ง Product ที่ได้รับความนิยมก็ได้แก่ Slapd ของ University of Michigan และ Openldap, Directory Server ของ Netscape, Active Directory (AD) ของ Microsoft, Novell Directory Services (NDS) ของ Novell, Sun Directory Services (SDS) ของ Sun และ Internet Directory Server (IDS) ของ Lucent
LDAP ได้รับการออกแบบมาให้อยู่บน TCP/IP Layer ที่มีเพียง 4 Layer ทำให้มีความต้องการ Resource น้อยกว่า DAP ของมาตรฐาน X.500 อย่างไรก็ตาม หากมีความต้องการติดต่อกันระหว่าง LDAP Client กับ X.500 Server จำเป็นจะต้องมีการติดต่อผ่าน Gateway ที่เรียกว่า LDAP Server ตามภาพ
จากภาพจะเห็นได้ว่า LDAP Server จะต้องมีความเข้าใจทั้ง TCP/IP และ OSI Model ในขณะที่ตัว LDAP Client ไม่จำเป็นต้องทำความเข้าใจกับ OSI Layer และไม่ต้องประมวลผลตาม DAP ที่มีความซับซ้อน และ Overhead สูง
สำหรับระบบที่ไม่มีการใช้ X.500 ก็สามารถมีเพียง LDAP Client กับ LDAP Server ซึ่งเรียกว่า LDAP stand-alone server ตามภาพด้านล่าง
จากตัวอย่างที่ 2 ตัวอย่างข้างต้น ทำให้เราเห็นว่า จากมุมมองของ Client แล้ว ไม่ว่า Directory ที่ access เข้าไปจะอยู่บน LDAP Server หรือ X.500 Server Client จะเรียก Directory เหล่านั้นว่า LDAP Directory และ เรียก Server นั้นว่า LDAP Server
LDAP Directory มีการจัดโครงสร้างแบบลำดับชั้น (Hierarchical) โดยข้อมูลจะถูกบรรจุอยู่ใน Entries ซึ่งแต่ละ Entry จะประกอบด้วย Attribute ในรูปของ= โดย type จะถูกกำหนดไว้ด้วย Object Identifier (OID) ส่วน value ก็จะมี Syntax ที่ระบุไว้ชัดเจน
Entry จะถูกจัดไว้เป็นลำดับชั้นด้วย Distinguished name (DN) โดย Entry ใดๆที่อยู่ใต้ Entry อื่น จะมี DN ของ Entry อื่นเป็น Suffix (ข้อความที่ตามหลัง) Entry นั้น
Schema ของ Directory จะระบุ DN และระบุว่า แต่ละ Entry จะประกอบไปด้วย Attribute ใดบ้าง โดยกำหนด Schema จะกำหนดข้อมูลเหล่านี้ไว้ใน Object class ซึ่งได้แก่ List ของ Mandatory กับ Optional Attribute, วิธีการเปรียบเทียบ Attribute, ชนิดและขนาดของข้อมูลที่อนุญาต ซึ่งทุกๆ Entry จะต้องเชื่อโยงไว้กับ Object Class หนึ่ง Class รายละเอียดเพิ่มเติมของ Schema File มีอยู่ในหัวข้อ LDAP Schema
จาก Hierarchy ของ Directory ด้านบน Entry ที่มีสีแดงจะถูกระบุด้วย DN ดังนี้
dn: uid=bmarshal,ou=People,dc=pisoftware,dc=com
Attribute ส่วนใหญ่จะมีการใช้ตัวอักษรย่อระบุ type ซึ่งได้แก่ uid = User id, cn = Common Name, sn = Surname, l = Location, ou = Organizational Unit, o = Organization, dc = Domain Component, st = State, c = Country, etc. โดยข้อมูลเพิ่มเติมในส่วนนี้สามารถหาได้จาก RFC2256
เริ่มใช้งาน LDAP
โครงสร้างของ LDAP ประกอบด้วย Server และ Client ซึ่งในที่นี้เราเลือกใช้ Product ของ OpenLDAP ซึ่งเป็น LDAP Implementation แบบ Open Source ที่ได้รับความนิยมสูง โดยในชุดที่แจกจ่ายให้ Download นั้นจะประกอบด้วย Stand-alone server daemon, Stand-alone update replication daemon, Library และ ตัวอย่างของ Client รวมทั้ง Tools และ Utilities ต่างๆ ในส่วนของวิธีการติดตั้ง OpenLDAP ผู้ที่สนใจสามารถหาข้อมูลได้จาก Document ของ OpenLDAP ซึ่งมีพร้อมอยู่ใน Download package แล้ว
ในตัวอย่างนี้เราจะใช้ ระบบปฏิบัติการ Redhat Linux 9.0 ซึ่งเมื่อได้ทำการติดตั้งเรียบร้อยแล้ว จะมี OpenLDAP version 2.0.27 มาให้ด้วย โดยในส่วนของ LDAP Server จะเป็น Daemon process ที่ชื่อว่า slapd
1. วิธีการ Start/Stop slapd
slapd เป็น LDAP Server daemon ซึ่งทำหน้าที่รับ Object Query จาก Client และส่งข้อมูลของ Object ที่ Client นั้นต้องการ
1.1 วิธีการ Star slapd
1.1.1 Command line:
/usr/sbin/slapd
เช่น
/usr/sbin/slapd -f /etc/openldap/slapd.conf -d 255
หมายถึงให้ slapd ใช้ Configuration file ที่ Path /etc/openldap/slapd.conf โดยมี Debug level = 255 โดยข้อมูลเพิ่มเติมของการ execute slapd มีเพิ่มเติมที่ man page โดยใช้คำสั่ง 'man slapd'
1.1.2 Server Service:
ที่ Desktop ของ Linux ให้ไปที่ปุ่ม Main menu > System Settings > Server Settings > Services ที่เมนูด้านซ้ายจะมีรายชื่อของ Services ถ้าต้องการให้ Linux เรียก Service ใดในตอนเริ่ม boot เครื่องก็ให้ Check ถูกหน้าชื่อ Service นั้น หรือจะ Stop และ Restart โดยใช้ปุ่มบน Toolbar ด้านบนก็ได้ โดย slapd จะเป็น Service ที่ชื่อ ldap
1.2 วิธีการ Stop slapd
1.2.1 Command line:
kill -INT
เช่น kill -INT 5154
หรือ
kill -INT `cat /var/run/slapd.pid`
หากมีการเก็บค่า Process ID ไว้ที่ Path /var/run/slapd.pid โดยสามารถแก้ไขเป็น Path อื่นก็ได้โดยแก้ไขที่ File slapd.conf ที่ Path /etc/openldap
1.2.2 Server Service:
ใช้วิธีการเช่นเดียวกับการ Start Service
2. Configuration Files ที่จำเป็นในการ Run slapd
ในคำสั่งสำหรับ Start slapd นั้น เราจำเป็นต้องมีการระบุ Path ของ Configuration file ที่โดยทั่วไปจะตั้งชื่อว่า slapd.conf และสำหรับ Redhat 9.0 จะมี Default path อยู่ที่ /etc/openldap
ด้านล่างเป็นตัวอย่างของ Configuration file
01: include /etc/openldap/schema/core.schema
02: include /etc/openldap/schema/cosine.schema
03: include /etc/openldap/schema/inetorgperson.schema
04: include /etc/openldap/schema/nis.schema
05: include /etc/openldap/schema/redhat/rfc822-MailMember.schema
06: include /etc/openldap/schema/redhat/autofs.schema
07: include /etc/openldap/schema/redhat/kerberosobject.schema
08:
09: access to * by * write
10:
11: database ldbm
12: suffix "dc=cp25,dc=com"
13: rootdn "cn=ldapadm,dc=cp25,dc=com"
14: rootpw cp25
15: readonly off
16: access to * by * write
17: directory /var/lib/ldap
18: index objectClass,uid,uidNumber,gidNumber,memberUid eq
19: index cn,mail,surname,givenname eq,subinitial
Configuration File นี้มีตัวอย่างมาให้แล้วใน Path /etc/openldap/slapd.conf ซึ่งตัวอย่างด้านบนยกมาเฉพาะมีบรรทัดที่ไม่ถูก Comment ด้วย '#'
รายละเอียดของ การแก้ไข Configuration file สามารถอ่านเพิ่มเติมได้จาก OpenLDAP Administrator's Guide (ปัจจุบัน Version 2.2)
ใน Configuration file จะประกอบด้วย Directive ซึ่งหมายถึง Parameter ของ LDAP Server และค่าของ Directive หรือ Parameter เหล่านั้น ซึ่ง Directive มีทั้งหมด 2 ชนิด คือ
1. Global configuration directive : Directive กลางของ Directory ซึ่งจะถูก Apply ไปยังทุก Database (ในที่นี้หมายถึง Directory) แต่ถ้า Database มี Directive นี้อยู่แล้ว ก็จะ Over write Directive กลางนี้
2. Database directive : Directive ที่ Apply เฉพาะ Database นั้นๆ
Database directive สามารถมีได้หลายชุด โดยจะแยกออกจากกันด้วย Directive ชื่อ 'database' ซึ่งมี Database บางชนิดที่มี Directive เฉพาะ เช่น LDBM, Shell หรือ Password
สำหรับรายละเอียดของ Directive ที่ปรากฏในตัวอย่างมีดังนี้
1. Include (01-07) : Configuration file ของ LDAP นั้นสามารถ include file อื่นเข้ามาได้ ซึ่งในที่นี้เป็นการ Include Schema File ที่มีให้อยู่แล้ว โดย Schema File นั้นเป็น File ที่ระบุโครงสร้างของ Directory ว่าจะมี Object ใดบ้าง มี Attribute ใดบ้าง และมี Attribute Type เป็นอย่างไร เช่นเดียวกันกับ Schema ของ Database ที่จะระบุว่ามี Table ใดบ้าง มี Field ใดบ้างและมี Field Type เป็นอย่างไร รายละเอียดของ Schema File มีเพิ่มเติมที่ OpenLDAP Administrator's Guide (ปัจจุบัน Version 2.2) ที่หัวข้อ Schema Specification
2. Access level (09) : ระบุสิทธิ์ในการเข้าถึง Directory ของแต่ละ User ในที่นี้ระบุให้ทุก Directory (*) สามารถถูกแก้ไข (write) ได้โดยทุก User (*)
3. Database type (11) : ระบุชนิดของ Database ซึ่ง Openldap สามารถรองรับ Database ได้หลายชนิด อาทิ bdb, dnssrv, ldap, ldbm, meta, monitor, null, passwd, perl, shell, sql, และ tcl แต่สำหรับใน Linux นั้นเข้าใจว่ารองรับเฉพาะ ldbm, shell, และ passwd โดยในที่นี่ใช้ ชนิด ldbm
4. Suffix (12) : ระบุ Suffix ของ Query string "dc=cp25,dc=com" ว่าถ้ามี Query string ที่มี Suffix เป็นค่าดังกล่าว ก็จะมาใช้ Database ตัวนี้
5. Rootdn (13) : ระบุ User name ที่จะใช้ในการ Access เป็น Root ของ database นี้ โดยการระบุก็จะต้องเป็นไปตามการกำหนด Object ของ LDAP คือใช้ Distinguish name หรือ dn ในการระบุชื่อ Object เช่น "cn=ldapadm,dc=cp25,dc=com" หมายถึง Root มี common name (cn) เป็น ldapadm
6. Rootpw (14) : ระบุ Password ของ Root dn
7. Readonly (15) : ระบุสิทธิ์ Default ในการแก้ไขข้อมูล ซึ่งสิทธิ์ของ root โดย Default แล้วคือ Readonly = off
8. Access right (16) : สิทธิ์ในการเข้าถึงข้อมูล ซึ่งจะเห็นว่า Directive นี้ซ้ำกับ Global directive ซึ่งหาก Directive ของ Database มีค่าไม่เหมือนกันกับ Global directive ก็จะยึด Directive ของ Database เป็นหลัง
9. Directory (17) : Path ที่ใช้เก็บ Database file
หากมี Database อื่นอีกก็สามารถกำหนดเพิ่มได้ โดยเริ่มต้นจาก Directive 'database' นั่นเอง
เราสามารถทดสอบการ LDAP Service ว่า Start ได้สำเร็จหรือไม่โดยใช้ LDAP Browser โดยหาก Connect สำเร็จก็จะมีชื่อ Suffix ปรากฏให้เห็น แต่จะยังไม่สามารถ Browse ดูได้เนื่องจากเรายังไม่ได้สร้าง Directory โดยการ Add Object และ Attribute
LDAP Directory
หลังจากเราสามารถ Run LDAP Service ได้สำเร็จแล้ว ขั้นตอนต่อไปคือการสร้าง Database หรือ Directory ด้วยการ Add Object หรือ Entry และ Attribute ลงไปใน LDAP Database ซึ่งวิธีการสร้าง Database นี้มีอยู่ 2 ประเภทคือแบบ Online กับแบบ Offline
1. การสร้าง Directory แบบ Online
ในขณะที่ LDAP Service กำลังทำงานอยู่นั้น เราสามารถใช้ Command line ในการเพิ่มหรือลบ Object หรือ Entry ที่มีอยู่ได้ รวมไปถึงการเพิ่ม Attribute ใหม่ๆ หรือแก้ไข Attribute เดิม คำสั่งในการเพิ่ม Object หรือ Entry ใหม่รวมทั้ง Attribute ของ Object หรือ Entry นั้น คือ 'ldapadd' ส่วนคำสั่งในการแก้ไข Object และ Attribute ที่มีมาให้กับ OpenLDAP คือ 'ldapmodify'
1.1 ldapadd
1.1.1 Syntax
คำสั่ง ldapadd มี Option จำนวนมาก ข้อมูลเพิ่มเติมสามารถหาได้จาก man page ด้วยคำสั่ง 'man ldapadd' โดยในตัวอย่างนี้จะขอเลือกใช้เฉพาะ Option พื้นฐานที่จำเป็นก่อนดังนี้
ldapadd [-h host] [-p port] [-P version] [-F] [-x] [-D binddn] [-w password] [-f file]
ความหมายของ Option ด้านบนเป็นดังนี้
-h ldap : ระบุ IP ของ LDAP Server
-p port : ระบุ Port ของ LDAP Server (Default คือ 389)
-P version : ระบุ Version ของ Protocol (ปัจจุบัน 3 หรืออาจจะใช้ 2 ก็ได้)
-F : ระบุว่าทุก Command ที่สั่งให้ทำบน Directory จะถูกกระทำทั้งหมดโดยไม่สนใจลักษณะข้อมูลเดิมที่มีอยู่ (Force application)
-x : ระบุว่าใช้วิธีการ Authenticate User แบบปกติ
-D : ระบุ DN ที่ใช้ในการ Login เข้า Directory โดยแนะนำให้ใช้ของ Root ที่กำหนดไว้ใน slapd.conf
-w : ระบุ Password ของ DN ซึ่งหากใช้ rootdn ก็จะเป็น root password ตามที่กำหนดไว้ใน slapd.conf
-f file: ระบุ Path ของ LDIF File ซึ่งเป็น Fie ระบุรายละเอียดของ Object หรือ Entry และ Attribute ที่ต้องการเพิ่มเข้าไปใน Directory
*สำหรับ Option [-h host] [-p port] และ [-P version] นั้นอาจจะไม่จำเป็นต้องระบุก็ได้ ถ้าเราสั่ง ldapadd บน Local Host ที่ไม่มีการแก้ไข LDAP Port และทำ Operation ที่มีอยู่ร่วมกันทั้ง บน Protocol ทั้ง 2 version
1.1.2 LDIF File
LDIF File เป็น File ระบุข้อมูลที่ต้องการเพิ่มลงไปใน Directory โดยข้อมูลดังกล่าวจะต้องสอดคล้องกันกับ Schema ที่กำหนด ตัวอย่างของ LDIF File มีดังนี้
test.ldif
# cp25, com
dn: dc=cp25,dc=com
objectClass: domain
dc: cp25
# Somchai's Entry
dn: cn=Somchai Kamdee,dc=cp25,dc=com
cn: Somchai Kamdee
cn: Chai
objectClass: person
sn: Kamdee
# Somsri's Entry
dn: cn=Somsri Kamdee,dc=cp25,dc=com
cn: Sri Kamdee
cn: Somsri Kamdee
objectClass: person
sn: Kamdee
# Somjit's Entry
dn: cn=Somjit J Kamdee,dc=cp25,dc=com
cn: Jit Kamdee
cn: Jit
objectClass: person
sn: Kamdee
Format ของ LDIF File สามารถหาได้เพิ่มเติมจาก The LDIF text entry format โดยหลังจากเรามี LDIF File แล้วก็สามารถเรียกให้ ldapadd ทำงานได้ดังนี้
ldapadd -F -x -D "cn=ldapadm,dc=cp25,dc=com" -w cp25 -f test.ldif
ซึ่งหากการสร้าง Database ประสบความสำเร็จ เราก็จะสามารถใช้ LDAP Browser เปิดดูข้อมูลได้
LDAP (นิยมอ่านว่า "แอล-แด็บ") เป็น Protocol ที่พัฒนามาจาก Protocol X.500 ซึ่งใช้ในการเข้าถึงและ Update ข้อมูลของ Directory ซึ่งDirectory ในทาง Computer ที่จริงก็อาจเรียกได้ว่าเป็น Database แบบพิเศษหรือ Data repository ที่บรรจุรายละเอียดของ Object ต่างๆ เช่น Users, Application, Files, Printer และอื่นๆ รวมทั้ง Security information ของ Object เหล่านี้ด้วย โดยข้อแตกต่างของ Directory กับ Database ปกติ ได้แก่
1. Operation: ใน Directory จะเน้นที่การ Access ข้อมูลหรือ อ่านข้อมูล มากกว่า Update หรือ เขียนข้อมูล ในขณะที่ Database ทั่วไปจะเน้นการ Update มากกว่า
2. Transaction: ใน Database จะรองรับการทำ Transaction หรือการ Update ข้อมูลสองจุดที่ต้องสอดคล้องกัน แบบ All-or-nothing เช่นการโอนเงินจากบัญชีหนึ่ง ไปอีกบัญชีหนึ่ง ที่ต้องการความสมบูรณ์ทั้ง 2 ฝั่ง หรือไม่ก็ไม่ต้องทำเลย ในขณะที่ Directory ที่เน้นการอ่านอย่างเดียว อาจจะไม่ต้องการความสอดคล้องกันของข้อมูลบ้างนัก เช่นเมื่อมีการย้ายที่อยู่ระหว่างคน 2 คน ก็ต้องมีการปรับเปลี่ยนเบอร์ติดต่อของ 2 คนนั้น ซึ่งตรงนี้อาจจะไม่จำเป็นต้องทำทันที อย่างไรก็ตาม Feature นี้อาจจะมีการผนวกเข้ากับ LDAP Product ใหม่ๆ ในอนาคตก็ได้
3. Data Accuracy: Directory อาจจะมีข้อจำกัดในการจัดเก็บข้อมูลที่ไม่สมบูรณ์ เช่นมีแต่ชื่อ ไม่มีที่อยู่ แต่อย่างไรก็ตาม เราสามารถ Configure คุณสมบัติเหล่านี้ได้ในบาง Directory Service
4. Query: Directory ไม่ Support Query String (SQL, Structured Query Language)
อย่างไรก็ตามถึงแม้ Directory จะมีคุณสมบัติด้อยกว่า Database หลายประการ แต่เนื่องจาก Protocol ที่ใช้ในการเข้าถึง Directory เช่น LDAP มีความเร็วในการเข้าถึงข้อมูลสูง และก็ทำให้ Application ที่ทำงานบน Protocol เหล่านี้สามารถเข้าถึงข้อมูลอย่างรวดเร็ว ทำให้ระบบ Directory เป็นที่ยอมรับ และนำมาใช้งานทั่วไป
นอกจากประโยชน์ในการค้นหาข้อมูลได้อย่างรวดเร็วแล้ว Directory ยังเป็นโครงสร้างข้อมูลที่แสดงให้ User เห็นข้อมูลทั้งหมดได้จากมุมมองเดียว (Single Logical View) แม้ว่าแท้จริงแล้ว ข้อมูลเหล่านั้นอาจถูกเก็บแยกกันอยู่อย่างกระจัดกระจายตาม Host ต่างๆ บน Distributed System ซึ่งข้อดีต่างๆ เหล่านี้ ทำให้มีการพัฒนา Application ที่ใช้ Directory Service ออกมามากมาย และ LDAP ก็คือหนึ่งในมาตรฐานที่ใช้จัดการ การรับส่งข้อมูลระหว่าง Application Server ที่เก็บ Directory เหล่านี้ กับ Client Application ที่เป็นฝ่ายเรียกดูข้อมูลจาก Directory
อีกหนึ่งสาเหตุที่จำเป็นต้องมีมาตรฐานในการเข้าถึงข้อมูลใน Directory นั้นก็เพื่อให้การพัฒนา Application ที่ใช้ติดต่อกับ Directory Server นั้นมีความยืดหยุ่นขึ้น โดย Developer สามารถเรียกใช้ API (Application Programming Interface) เพื่อติดต่อกับ Directory Service ได้ โดยไม่ต้องทราบวิธีการเข้าถึงโดยละเอียด เช่นโครงสร้างของ Directory หรือ ชนิดของข้อมูล (Data Type) ภายใน หรือไม่จำเป็นต้องปรับแก้ Application ใหม่หากมีความต้องการ Data Type ใหม่ๆ เป็นต้น
นอกเหนือจากที่กล่าวมาข้างต้นแล้ว การมีมาตรฐานเดียวกัน ทำให้ผู้ผลิต Application และ Network device ที่รองรับการใช้งาน Directory Service มีระเบียบวิธีที่ชัดเจนเป็นกลาง ทำให้การติดต่อระหว่าง Application จากต่างผู้ผลิต หรือ ต่าง Platform นั้นเป็นไปได้อย่างรวดเร็ว ถูกต้อง และปลอดภัย โดยไม่ต้องทราบข้อมูลที่ใช้ในการติดต่อ เช่น Platform ที่ใช้, Host Name หรือ IP address เช่นเดียวกับการที่เราต้องมี TCI/IP, HTTP, FTP, RPC หรือ ORB เป็นมาตรฐานที่ใช้อยู่ทั่วโลก
LDAP เป็นมาตรฐานที่ได้รับการยอมรับอย่างกว้างขวาง และมี Application Vendor อยู่หลายราย อาทิ OpenLDAP, IBM, Oracle, Microsoft ซึ่ง Product ที่ได้รับความนิยมก็ได้แก่ Slapd ของ University of Michigan และ Openldap, Directory Server ของ Netscape, Active Directory (AD) ของ Microsoft, Novell Directory Services (NDS) ของ Novell, Sun Directory Services (SDS) ของ Sun และ Internet Directory Server (IDS) ของ Lucent
LDAP ได้รับการออกแบบมาให้อยู่บน TCP/IP Layer ที่มีเพียง 4 Layer ทำให้มีความต้องการ Resource น้อยกว่า DAP ของมาตรฐาน X.500 อย่างไรก็ตาม หากมีความต้องการติดต่อกันระหว่าง LDAP Client กับ X.500 Server จำเป็นจะต้องมีการติดต่อผ่าน Gateway ที่เรียกว่า LDAP Server ตามภาพ
จากภาพจะเห็นได้ว่า LDAP Server จะต้องมีความเข้าใจทั้ง TCP/IP และ OSI Model ในขณะที่ตัว LDAP Client ไม่จำเป็นต้องทำความเข้าใจกับ OSI Layer และไม่ต้องประมวลผลตาม DAP ที่มีความซับซ้อน และ Overhead สูง
สำหรับระบบที่ไม่มีการใช้ X.500 ก็สามารถมีเพียง LDAP Client กับ LDAP Server ซึ่งเรียกว่า LDAP stand-alone server ตามภาพด้านล่าง
จากตัวอย่างที่ 2 ตัวอย่างข้างต้น ทำให้เราเห็นว่า จากมุมมองของ Client แล้ว ไม่ว่า Directory ที่ access เข้าไปจะอยู่บน LDAP Server หรือ X.500 Server Client จะเรียก Directory เหล่านั้นว่า LDAP Directory และ เรียก Server นั้นว่า LDAP Server
LDAP Directory มีการจัดโครงสร้างแบบลำดับชั้น (Hierarchical) โดยข้อมูลจะถูกบรรจุอยู่ใน Entries ซึ่งแต่ละ Entry จะประกอบด้วย Attribute ในรูปของ
Entry จะถูกจัดไว้เป็นลำดับชั้นด้วย Distinguished name (DN) โดย Entry ใดๆที่อยู่ใต้ Entry อื่น จะมี DN ของ Entry อื่นเป็น Suffix (ข้อความที่ตามหลัง) Entry นั้น
Schema ของ Directory จะระบุ DN และระบุว่า แต่ละ Entry จะประกอบไปด้วย Attribute ใดบ้าง โดยกำหนด Schema จะกำหนดข้อมูลเหล่านี้ไว้ใน Object class ซึ่งได้แก่ List ของ Mandatory กับ Optional Attribute, วิธีการเปรียบเทียบ Attribute, ชนิดและขนาดของข้อมูลที่อนุญาต ซึ่งทุกๆ Entry จะต้องเชื่อโยงไว้กับ Object Class หนึ่ง Class รายละเอียดเพิ่มเติมของ Schema File มีอยู่ในหัวข้อ LDAP Schema
จาก Hierarchy ของ Directory ด้านบน Entry ที่มีสีแดงจะถูกระบุด้วย DN ดังนี้
dn: uid=bmarshal,ou=People,dc=pisoftware,dc=com
Attribute ส่วนใหญ่จะมีการใช้ตัวอักษรย่อระบุ type ซึ่งได้แก่ uid = User id, cn = Common Name, sn = Surname, l = Location, ou = Organizational Unit, o = Organization, dc = Domain Component, st = State, c = Country, etc. โดยข้อมูลเพิ่มเติมในส่วนนี้สามารถหาได้จาก RFC2256
เริ่มใช้งาน LDAP
โครงสร้างของ LDAP ประกอบด้วย Server และ Client ซึ่งในที่นี้เราเลือกใช้ Product ของ OpenLDAP ซึ่งเป็น LDAP Implementation แบบ Open Source ที่ได้รับความนิยมสูง โดยในชุดที่แจกจ่ายให้ Download นั้นจะประกอบด้วย Stand-alone server daemon, Stand-alone update replication daemon, Library และ ตัวอย่างของ Client รวมทั้ง Tools และ Utilities ต่างๆ ในส่วนของวิธีการติดตั้ง OpenLDAP ผู้ที่สนใจสามารถหาข้อมูลได้จาก Document ของ OpenLDAP ซึ่งมีพร้อมอยู่ใน Download package แล้ว
ในตัวอย่างนี้เราจะใช้ ระบบปฏิบัติการ Redhat Linux 9.0 ซึ่งเมื่อได้ทำการติดตั้งเรียบร้อยแล้ว จะมี OpenLDAP version 2.0.27 มาให้ด้วย โดยในส่วนของ LDAP Server จะเป็น Daemon process ที่ชื่อว่า slapd
1. วิธีการ Start/Stop slapd
slapd เป็น LDAP Server daemon ซึ่งทำหน้าที่รับ Object Query จาก Client และส่งข้อมูลของ Object ที่ Client นั้นต้องการ
1.1 วิธีการ Star slapd
1.1.1 Command line:
/usr/sbin/slapd
เช่น
/usr/sbin/slapd -f /etc/openldap/slapd.conf -d 255
หมายถึงให้ slapd ใช้ Configuration file ที่ Path /etc/openldap/slapd.conf โดยมี Debug level = 255 โดยข้อมูลเพิ่มเติมของการ execute slapd มีเพิ่มเติมที่ man page โดยใช้คำสั่ง 'man slapd'
1.1.2 Server Service:
ที่ Desktop ของ Linux ให้ไปที่ปุ่ม Main menu > System Settings > Server Settings > Services ที่เมนูด้านซ้ายจะมีรายชื่อของ Services ถ้าต้องการให้ Linux เรียก Service ใดในตอนเริ่ม boot เครื่องก็ให้ Check ถูกหน้าชื่อ Service นั้น หรือจะ Stop และ Restart โดยใช้ปุ่มบน Toolbar ด้านบนก็ได้ โดย slapd จะเป็น Service ที่ชื่อ ldap
1.2 วิธีการ Stop slapd
1.2.1 Command line:
kill -INT
เช่น kill -INT 5154
หรือ
kill -INT `cat /var/run/slapd.pid`
หากมีการเก็บค่า Process ID ไว้ที่ Path /var/run/slapd.pid โดยสามารถแก้ไขเป็น Path อื่นก็ได้โดยแก้ไขที่ File slapd.conf ที่ Path /etc/openldap
1.2.2 Server Service:
ใช้วิธีการเช่นเดียวกับการ Start Service
2. Configuration Files ที่จำเป็นในการ Run slapd
ในคำสั่งสำหรับ Start slapd นั้น เราจำเป็นต้องมีการระบุ Path ของ Configuration file ที่โดยทั่วไปจะตั้งชื่อว่า slapd.conf และสำหรับ Redhat 9.0 จะมี Default path อยู่ที่ /etc/openldap
ด้านล่างเป็นตัวอย่างของ Configuration file
01: include /etc/openldap/schema/core.schema
02: include /etc/openldap/schema/cosine.schema
03: include /etc/openldap/schema/inetorgperson.schema
04: include /etc/openldap/schema/nis.schema
05: include /etc/openldap/schema/redhat/rfc822-MailMember.schema
06: include /etc/openldap/schema/redhat/autofs.schema
07: include /etc/openldap/schema/redhat/kerberosobject.schema
08:
09: access to * by * write
10:
11: database ldbm
12: suffix "dc=cp25,dc=com"
13: rootdn "cn=ldapadm,dc=cp25,dc=com"
14: rootpw cp25
15: readonly off
16: access to * by * write
17: directory /var/lib/ldap
18: index objectClass,uid,uidNumber,gidNumber,memberUid eq
19: index cn,mail,surname,givenname eq,subinitial
Configuration File นี้มีตัวอย่างมาให้แล้วใน Path /etc/openldap/slapd.conf ซึ่งตัวอย่างด้านบนยกมาเฉพาะมีบรรทัดที่ไม่ถูก Comment ด้วย '#'
รายละเอียดของ การแก้ไข Configuration file สามารถอ่านเพิ่มเติมได้จาก OpenLDAP Administrator's Guide (ปัจจุบัน Version 2.2)
ใน Configuration file จะประกอบด้วย Directive ซึ่งหมายถึง Parameter ของ LDAP Server และค่าของ Directive หรือ Parameter เหล่านั้น ซึ่ง Directive มีทั้งหมด 2 ชนิด คือ
1. Global configuration directive : Directive กลางของ Directory ซึ่งจะถูก Apply ไปยังทุก Database (ในที่นี้หมายถึง Directory) แต่ถ้า Database มี Directive นี้อยู่แล้ว ก็จะ Over write Directive กลางนี้
2. Database directive : Directive ที่ Apply เฉพาะ Database นั้นๆ
Database directive สามารถมีได้หลายชุด โดยจะแยกออกจากกันด้วย Directive ชื่อ 'database' ซึ่งมี Database บางชนิดที่มี Directive เฉพาะ เช่น LDBM, Shell หรือ Password
สำหรับรายละเอียดของ Directive ที่ปรากฏในตัวอย่างมีดังนี้
1. Include (01-07) : Configuration file ของ LDAP นั้นสามารถ include file อื่นเข้ามาได้ ซึ่งในที่นี้เป็นการ Include Schema File ที่มีให้อยู่แล้ว โดย Schema File นั้นเป็น File ที่ระบุโครงสร้างของ Directory ว่าจะมี Object ใดบ้าง มี Attribute ใดบ้าง และมี Attribute Type เป็นอย่างไร เช่นเดียวกันกับ Schema ของ Database ที่จะระบุว่ามี Table ใดบ้าง มี Field ใดบ้างและมี Field Type เป็นอย่างไร รายละเอียดของ Schema File มีเพิ่มเติมที่ OpenLDAP Administrator's Guide (ปัจจุบัน Version 2.2) ที่หัวข้อ Schema Specification
2. Access level (09) : ระบุสิทธิ์ในการเข้าถึง Directory ของแต่ละ User ในที่นี้ระบุให้ทุก Directory (*) สามารถถูกแก้ไข (write) ได้โดยทุก User (*)
3. Database type (11) : ระบุชนิดของ Database ซึ่ง Openldap สามารถรองรับ Database ได้หลายชนิด อาทิ bdb, dnssrv, ldap, ldbm, meta, monitor, null, passwd, perl, shell, sql, และ tcl แต่สำหรับใน Linux นั้นเข้าใจว่ารองรับเฉพาะ ldbm, shell, และ passwd โดยในที่นี่ใช้ ชนิด ldbm
4. Suffix (12) : ระบุ Suffix ของ Query string "dc=cp25,dc=com" ว่าถ้ามี Query string ที่มี Suffix เป็นค่าดังกล่าว ก็จะมาใช้ Database ตัวนี้
5. Rootdn (13) : ระบุ User name ที่จะใช้ในการ Access เป็น Root ของ database นี้ โดยการระบุก็จะต้องเป็นไปตามการกำหนด Object ของ LDAP คือใช้ Distinguish name หรือ dn ในการระบุชื่อ Object เช่น "cn=ldapadm,dc=cp25,dc=com" หมายถึง Root มี common name (cn) เป็น ldapadm
6. Rootpw (14) : ระบุ Password ของ Root dn
7. Readonly (15) : ระบุสิทธิ์ Default ในการแก้ไขข้อมูล ซึ่งสิทธิ์ของ root โดย Default แล้วคือ Readonly = off
8. Access right (16) : สิทธิ์ในการเข้าถึงข้อมูล ซึ่งจะเห็นว่า Directive นี้ซ้ำกับ Global directive ซึ่งหาก Directive ของ Database มีค่าไม่เหมือนกันกับ Global directive ก็จะยึด Directive ของ Database เป็นหลัง
9. Directory (17) : Path ที่ใช้เก็บ Database file
หากมี Database อื่นอีกก็สามารถกำหนดเพิ่มได้ โดยเริ่มต้นจาก Directive 'database' นั่นเอง
เราสามารถทดสอบการ LDAP Service ว่า Start ได้สำเร็จหรือไม่โดยใช้ LDAP Browser โดยหาก Connect สำเร็จก็จะมีชื่อ Suffix ปรากฏให้เห็น แต่จะยังไม่สามารถ Browse ดูได้เนื่องจากเรายังไม่ได้สร้าง Directory โดยการ Add Object และ Attribute
LDAP Directory
หลังจากเราสามารถ Run LDAP Service ได้สำเร็จแล้ว ขั้นตอนต่อไปคือการสร้าง Database หรือ Directory ด้วยการ Add Object หรือ Entry และ Attribute ลงไปใน LDAP Database ซึ่งวิธีการสร้าง Database นี้มีอยู่ 2 ประเภทคือแบบ Online กับแบบ Offline
1. การสร้าง Directory แบบ Online
ในขณะที่ LDAP Service กำลังทำงานอยู่นั้น เราสามารถใช้ Command line ในการเพิ่มหรือลบ Object หรือ Entry ที่มีอยู่ได้ รวมไปถึงการเพิ่ม Attribute ใหม่ๆ หรือแก้ไข Attribute เดิม คำสั่งในการเพิ่ม Object หรือ Entry ใหม่รวมทั้ง Attribute ของ Object หรือ Entry นั้น คือ 'ldapadd' ส่วนคำสั่งในการแก้ไข Object และ Attribute ที่มีมาให้กับ OpenLDAP คือ 'ldapmodify'
1.1 ldapadd
1.1.1 Syntax
คำสั่ง ldapadd มี Option จำนวนมาก ข้อมูลเพิ่มเติมสามารถหาได้จาก man page ด้วยคำสั่ง 'man ldapadd' โดยในตัวอย่างนี้จะขอเลือกใช้เฉพาะ Option พื้นฐานที่จำเป็นก่อนดังนี้
ldapadd [-h host] [-p port] [-P version] [-F] [-x] [-D binddn] [-w password] [-f file]
ความหมายของ Option ด้านบนเป็นดังนี้
-h ldap : ระบุ IP ของ LDAP Server
-p port : ระบุ Port ของ LDAP Server (Default คือ 389)
-P version : ระบุ Version ของ Protocol (ปัจจุบัน 3 หรืออาจจะใช้ 2 ก็ได้)
-F : ระบุว่าทุก Command ที่สั่งให้ทำบน Directory จะถูกกระทำทั้งหมดโดยไม่สนใจลักษณะข้อมูลเดิมที่มีอยู่ (Force application)
-x : ระบุว่าใช้วิธีการ Authenticate User แบบปกติ
-D : ระบุ DN ที่ใช้ในการ Login เข้า Directory โดยแนะนำให้ใช้ของ Root ที่กำหนดไว้ใน slapd.conf
-w : ระบุ Password ของ DN ซึ่งหากใช้ rootdn ก็จะเป็น root password ตามที่กำหนดไว้ใน slapd.conf
-f file: ระบุ Path ของ LDIF File ซึ่งเป็น Fie ระบุรายละเอียดของ Object หรือ Entry และ Attribute ที่ต้องการเพิ่มเข้าไปใน Directory
*สำหรับ Option [-h host] [-p port] และ [-P version] นั้นอาจจะไม่จำเป็นต้องระบุก็ได้ ถ้าเราสั่ง ldapadd บน Local Host ที่ไม่มีการแก้ไข LDAP Port และทำ Operation ที่มีอยู่ร่วมกันทั้ง บน Protocol ทั้ง 2 version
1.1.2 LDIF File
LDIF File เป็น File ระบุข้อมูลที่ต้องการเพิ่มลงไปใน Directory โดยข้อมูลดังกล่าวจะต้องสอดคล้องกันกับ Schema ที่กำหนด ตัวอย่างของ LDIF File มีดังนี้
test.ldif
# cp25, com
dn: dc=cp25,dc=com
objectClass: domain
dc: cp25
# Somchai's Entry
dn: cn=Somchai Kamdee,dc=cp25,dc=com
cn: Somchai Kamdee
cn: Chai
objectClass: person
sn: Kamdee
# Somsri's Entry
dn: cn=Somsri Kamdee,dc=cp25,dc=com
cn: Sri Kamdee
cn: Somsri Kamdee
objectClass: person
sn: Kamdee
# Somjit's Entry
dn: cn=Somjit J Kamdee,dc=cp25,dc=com
cn: Jit Kamdee
cn: Jit
objectClass: person
sn: Kamdee
Format ของ LDIF File สามารถหาได้เพิ่มเติมจาก The LDIF text entry format โดยหลังจากเรามี LDIF File แล้วก็สามารถเรียกให้ ldapadd ทำงานได้ดังนี้
ldapadd -F -x -D "cn=ldapadm,dc=cp25,dc=com" -w cp25 -f test.ldif
ซึ่งหากการสร้าง Database ประสบความสำเร็จ เราก็จะสามารถใช้ LDAP Browser เปิดดูข้อมูลได้
วันอังคารที่ 26 มกราคม พ.ศ. 2553
ติดตั้ง Windows SharePoint Services 3.0
• ทำความรู้จักกับ Windows SharePoint Services 3.0
Windows SharePoint คือ Web Application ที่ทำหน้าที่ในการให้บริการการสื่อสาร การจัดการเนื้อหา การอำนวยความสะดวกให้กับทีม โดยการสร้าง website จาก template สำเร็จรูป เพื่อรวบรวมเอกสารต่างๆ เข้าด้วยกันสำหรับการทำงานร่วมกันเป็นทีม ตัวอย่างเช่น Meeting site สำหรับการประชุมผ่านทาง Website ซึ่งมีลักษณะโครงสร้างเหมือนการประชุมจริง โดยจะมีผู้ดำเนินการประชุมและผู้เข้าร่วมประชุม และมีเครื่องมืออำนวยความสะดวกต่างๆ เช่น
1. เครื่องมือสำหรับแจ้งเวียนเชิญและตอบรับการประชุม
2. รายการและวาระการประชุม
3. รายละเอียดเกี่ยวกับสถานที่ เอกสารแผนที่ และวิธรการเดินทางไปประชุมเป็นต้น
4. พื้นที่สำหรับจัดเก็บบันทึกการประชุม
Windows SharePoint นั้นจะประกอบด้วย 2 ผลิตภัณฑ์ คือ Windows SharePoint Services และ Windows SharePoint Portal Server ข้อแตกต่างในการทำงานระหว่าง Windows SharePoint Portal Server และ Windows SharePoint Services คือ WSPS นั้นจะประกอบด้วย Area, Site collection และ Personal site ในขณะที่ WSSS นั้นจะประกอบขึ้นมาจาก Site collection เพียงอย่างเดียว
Windows SharePoint Services Site
Site Collection คือ web site ที่ประกอบขึ้นมาจาก Top-level site , Subsite, และ content ของแต่ละ subsite รวมถึง Document Workspace และ Meeting Workspace
Top-level site คือ Web site ที่ถูกสร้างขึ้นใน WSS ที่ไม่อยู่ภายใต้ site อื่นๆ โดยที่ Top-level site นั้น สามารถมี Subsite อยู่ภายใต้ได้ และ subsite ที่อยู่ภายใต้ Top-level site นั้น สามารถมี subsite ได้
Subsite คือ Web site ที่ถูกสร้างขึ้นภายใต้ Top-level site บางครั้งเรียกว่า workspace โดยที่ subsite นั้นอาจมี element ต่างๆ เหมือนกันกับ Top-level site ได้ แต่อย่างไรก็ตาม subsite นั้น โดยส่วนมากจะใช้งานในการนำเสนอข้อมูลต่างๆ ของส่วนงานย่อยขององค์กร ตัวอย่าง เช่น ฝ่าย Engineering ประกอบด้วยส่วนงาน Electrical Engineering, Computer Engineering, Mechanical Engineering ดังนั้น Top-level site คือ Engineering และ มี 3 Subsite คือ Electrical Engineering site, Computer Engineering site , Mechanical Engineering site
*Metadata คือ ข้อมูลที่อธิบายถึงรายละเอียดของเอกสารหรือเนื้อหา
Site Group
Site Group คือ กลุ่มของผู้ใช้ โดยจะใช้ site group ในการกำหนดสิทธิในการใช้งาน site collection ของผู้ใช้ โดย site group ของ Windows SharePoint Service นั้นมี 5 กลุ่ม คือ
1. Reader = อ่านได้อย่างเดียว
2. Contributor = สามารถเพิ่มเนื้อหา (Content) เข้าใน List และ Document Library ได้
3. Web Designer = สามารถสร้าง Document Library และปรับแต่งหน้า website ได้
4. Administrator = มีสิทธิการใช้งานสูงสุด สามารถจัดการ WSPS ได้ทุกอย่าง
5. Custom Group = มีสิทธิการใช้งานต่างๆ ตามการกำหนดของ Administrator
การใช้งาน Windows SharePoint Services 3.0
ก่อนทำการติดตั้ง Windows SharePoint Services 3.0 นั้น ต้องทำการติดตั้งและคอนฟิก
1. Internet Information Services (IIS)
2. Microsoft .NET Framework 2.0 and Microsoft .NET Framework 3.0
การคอนฟิกวินโดวส์เซิร์ฟเวอร์ 2003 ให้เป็นเว็บเซิร์ฟเวอร์
ในวินโดวส์เซิร์ฟเวอร์ 2003 นั้น Internet Information Services (IIS) จะไม่ถูกติดตั้งโดยอัตโนมัติพร้อมกับระบบปฏิบัติการ ดังนั้นหากต้องการให้เซิร์ฟเวอร์เป็นเว็บเซิร์ฟเวอร์ ต้องทำการติดตั้งด้วยตนเอง
การติดตั้งเว็บเซิร์ฟเวอร์(IIS 6.0) และคอนฟิกโหมดการทำงาน
ขั้นตอนการติดตั้ง IIS 6.0 และคอนฟิกให้ทำงานในโหมดไอโซเลต (Process Isolation Mode) มีดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Manage Your Server
2. บนหน้าต่าง Manage Your Server คลิก Add or remove a role
3. ในไดอะล็อก Preliminary Steps คลิก Next
4. ในไดอะล็อก Server Role คลิก Application server (IIS ASP.NET) จากนั้นคลิก Next.
5. ในไดอะล็อก Web Application Server Options ให้เลือก Enable ASP.Net จากนั้นคลิก Next.
6. ในไดอะล็อก Summary of Selections คลิก Next
7. ในไดอะล็อก This Server is Now an Application Server คลิก Finish.
8. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
9. ในหน้าต่าง Internet Information Services Manager คลิกที่เครื่องหมายบวก (+) ที่อยู่หน้าชื่อเซิร์ฟเวอร์ จากนั้นคลิกขวาที่โฟลเดอร์ Web Sites แล้วเลือก Properties จากชอร์ตคัทเมนู
10. ในไดอะล็อก Properties คลิกที่แท็ป Service
11. ในส่วน Isolation mode ให้เลือกเช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จากนั้นคลิก OK
หมายเหตุ:
เช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จะถูกเลือก () เฉพาะกรณีทำการอัพเกรดจาก IIS 5.0 บนวินโดวส์เซิร์ฟเวอร์ 2000 ไปเป็น IIS 6.0 บนวินโดวส์เซิร์ฟเวอร์ 2003 เท่านั้น ถ้าเป็นการติดตั้ง IIS 6.0 ใหม่นั้น IIS 6.0 จะทำงานในแบบไอโซเลต (Process Isolation Mode) โดยอัตโนมัติ
ติดตั้งไมโครซอฟต์ .NET Framework 2.0
Windows SharePoint Services ต้องการดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 (.NET Framework 2.0)ในการทำงาน ขั้นตอนการติดตั้งดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ดังนี้ (หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 2.0 Redistributable Package (x86) แล้วคลิก Download)
1.ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ดับเบิลคลิก dotnetfx.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 2.0 Setup คลิก Next
3. ในหน้า End-User License Agreement เลือกเช็คบ็อกซ์หน้า I accept the terms of the License Agreement จากนั้นคลิก Install
4. ในหน้า Setup Complete คลิก Finish
การคอนฟิก IIS ให้รองรับ ASP.NET 2.0
ถ้าหากเป็น Internet Information Services (IIS) มีการติดตั้งใช้งานอยู่ก่อนแล้ว ในการรัน Windows SharePoint Services จะต้องทำการเปิดใช้งาน ASP.NET v2.0 ก่อน ดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
2. ในหน้าต่าง IIS Manager ให้เลือกเว็บไซท์ที่ต้องการคอนฟิกให้ใช้งานงาน ASP.NET v2.0
ให้คลิกขวาที่เว็บไซท์ที่ต้องการจากนั้นคลิก Properties จากชอร์ตคัทเมนู
3. บนแท็ป ASP.NET ในช่อง ASP.NET version ให้เลือก 2.0.50727
4. คลิก Apply จากนั้นคลิก OK
การรีสตาร์ท IIS
1. คลิก Start จากนั้นคลิก Run
2. ในช่อง Open พิมพ์ cmd.exe จากนั้นคลิก OK
3. ที่คอมมานด์พรอมท์ให้พิมพ์ iisreset.exe จากนั้นกด ENTER
4. พิมพ์ exit จากนั้นกด ENTER เพื่อออกจากคอมมานต์พรอมท์
ติดตั้งไมโครซอฟท์ .NET Framework 3.0
หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 3.0 Redistributable Package (x86) แล้วคลิก Download
1. ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ดับเบิลคลิก dotnetfx3setup.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 3.0 Setup เลือกปุ่มเรดิโอ I have read and ACCEPT the terms of the License Agreement จากนั้นคลิก Install
3. คลิกบอลลูน Microsoft .NET Framework 3.0 Setup
4. ในหน้า Setup Complete คลิก Exit
ติดตั้ง Windows SharePoint Services 3.0 และ SQL Server 2005 Express
ในการติดตั้ง Windows SharePoint Services 3.0 แบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server) นั้นสามารถทำการติดตั้งโดยเลือกอ็อปชันการติดตั้งเดฟฟอลต์แบบ Basic ซึ่งการติดตั้งนั้นจะรวมการติดตั้ง SQL Server 2005 Express ด้วย ตามขั้นตอนดังนี้
1. หากยังไม่มีตัวติดตั้ง Windows SharePoint Services 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ จากนั้นให้ท่องไปยังโฟลเดอร์ที่เก็บไฟล์ที่ดาวน์โหลดมาแล้วให้รันไฟล์ SharePoint.exe
2. คลิก I accept the terms of this agreement จากนั้นคลิก Continue
3. คลิก Basic เพื่อทำการติดตั้งแบบแบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server)
4. เมื่อการติดตั้งแล้วเสร็จให้คลิก Close
5. ในหน้า SharePoint Products and Technologies Configuration Wizard คลิก Next
6. ในไดอะล็อก SharePoint Products and Technologies Configuration Wizard คลิก Yes
7. รอจนการทำงานของวิซาร์ดแล้วเสร็จ ซึ่งจะได้หน้า Configuration Successful ให้คลิก Finish.
จากนั้นให้ทดลองเปิดหน้าโฮมเพจของ SharePointโดยใช้ Internet Explorer เปิดหน้า http://servername ซึ่งอาจจะต้องใส่ชื่อผู้ใช้ (Username) และรหัสผ่าน (Password) สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์นั้น จะต้องทำการบายพาสเว็บไซต์ SharePoint ก่อนจึงจะสามารถเปิดโฮมเพจของ SharePoint ได้
การเพิ่มไซต์ SharePoint เข้ายังรายการ Intranet Sites
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Security ในช่อง Select a Web zone to view or change security settings คลิก Local intranet จากนั้นคลิก Sites
3. ในไดอะล็อกบ็อกซ์ Local intranet คลิก Advanced
4. ให้ลบเช็คบ็อกซ์ Require server verification (https:) for all sites in this zone ให้เป็น
5. ในช่อง Add this Website to the zone ให้พิมพ์ URL ของเว็บไซต์ (เช่น http://servername) จากนั้นคลิก Add
6. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
7. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
8. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
9. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
การบายพาส Proxy Serverสำหรับ Local Addresses
สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์ให้ทำการบายพาสเว็บไซต์ SharePoint ดังนี้
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Connections ในส่วน Local Area Network (LAN) Settings a คลิก LAN Settings
3. ในส่วน Proxy Server คลิกเช็คบ็อกซ์หน้า Bypass proxy server for local addresses ให้เป็น
4. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local Area Network (LAN) Settings
5. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
6. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
ทดลองใช้งาน Windows SharePoint Servic3.0
เมื่อทำการติดตั้ง Windows SharePoint Services 3.0 แล้วเสร็จ จากนั้นก็สามารถทดลองใช้งานโดยทำการเปิดดูหน้าโฮมเพจ เช่น http://servername ด้วย Internet Explorer และยังสามารถทำการเพิ่มเนื้อหาให้กับ SharePoint ไซท์ หรือทำการบริหาร SharePoint ไซท์ได้โดยใช้ Central Administration ตัวอย่างเช่น
1. เพิ่มผู้ใช้เข้ายังไซต์
2. ปรับแต่งโอมเพจและหน้าเว็บเพจต่างภายในไซท์
3. ทำการสร้างลิสต์รายการหรือห้องเก็บเอกสารและเพิ่มเนื้อหา
คุณสามารถใช้ Central Administration เพื่อทำการคอนฟิกเซิร์ฟเวอร์เพิ่มเติม ตัวอย่างเช่น
1. Configure incoming e-mail settings ซึ่งจะช่วยให้ผู้ใช้สามารถส่งเนื้อหาไปยัง SharePoint ผ่านทางอีเมล์ หรือทำการส่งอีเมล์ไปยังสมาชิกทั้งหมดของไซท์ SharePoint
2. Configure e-mail alert settings เมื่อทำการคอนฟิก e-mail alert จะทำให้ผู้ใช้สามารถลงชื่อเพื่อรับอีเมล์แจ้งเตือนเมื่อมีการเปลี่ยนแปลงเนื้อหาภายในไซท์
3. Configure antivirus protection settings ถ้าเซิร์ฟเวอร์ได้ติดตั้งโปรแกรมป้องกันไวรัสซึ่งสามารถใช้งานร่วมกันกับ Windows SharePoint Services ได้ ก็สามารถทำการคอนฟิกให้ทำการสแกนเอกสารต่างๆ เมื่อทำการอัพโหลดขึ้นไปยังหรือดาวน์โหลดจาก SharePoint ได้
.NET Framework Developer Center
โฮมเพจ .NET Framework เว็บไซต์ http://msdn.microsoft.com/en-us/netframework/default.aspx
เว็บไซต์สำหรับดาวน์โหลด .NET Framework
• Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 22.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 55 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
• Microsoft .NET Framework Version 2.0 Redistributable Package (x64)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: NetFx64.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 45.2 MB
เวลาในการดาวน์โหลดโดยประมาณ: 1 ชั่วโมง 51 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=B44A0000-ACF8-4FA1-AFFB-40E78D788B00&displaylang=en
• Microsoft .NET Framework 3.0 Redistributable Package (bootstrapper)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx3setup.exe
เวอร์ชัน: 3.0
วันที่ออก: 11/21/2006
ขนาดของไฟล์: 2.8 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en
• Microsoft .NET Framework 3.0 Service Pack 1
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx30SP1setup.exe
เวอร์ชัน: 3.0 SP1
วันที่ออก: 11/19/2007
ขนาดของไฟล์: 2.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 6 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&displaylang=en
• Microsoft .NET Framework 3.5
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotNetFx35setup.exe
เวอร์ชัน: 3.5
วันที่ออก: 11/20/2007
ขนาดของไฟล์: 2.7 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
SharePoint Services 3.0 Site group Microsoft .NET Framework 2.0 3.0 dotNetFx
• ทำความรู้จักกับ Windows SharePoint Services 3.0
Windows SharePoint คือ Web Application ที่ทำหน้าที่ในการให้บริการการสื่อสาร การจัดการเนื้อหา การอำนวยความสะดวกให้กับทีม โดยการสร้าง website จาก template สำเร็จรูป เพื่อรวบรวมเอกสารต่างๆ เข้าด้วยกันสำหรับการทำงานร่วมกันเป็นทีม ตัวอย่างเช่น Meeting site สำหรับการประชุมผ่านทาง Website ซึ่งมีลักษณะโครงสร้างเหมือนการประชุมจริง โดยจะมีผู้ดำเนินการประชุมและผู้เข้าร่วมประชุม และมีเครื่องมืออำนวยความสะดวกต่างๆ เช่น
1. เครื่องมือสำหรับแจ้งเวียนเชิญและตอบรับการประชุม
2. รายการและวาระการประชุม
3. รายละเอียดเกี่ยวกับสถานที่ เอกสารแผนที่ และวิธรการเดินทางไปประชุมเป็นต้น
4. พื้นที่สำหรับจัดเก็บบันทึกการประชุม
Windows SharePoint นั้นจะประกอบด้วย 2 ผลิตภัณฑ์ คือ Windows SharePoint Services และ Windows SharePoint Portal Server ข้อแตกต่างในการทำงานระหว่าง Windows SharePoint Portal Server และ Windows SharePoint Services คือ WSPS นั้นจะประกอบด้วย Area, Site collection และ Personal site ในขณะที่ WSSS นั้นจะประกอบขึ้นมาจาก Site collection เพียงอย่างเดียว
Windows SharePoint Services Site
Site Collection คือ web site ที่ประกอบขึ้นมาจาก Top-level site , Subsite, และ content ของแต่ละ subsite รวมถึง Document Workspace และ Meeting Workspace
Top-level site คือ Web site ที่ถูกสร้างขึ้นใน WSS ที่ไม่อยู่ภายใต้ site อื่นๆ โดยที่ Top-level site นั้น สามารถมี Subsite อยู่ภายใต้ได้ และ subsite ที่อยู่ภายใต้ Top-level site นั้น สามารถมี subsite ได้
Subsite คือ Web site ที่ถูกสร้างขึ้นภายใต้ Top-level site บางครั้งเรียกว่า workspace โดยที่ subsite นั้นอาจมี element ต่างๆ เหมือนกันกับ Top-level site ได้ แต่อย่างไรก็ตาม subsite นั้น โดยส่วนมากจะใช้งานในการนำเสนอข้อมูลต่างๆ ของส่วนงานย่อยขององค์กร ตัวอย่าง เช่น ฝ่าย Engineering ประกอบด้วยส่วนงาน Electrical Engineering, Computer Engineering, Mechanical Engineering ดังนั้น Top-level site คือ Engineering และ มี 3 Subsite คือ Electrical Engineering site, Computer Engineering site , Mechanical Engineering site
*Metadata คือ ข้อมูลที่อธิบายถึงรายละเอียดของเอกสารหรือเนื้อหา
Site Group
Site Group คือ กลุ่มของผู้ใช้ โดยจะใช้ site group ในการกำหนดสิทธิในการใช้งาน site collection ของผู้ใช้ โดย site group ของ Windows SharePoint Service นั้นมี 5 กลุ่ม คือ
1. Reader = อ่านได้อย่างเดียว
2. Contributor = สามารถเพิ่มเนื้อหา (Content) เข้าใน List และ Document Library ได้
3. Web Designer = สามารถสร้าง Document Library และปรับแต่งหน้า website ได้
4. Administrator = มีสิทธิการใช้งานสูงสุด สามารถจัดการ WSPS ได้ทุกอย่าง
5. Custom Group = มีสิทธิการใช้งานต่างๆ ตามการกำหนดของ Administrator
การใช้งาน Windows SharePoint Services 3.0
ก่อนทำการติดตั้ง Windows SharePoint Services 3.0 นั้น ต้องทำการติดตั้งและคอนฟิก
1. Internet Information Services (IIS)
2. Microsoft .NET Framework 2.0 and Microsoft .NET Framework 3.0
การคอนฟิกวินโดวส์เซิร์ฟเวอร์ 2003 ให้เป็นเว็บเซิร์ฟเวอร์
ในวินโดวส์เซิร์ฟเวอร์ 2003 นั้น Internet Information Services (IIS) จะไม่ถูกติดตั้งโดยอัตโนมัติพร้อมกับระบบปฏิบัติการ ดังนั้นหากต้องการให้เซิร์ฟเวอร์เป็นเว็บเซิร์ฟเวอร์ ต้องทำการติดตั้งด้วยตนเอง
การติดตั้งเว็บเซิร์ฟเวอร์(IIS 6.0) และคอนฟิกโหมดการทำงาน
ขั้นตอนการติดตั้ง IIS 6.0 และคอนฟิกให้ทำงานในโหมดไอโซเลต (Process Isolation Mode) มีดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Manage Your Server
2. บนหน้าต่าง Manage Your Server คลิก Add or remove a role
3. ในไดอะล็อก Preliminary Steps คลิก Next
4. ในไดอะล็อก Server Role คลิก Application server (IIS ASP.NET) จากนั้นคลิก Next.
5. ในไดอะล็อก Web Application Server Options ให้เลือก Enable ASP.Net จากนั้นคลิก Next.
6. ในไดอะล็อก Summary of Selections คลิก Next
7. ในไดอะล็อก This Server is Now an Application Server คลิก Finish.
8. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
9. ในหน้าต่าง Internet Information Services Manager คลิกที่เครื่องหมายบวก (+) ที่อยู่หน้าชื่อเซิร์ฟเวอร์ จากนั้นคลิกขวาที่โฟลเดอร์ Web Sites แล้วเลือก Properties จากชอร์ตคัทเมนู
10. ในไดอะล็อก Properties คลิกที่แท็ป Service
11. ในส่วน Isolation mode ให้เลือกเช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จากนั้นคลิก OK
หมายเหตุ:
เช็คบ็อกซ์หน้า Run WWW service in IIS 5.0 isolation mode จะถูกเลือก () เฉพาะกรณีทำการอัพเกรดจาก IIS 5.0 บนวินโดวส์เซิร์ฟเวอร์ 2000 ไปเป็น IIS 6.0 บนวินโดวส์เซิร์ฟเวอร์ 2003 เท่านั้น ถ้าเป็นการติดตั้ง IIS 6.0 ใหม่นั้น IIS 6.0 จะทำงานในแบบไอโซเลต (Process Isolation Mode) โดยอัตโนมัติ
ติดตั้งไมโครซอฟต์ .NET Framework 2.0
Windows SharePoint Services ต้องการดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 (.NET Framework 2.0)ในการทำงาน ขั้นตอนการติดตั้งดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ดังนี้ (หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 2.0 Redistributable Package (x86) แล้วคลิก Download)
1.ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 2.0 ให้ดับเบิลคลิก dotnetfx.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 2.0 Setup คลิก Next
3. ในหน้า End-User License Agreement เลือกเช็คบ็อกซ์หน้า I accept the terms of the License Agreement จากนั้นคลิก Install
4. ในหน้า Setup Complete คลิก Finish
การคอนฟิก IIS ให้รองรับ ASP.NET 2.0
ถ้าหากเป็น Internet Information Services (IIS) มีการติดตั้งใช้งานอยู่ก่อนแล้ว ในการรัน Windows SharePoint Services จะต้องทำการเปิดใช้งาน ASP.NET v2.0 ก่อน ดังนี้
1. คลิก Start คลิก All Programs คลิก Administrative Tools จากนั้นคลิก Internet Information Services (IIS) Manager
2. ในหน้าต่าง IIS Manager ให้เลือกเว็บไซท์ที่ต้องการคอนฟิกให้ใช้งานงาน ASP.NET v2.0
ให้คลิกขวาที่เว็บไซท์ที่ต้องการจากนั้นคลิก Properties จากชอร์ตคัทเมนู
3. บนแท็ป ASP.NET ในช่อง ASP.NET version ให้เลือก 2.0.50727
4. คลิก Apply จากนั้นคลิก OK
การรีสตาร์ท IIS
1. คลิก Start จากนั้นคลิก Run
2. ในช่อง Open พิมพ์ cmd.exe จากนั้นคลิก OK
3. ที่คอมมานด์พรอมท์ให้พิมพ์ iisreset.exe จากนั้นกด ENTER
4. พิมพ์ exit จากนั้นกด ENTER เพื่อออกจากคอมมานต์พรอมท์
ติดตั้งไมโครซอฟท์ .NET Framework 3.0
หากยังไม่มีตัวติดตั้งด็อทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ Microsoft Download Center Web site แล้วเลือก Microsoft .NET Framework Version 3.0 Redistributable Package (x86) แล้วคลิก Download
1. ในโฟลเดอร์ที่เก็บไฟล์ดอทเน็ตเฟรมเวิร์กเวอร์ชัน 3.0 ให้ดับเบิลคลิก dotnetfx3setup.exe จากนั้นคลิก Run เพื่อทำการติดตั้ง
2. ในหน้า Welcome to Microsoft .NET Framework Version 3.0 Setup เลือกปุ่มเรดิโอ I have read and ACCEPT the terms of the License Agreement จากนั้นคลิก Install
3. คลิกบอลลูน Microsoft .NET Framework 3.0 Setup
4. ในหน้า Setup Complete คลิก Exit
ติดตั้ง Windows SharePoint Services 3.0 และ SQL Server 2005 Express
ในการติดตั้ง Windows SharePoint Services 3.0 แบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server) นั้นสามารถทำการติดตั้งโดยเลือกอ็อปชันการติดตั้งเดฟฟอลต์แบบ Basic ซึ่งการติดตั้งนั้นจะรวมการติดตั้ง SQL Server 2005 Express ด้วย ตามขั้นตอนดังนี้
1. หากยังไม่มีตัวติดตั้ง Windows SharePoint Services 3.0 ให้ทำการดาวน์โหลดจากศูนย์ดาวน์โหลดของไมโครซอฟต์ จากนั้นให้ท่องไปยังโฟลเดอร์ที่เก็บไฟล์ที่ดาวน์โหลดมาแล้วให้รันไฟล์ SharePoint.exe
2. คลิก I accept the terms of this agreement จากนั้นคลิก Continue
3. คลิก Basic เพื่อทำการติดตั้งแบบแบบเซิร์ฟเวอร์เดี่ยว (Single stand-alone server)
4. เมื่อการติดตั้งแล้วเสร็จให้คลิก Close
5. ในหน้า SharePoint Products and Technologies Configuration Wizard คลิก Next
6. ในไดอะล็อก SharePoint Products and Technologies Configuration Wizard คลิก Yes
7. รอจนการทำงานของวิซาร์ดแล้วเสร็จ ซึ่งจะได้หน้า Configuration Successful ให้คลิก Finish.
จากนั้นให้ทดลองเปิดหน้าโฮมเพจของ SharePointโดยใช้ Internet Explorer เปิดหน้า http://servername ซึ่งอาจจะต้องใส่ชื่อผู้ใช้ (Username) และรหัสผ่าน (Password) สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์นั้น จะต้องทำการบายพาสเว็บไซต์ SharePoint ก่อนจึงจะสามารถเปิดโฮมเพจของ SharePoint ได้
การเพิ่มไซต์ SharePoint เข้ายังรายการ Intranet Sites
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Security ในช่อง Select a Web zone to view or change security settings คลิก Local intranet จากนั้นคลิก Sites
3. ในไดอะล็อกบ็อกซ์ Local intranet คลิก Advanced
4. ให้ลบเช็คบ็อกซ์ Require server verification (https:) for all sites in this zone ให้เป็น
5. ในช่อง Add this Website to the zone ให้พิมพ์ URL ของเว็บไซต์ (เช่น http://servername) จากนั้นคลิก Add
6. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
7. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Local intranet
8. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
9. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
การบายพาส Proxy Serverสำหรับ Local Addresses
สำหรับเครื่องคอมพิวเตอร์ที่ใช้งานอินเตอร์เน็ตผ่านพร็อกซี่เซิร์ฟเวอร์ให้ทำการบายพาสเว็บไซต์ SharePoint ดังนี้
1. ใน Internet Explorer ให้คลิกเมนู Tools แล้วคลิก Internet Options
2. บนแท็ป Connections ในส่วน Local Area Network (LAN) Settings a คลิก LAN Settings
3. ในส่วน Proxy Server คลิกเช็คบ็อกซ์หน้า Bypass proxy server for local addresses ให้เป็น
4. คลิก OK เพื่อปิดไดอะล็อกบ็อกซ์ Local Area Network (LAN) Settings
5. คลิก OK อีกครั้งเพื่อปิดไดอะล็อกบ็อกซ์ Internet Options
6. ให้คลิก Refresh บนทูลบาร์เมนูของ Internet Explorer เพื่อทำการรีเฟรช Internet Explorer
ทดลองใช้งาน Windows SharePoint Servic3.0
เมื่อทำการติดตั้ง Windows SharePoint Services 3.0 แล้วเสร็จ จากนั้นก็สามารถทดลองใช้งานโดยทำการเปิดดูหน้าโฮมเพจ เช่น http://servername ด้วย Internet Explorer และยังสามารถทำการเพิ่มเนื้อหาให้กับ SharePoint ไซท์ หรือทำการบริหาร SharePoint ไซท์ได้โดยใช้ Central Administration ตัวอย่างเช่น
1. เพิ่มผู้ใช้เข้ายังไซต์
2. ปรับแต่งโอมเพจและหน้าเว็บเพจต่างภายในไซท์
3. ทำการสร้างลิสต์รายการหรือห้องเก็บเอกสารและเพิ่มเนื้อหา
คุณสามารถใช้ Central Administration เพื่อทำการคอนฟิกเซิร์ฟเวอร์เพิ่มเติม ตัวอย่างเช่น
1. Configure incoming e-mail settings ซึ่งจะช่วยให้ผู้ใช้สามารถส่งเนื้อหาไปยัง SharePoint ผ่านทางอีเมล์ หรือทำการส่งอีเมล์ไปยังสมาชิกทั้งหมดของไซท์ SharePoint
2. Configure e-mail alert settings เมื่อทำการคอนฟิก e-mail alert จะทำให้ผู้ใช้สามารถลงชื่อเพื่อรับอีเมล์แจ้งเตือนเมื่อมีการเปลี่ยนแปลงเนื้อหาภายในไซท์
3. Configure antivirus protection settings ถ้าเซิร์ฟเวอร์ได้ติดตั้งโปรแกรมป้องกันไวรัสซึ่งสามารถใช้งานร่วมกันกับ Windows SharePoint Services ได้ ก็สามารถทำการคอนฟิกให้ทำการสแกนเอกสารต่างๆ เมื่อทำการอัพโหลดขึ้นไปยังหรือดาวน์โหลดจาก SharePoint ได้
.NET Framework Developer Center
โฮมเพจ .NET Framework เว็บไซต์ http://msdn.microsoft.com/en-us/netframework/default.aspx
เว็บไซต์สำหรับดาวน์โหลด .NET Framework
• Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 22.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 55 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
• Microsoft .NET Framework Version 2.0 Redistributable Package (x64)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: NetFx64.exe
เวอร์ชัน: 2.0
วันที่ออก: 1/22/2006
ขนาดของไฟล์: 45.2 MB
เวลาในการดาวน์โหลดโดยประมาณ: 1 ชั่วโมง 51 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=B44A0000-ACF8-4FA1-AFFB-40E78D788B00&displaylang=en
• Microsoft .NET Framework 3.0 Redistributable Package (bootstrapper)
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx3setup.exe
เวอร์ชัน: 3.0
วันที่ออก: 11/21/2006
ขนาดของไฟล์: 2.8 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en
• Microsoft .NET Framework 3.0 Service Pack 1
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotnetfx30SP1setup.exe
เวอร์ชัน: 3.0 SP1
วันที่ออก: 11/19/2007
ขนาดของไฟล์: 2.4 MB
เวลาในการดาวน์โหลดโดยประมาณ: 6 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?FamilyID=ec2ca85d-b255-4425-9e65-1e88a0bdb72a&displaylang=en
• Microsoft .NET Framework 3.5
รายละเอียดการดาวน์โหลด
ชื่อไฟล์: dotNetFx35setup.exe
เวอร์ชัน: 3.5
วันที่ออก: 11/20/2007
ขนาดของไฟล์: 2.7 MB
เวลาในการดาวน์โหลดโดยประมาณ: 7 นาที (Dial-up 56K)
ภาษา: อังกฤษ และอีก 23 ภาษา
ดาวน์โหลดลิงก์: http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
SharePoint Services 3.0 Site group Microsoft .NET Framework 2.0 3.0 dotNetFx
วันจันทร์ที่ 25 มกราคม พ.ศ. 2553
Remove or modify the arrow used on shortcuts in Windows X
Click Start, Run and type Regedit.exe
Navigate to the following key
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Shell Icons
Backup the key by exporting it to a file
In the right-pane, create a new String value named 29
Double-click 29 and set its Value data as:
C:\Windows\System32\shell32.dll,50
(shell32.dll,50 is a empty icon)
Close Registry Editor.
To apply the changes instantly, follow this
Right-click Desktop, choose Properties
Click the Appearance Tab.
Click Advanced button
Choose Icon from the drop-down list
Set it's size to 31 and press OK, OK.
Navigate to the following key
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Shell Icons
Backup the key by exporting it to a file
In the right-pane, create a new String value named 29
Double-click 29 and set its Value data as:
C:\Windows\System32\shell32.dll,50
(shell32.dll,50 is a empty icon)
Close Registry Editor.
To apply the changes instantly, follow this
Right-click Desktop, choose Properties
Click the Appearance Tab.
Click Advanced button
Choose Icon from the drop-down list
Set it's size to 31 and press OK, OK.
สมัครสมาชิก:
บทความ (Atom)