I hv create an application using C#, Asp.Net (VS2005), While Im creating setup project for that application, I add Custom Installer Class (for getting user input and update my web.config connection string at the time of installation). Its working fine. (the custom installer class automatically crates a file in application's bin folder named CustomInstaller.InstallState when install - I dont know how any why)

But when I am uninstalling the application, the UnInstaller process wont remove the physical folder in my wwwroot folder, and it wont remove the virtual dir also (Because the file CustomInstaller.InstallState didn't get removed from the bin folder)

Now I need to remove all the physical directory and the virtual dir, when i uninstall the application. (I plan to get the physical path of the application and the virtual directory name when install, so that I can store that in a text file and can use it when install), but I cant get the physicall path of that vDir,

Any Idea pls..
Thank you in advance

Recommended Answers

All 2 Replies

to find the physical path, you have to know where it is based from the root of the folder. THen you can create a dummy aspx page to find your virtual path. THe dummy page will contain:

<%= server.MapPath("/vdir/") %>

This will show you the physical path to the vdir.

This approach will fail for virtual paths that maps to physical paths with more that 260 characters long. I have not found a work around for it yet.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.