Page 1 of 1

IIS and Virtua Folder

Posted: Wed Sep 14, 2005 8:22 am
by mqk
During the installation, I created Virtual Folder on an existing WebSite using its index. The Site index is stored in a variable called $SITE_INDEX$, and the the code for creating Virtual Folder as follows:

Code: Select all

Create Virtual Folder "TEST" in IIS Site #$SITE_INDEX$, pointing to physical location $TARGETDIR$


But unfortunately, on uninstallation I'm not able to delete Virtual Folder, which has been created on installation. The code is:

Code: Select all

Delete Virtual Folder "TEST" in IIS Site #$SITE_INDEX$


On uninstallation, I found that the variable $SITE_INDEX$ is empty!!

Any help?

Thanks in advance

Posted: Wed Sep 14, 2005 8:33 am
by sinan
Just read the site index again upon uninstall.

Posted: Tue Sep 20, 2005 8:06 am
by mqk
I tried many time to read the Site index but I couldn't, I got an empty variable.

The idea is, we have different website, and then I choosed one to create Virtual Folder. So on the uninstall how can I get the same site index that I used on install, please can you explain with a piece of code.

Thanks in advance,

Posted: Tue Sep 20, 2005 8:15 am
by sinan
I assume you are reading the site index when installing? Just copy-paste the same code into the part where you do the uninstall.

Also, if you are creating new sites as well, you may use a hard coded site index.