.. meta:: :description: User xiaoc1026 wants to know how to access IIS to get the home directory of the FTP web site in Visual C++. Getting local FTP home directory from IIS programmatically ========================================================== .. post:: 22, Nov, 2009 :tags: IIS :category: Win32 :author: me :nocomments: User xiaoc1026 `wants to know `__ how to access `IIS `__ to get the `home directory `__ of the `FTP `__ web site in `Visual C `__\ ++. Before IIS6 you need to access the `metadata `__ in IIS configuration via `IMSAdminBase::GetData `__. The hard part to find the path of the IIS setting. Before IIS 6, the metadata isn’t saved in `XML `__. However you can `search the path of a property though the admin script `__. You can find the `path property `__ from the IIS metadata propertiy reference documentation. The IIS WMI provider, introduced in IIS6, makes the query a lot easier. Now you can query for `IIsFtpVirtualDirSetting.Path `__ directly, though querying metadata should still work.