戰地連結︰ Home My Flickr NBA.com About

顯示包含「Misc. IT stuff」標籤的文章。顯示所有文章
顯示包含「Misc. IT stuff」標籤的文章。顯示所有文章

2009年10月7日星期三

Unlock files used by processes

Overview

I think most of the Windows users have seen the screen saying that “Cannot delete XXX: It is being used by another person or program”. This is quite annoying as you don’t have a clue what is actually locking the file. Now I would like to share some of the programs I used (or heard) to solve this problem.

Reference

Unlocker - http://ccollomb.free.fr/unlocker/

It is a very nice program which add a extensions to your Windows Explorer, so that you can right-click on any file/folder and select the “unlocker” option. It will shows all processes locking the file for your to decide what to do next. However the latest version (1.8.7) does not supports 64-bit OS.

LockHunter - http://lockhunter.com/

LockHunter is a similar tool to Unlocker, Windows Explorer extensions. However it works for both 32-bit and 64-bit OS, and it delete files to recycle bin.

Process Explorer - http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Finding what files (handles) is used by a process is just one of the features of Process Explorer. As it actually shows much more information than the list of handles used. Because it is more powerful, it is also more complicated to use.

To use Process Explorer for unlocking files from processes, following the steps below:

  1. Select "Find" –> "Find Handle or DLL"
  2. Enter the full path of the file as the Handle substring, click "Search"
  3. For each of the search results that match the file you want to delete, right-click on the handle and choose "Close Handle"
  4. Done! However I recommend using “LockHunter” if you ONLY want to unlock files. ;-)

2009年7月22日星期三

Installing Driver for Legacy Network Adapter on Win2k3 x64 VPC (Hyper-V)

Overview

I installed a 64-bit Windows 2003 R2 Enterprise SP2 on one of my Hyper-V VPC, and add a Legacy Network Adaptor to it. However the network adapter is not automatically installed in the x64 win 2k3 because its driver is not available.

With some Googling I found that 64-bit version of win 2k3 and xp are not supported with corresponding Legacy Network Adaptor driver. Someone suggested a workaround by using the equivalent Vista driver (both x86 and x64).

So I go the driver files from a machine running on x86 Vista and tried it. But the driver installation terminated with Error: "Driver not intended for this platform".

Suspecting this maybe due to the x86/x64 difference, I got another set of driver files from a x64 Windows Server 2008. This time the driver installation ran smoothly and the Network Adaptor works well!

Directory containing Legacy Network Adaptor driver:

Vista:
%windir%\system32\driverstore\FileRepository\dc21x4vm.inf_7d8c6569

Windows Server 2008:
%windir%\system32\driverstore\FileRepository\dc21x4vm.inf_e14caac7

Reference

Windows XP x64 in Hyper-V - Network Drivers

2009年5月29日星期五

Moved files cannot inherit destination folder's permission, but copied files can.

Overview

When I want to share a file with others in the same network, I move the file to my shared folder. However, sometimes I receive complains from my colleagues saying that they don't have permission to read the shared files.

At the end, I found that a copied file can inherit the permission of the destination folder, but a moved file cannot. I think that it is because the copy action create a new file while the move action (within same volume) only change the hosting folder of the original file.

With some googling, I found that this behaviors is documented by Microsoft. The article also provide a way to change this behavior by modifying registry.

Reference

How permissions are handled when you copy and move files and folders

Step

Let moved files inherit destination folder's permission like copied files

  1. Run "regedit" (Fire up Registry Editor)
  2. Go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
  3. Add a "DWORD" value with name "MoveSecurityAttributes" and Value "0"

2009年2月14日星期六

Cannot view the contents of a (.chm) file

Overview

I just get an e-book and find that all of the pages are dead. With some searching I find that the file is blocked by windows.

The solution is to unlock the .chm file. To do this:

  1. Right-click on the .chm file, select "Properties"
  2. Click "unlock"
  3. Done!

Reference

解决打开CHM格式文件出现“网页不能浏览”错误的方法

You cannot open HTML Help files....

2008年9月11日星期四

香港寛頻轉IP方法

(轉用香港話...)

前幾日見到呢個blog講點樣可以轉香港寬頻派俾我地既IP, 本來我都以為香港寬頻係用static IP無得轉. 點知仲有個咁簡單既方法, 真係道高一尺....

來原

香港寬頻轉IP方法

轉ip方法簡介

  1. 按 "開始" -> "執行" -> "輸入 cmd"
  2. 彈出 Command Prompt, 輸入 ipconfig/all
  3. 記低 "Physical Address"
  4. 到 "控制台" -> "網路連線" -> right-click "區域連線" -> "內容"
  5. 0向 "區域連線 內容" 內, 按 "設定", 再選 "進階"
  6. 在新彈出來既視窗中, 於左面 "內容" 選 "本地管理位址"
  7. 在右面 "數值" 下填上之前記低既 "Physical Address"
  8. 在填上既 "Physical Address" 入面, 隨意更改一個數字或字母
    (輸入的數值只可以是十六進制, 即是 0-9 或 A-F, 並且如原來數字是雙數, 就填雙數, 否則填單數)
  9. 按 "確定", 檢查 IP 係咪改左, 完成

2008年8月21日星期四

Sending test email through Telnet

Overview

How to test if a SMTP server function properly in sending email? The simplest way is to send a test email. In this blog I will talk about how to send a simple test email by Telnet to the SMTP server.

Reference

How Simple is SMTP?

Steps

  1. Start a Telnet connection to the SMTP server by using the following command in command prompt:
    telnet $smtp_server_ip$ $port$
    Note that the ip & port is separated by a "space" but not "colon", For SMTP server, the port is "25"
  2. Once the connection is established, type in "HELO" or "EHLO" before enter other commands
  3. After saying hello, we can use the following command to specify the email sender:
    MAIL FROM: sender@domain.com
  4. Next we can specify the receiver by the following command:
    RCPT TO: receiver@domain.com
  5. Now the last thing to do is entering the mail body, you can enter your mail after sending this command:
    DATA
  6. After you enter command "DATA", the server will tell you to enter mail and indicate how to end the mail body. Follow it and the server will reply that your email is on its way!
  7. After all is done, enter "QUIT" to close the connection.

2008年7月15日星期二

Lock-down Internet Explorer with password

Overview

You can prevent others from using IE to surf the Internet by using its built-in "Content Advisor". A Supervisor password can be set to control the usage of IE.

Reference

Yahoo! Answers: Block other users from accessing the Internet Explorer

HOW TO: Use the Internet Explorer 6 Content Advisor to Control Access to Web Sites in Internet Explorer

Steps (For IE 7)

  1. Open up Internet Explorer
  2. Click Tools
  3. Click Internet Options
  4. Click on the tab Content
  5. Underneath 'Content Advisor', Click Enable
  6. Then click on the tab General
  7. Under 'Supervisor Password click Create
  8. Make you password then click Ok.
  9. Then Apply and finally Ok