Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Removed nested child folders still in IIS MetaBase

$
0
0

 

 Hi

 I develop install scripts for IIS.

 Now when I deploy a virtual directory with nested(child) virtual directories, it works fine. (using InstallShield)

But I have a problem  when I try it re-install it.

After a successfully deploy, I want to fully re-deploy, so I

  • Go to IIS Manager and right-mouse-click the deployed parent virtual folder, then select
    • Deploy-> Delete Application and Content

This removes the deployed parent virtual directory from the IIS Metabase and the all relevant physical folders.

But if I run the script  below I can still see the deployed nested virtual directories, but not the parent virtual directory.

If I add the parent  virtual directory and nested virtual directories through IIS Manager, Deploy-> Delete Application and Content then run the script below again; then neither parent  virtual directory nor nested virtual directories are in the IIS MetaBase.

I want my script to behave like IIS Manager when I add  nested set of  virtual directories,

It may not be me or my script that removes the deployed nested set of  virtual directories via IIS Manager.

So I am obviously missing a property setting  somewhere.

What would that property be?

 Code:

===========================================================================================================

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftIISv2")
Set colItems = objWMIService.ExecQuery( _"SELECT * FROM IIsWebVirtualDirSetting",,48)
For Each objItem in colItems
        Wscript.Echo "Name: " & objItem.Name & " -> browsing Enabled: " & objItem.EnableDirBrowsing
Next

===========================================================================================================

Regards

GregJF

Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>