# How to change physical path of virtual directory in IIS7

When you have multiple websites and each of them maps the same physical path as virtual directory, how to quickly change the physical path of that virtual directory for all websites? Note: I don't want to do use IIS Manager. I tried changing the path (find and replace) in %SYSTEM%\system32\inetsrv\config\applicationHost.config, then restarted IIS, but the change hasn't taken effect. What am I missing?

-
You can answer your own question with the solution, then mark your question as complete. –  Simon Sheehan Nov 29 '11 at 0:03