Change Physical Path of an app in IIS. With APPCMD you can add, modify and delete Virtual Directories and Virtual Applications.
To change the physical path of a virtual application:
appcmd.exe set app "Default Web Site/app" -[path=’/’].physicalpath:C:\path
Where:
app is the name of your application;
path to app is the location where your app is located. In case there are spaces in the application name, or directory structure, use quotes.
appcmd.exe set app "Default Web Site/App" -[path=’/’].physicalpath:"C:\inetpub\wwwroot\Web App"