MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Icon Tools[Next]: Install Assistant.EXE
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Tips and Tricks->Tools->IisDumpMetaBase.VBS

IisDumpMetaBase.VBS

This tool can be used to dump all or parts of a local or remote computer's IIS metabase from the command line. The output can be used to determine the available properties (options) variable names.

You could use it to capture a before snapshot, manually make IIS changes and compare an after snaphot with the before to identify changes. This helps make up for documentation deficiencies.

The properties can be used in the "ADSI" command when creating IIS web sites etc.

To work out what methods might be available specific to an object use the dumped class name (for example "IIsComputer") to search for documentation.

Note that I have seen a Windows (IIS) bug which caused a "IisFilters" object to be reported as a "IIsWebDirectory", if this sort of thing happens its good to have a second opinion and the "IIS MetaBase Editor" could be used for this.

Command Line

This command can actually dump any ADSI object(s) and not just IIS ones (for example dump an Aactive Directory organisational unit via an LDAP query).

The default root object is "IIS://LocalHost" (local computer), this and all child objects are dumped. You may specify a single alternative (AdsPath) on the command line, for example:

cscript.exe //NoLogo "%MAKEMSI_DIR%IisDumpMetaBase.VBS" "IIS://LocalHost/W3SVC/1"

Normally an object and all its child objects are dumped, if you don't want to process the whole tree then preceed the "AdsPath" with a "-" (minus) character, for example:

cscript.exe //NoLogo "%MAKEMSI_DIR%IisDumpMetaBase.VBS" "-IIS://LocalHost/W3SVC/1"

Note that for some unknown reason (ADSI bug suspected) using "IIS:" as a root causes a protection violation (process dies) while processing "IIS://LocalHost".

The following is an example of how it might be invoked without parameters and redirecting the output to a file:

cscript.exe //NoLogo "%MAKEMSI_DIR%IisDumpMetaBase.VBS" > "Before.TXT" 2>&1
notepad "Before.TXT"

The following is a non-IIS example:

cscript.exe //NoLogo "%MAKEMSI_DIR%IisDumpMetaBase.VBS" "-WinNT://%computername%"

MetaBase in IIS 6+ is XML

Note that the metabase in IIS version 6 onwards is an XML file called "c:\windows\system32\inetsrv\MetaBase.xml". The "History" subdirectory in the same location holds backups.

Example: Partial Dump Output

It is usually pretty simple to either work out valid values or to look up a property name in google to find an example once you know what you are looking for...

[]--------------------------------------------[]
| IisDumpMetaBase.VBS v05.127 by Dennis Bareis |
[]--------------------------------------------[]

Getting ADSI Object : IIS://LocalHost/W3SVC/1


====[ START DUMP "1"]=============================
ADSI properties
~~~~~~~~~~~~~~~
  * AdsPath = IIS://LocalHost/W3SVC/1
  * Class   = IIsWebServer
  * GUID    = {8B645280-7BA4-11CF-B03D-00AA006E0975}
  * Parent  = IIS://LocalHost/W3SVC

218 Optional Properties
~~~~~~~~~~~~~~~~~~~~~~~
  * AccessExecute = False
  * AccessFlags = 1
  * AccessNoRemoteExecute = False
  * AccessNoRemoteRead = False
  * AccessNoRemoteScript = False
  * AccessNoRemoteWrite = False
  * AccessRead = True
  * AccessSSL = False
  * AccessSSL128 = False
  * AccessSSLFlags = 0
  * AccessSSLMapCert = False
  * AccessSSLNegotiateCert = False
  * AccessSSLRequireCert = False
  * AccessScript = False
  * AccessSource = False
  * AccessWrite = False
  * AdminACL = False
  * AdminACLBin (array):
    => 1
    => 0
    => 7
       <Snipped>
    => 0
  * AllowKeepAlive = True
  * AllowPathInfoForScriptMappings = False
  * AllowTransientRegistration = False
  * AnonymousPasswordSync = True
  * AnonymousUserName = IUSR_COMPNAME
  * AnonymousUserPass = y%ZEmMe@rk#i$Z
  * AppAllowClientDebug = False
  * AppAllowDebugging = False
  * AppAutoStart = True
  * AppFriendlyName =
  * AppIsolated = 2
  * AppOopRecoverLimit = -1
  * AppPackageID =
  * AppPackageName =
  * AppPoolId =
  * AppRoot =
  * AppWamClsid =
  * AspAllowOutOfProcComponents = True
  * AspAllowSessionState = True
  * AspBufferingLimit = 134217728
  * AspBufferingOn = True
  * AspCodepage = 0
  * AspDiskTemplateCacheDirectory = %windir%\system32\inetsrv\ASP Compiled Templates
  * AspEnableApplicationRestart = True
  * AspEnableAspHtmlFallback = False
  * AspEnableChunkedEncoding = True
  * AspEnableParentPaths = True
  * AspEnableTypelibCache = True
  * AspErrorsToNTLog = False
  * AspExceptionCatchEnable = True
  * AspKeepSessionIDSecure = False
  * AspLCID = 2048
  * AspLogErrorRequests = True
  * AspMaxDiskTemplateCacheFiles = 1000
  * AspMaxRequestEntityAllowed = 1073741824
  * AspProcessorThreadMax = 25
  * AspQueueConnectionTestTime = 3
  * AspQueueTimeout = -1
  * AspRequestQueueMax = 3000
  * AspScriptEngineCacheMax = 125
  * AspScriptErrorMessage = An error occurred on the server when processing the URL.  Please contact the system administrator.
  * AspScriptErrorSentToBrowser = True
  * AspScriptFileCacheSize = 250
  * AspScriptLanguage = VBScript
  * AspScriptTimeout = 90
  * AspSessionMax = -1
  * AspSessionTimeout = 20
  * AspThreadGateEnabled = False
  * AspThreadGateLoadHigh = 80
  * AspThreadGateLoadLow = 50
  * AspThreadGateSleepDelay = 100
  * AspThreadGateSleepMax = 50
  * AspThreadGateTimeSlice = 1000
  * AspTrackThreadingModel = False
  * AuthAnonymous = True
  * AuthBasic = False
  * AuthFlags = 1
  * AuthMD5 = False
  * AuthNTLM = False
  * AuthPersistSingleRequest = False
  * AuthPersistSingleRequestAlwaysIfProxy = False
  * AuthPersistSingleRequestIfProxy = True
  * AuthPersistence = 128
  * CGITimeout = 300
  * CPUAppEnabled = True
  * CPUCGIEnabled = True
  * CPUCGILimit = 0
  * CPUEnableActiveProcs = True
  * CPUEnableAllProcLogging = True
  * CPUEnableAppLogging = False
  * CPUEnableCGILogging = False
  * CPUEnableEvent = True
  * CPUEnableKernelTime = True
  * CPUEnablePageFaults = True
  * CPUEnableProcType = True
  * CPUEnableTerminatedProcs = True
  * CPUEnableTotalProcs = True
  * CPUEnableUserTime = True
  * CPULimitLogEvent = 0
  * CPULimitPause = 0
  * CPULimitPriority = 0
  * CPULimitProcStop = 0
  * CPULimitsEnabled = False
  * CPULoggingEnabled = False
  * CPULoggingInterval = 60
  * CPULoggingMask = 255
  * CPULoggingOptions = 1
  * CPUResetInterval = 1440
  * CacheControlCustom =
  * CacheControlMaxAge = 0
  * CacheControlNoCache = False
  * CacheISAPI = True
  * CertCacheRetrievalOnly = False
  * CertCheckMode = 0
  * CertCheckRevocationFreshnessTime = False
  * CertNoRevocCheck = False
  * CertNoUsageCheck = False
  * ClusterEnabled = False
  * ConnectionTimeout = 900
  * ContentIndexed = True
  * CreateCGIWithNewConsole = False
  * CreateProcessAsUser = True
  * DefaultDoc = Default.htm,Default.asp,index.htm,iisstart.asp
  * DefaultDocFooter =
  * DefaultLogonDomain =
  * DirBrowseFlags = 1073741886
  * DirBrowseShowDate = True
  * DirBrowseShowExtension = True
  * DirBrowseShowLongDate = True
  * DirBrowseShowSize = True
  * DirBrowseShowTime = True
  * DisableSocketPooling = True
  * DoDynamicCompression = False
  * DoStaticCompression = False
  * DontLog = False
  * EnableDefaultDoc = True
  * EnableDirBrowsing = False
  * EnableDocFooter = False
  * EnableReverseDns = False
  * FrontPageWeb = False
  * HttpCustomHeaders (array):
    => <<EmptyArray>>
  * HttpErrors (array):
    => 400,*,FILE,C:\WINDOWS2\help\iisHelp\common\400.htm
    => 401,1,FILE,C:\WINDOWS2\help\iisHelp\common\401-1.htm
    => 401,2,FILE,C:\WINDOWS2\help\iisHelp\common\401-2.htm
     <Snipped>
    => 500,15,FILE,C:\WINDOWS2\help\iisHelp\common\500-15.htm
  * HttpExpires = D, 0x15180
  * HttpPics (array):
    => <<EmptyArray>>
  * HttpRedirect =
  * IPSecurity =
  * IgnoreTranslate = False
  * KeyType = IIsWebServer
  * LogExtFileBytesRecv = False
  * LogExtFileBytesSent = False
  * LogExtFileClientIp = True
  * LogExtFileComputerName = False
  * LogExtFileCookie = False
  * LogExtFileDate = False
  * LogExtFileFlags = 1414
  * LogExtFileHost = False
  * LogExtFileHttpStatus = True
  * LogExtFileMethod = True
  * LogExtFileProtocolVersion = False
  * LogExtFileReferer = False
  * LogExtFileServerIp = False
  * LogExtFileServerPort = False
  * LogExtFileSiteName = False
  * LogExtFileTime = True
  * LogExtFileTimeTaken = False
  * LogExtFileUriQuery = False
  * LogExtFileUriStem = True
  * LogExtFileUserAgent = False
  * LogExtFileUserName = False
  * LogExtFileWin32Status = False
  * LogFileDirectory = C:\WINDOWS2\System32\LogFiles
  * LogFileLocaltimeRollover = False
  * LogFilePeriod = 1
  * LogFileTruncateSize = 20971520
  * LogOdbcDataSource = HTTPLOG
  * LogOdbcPassword =
  * LogOdbcTableName = InternetLog
  * LogOdbcUserName = InternetAdmin
  * LogPluginClsid = {FF160663-DE82-11CF-BC0A-00AA006111E0}
  * LogType = 1
  * LogonMethod = 0
  * MaxBandwidth = -1
  * MaxBandwidthBlocked = -1
  * MaxConnections = 10
  * MaxEndpointConnections = -1
  * MimeMap (array):
    => <<EmptyArray>>
  * NTAuthenticationProviders = Negotiate,NTLM
  * NetLogonWorkstation = 0
  * NotDeletable = True
  * PasswordCacheTTL = 600
  * PasswordChangeFlags = 6
  * PasswordExpirePrenotifyDays = 0
  * PeriodicRestartRequests = 10000
  * PeriodicRestartSchedule (array):
    => <<EmptyArray>>
  * PeriodicRestartTime = 60
  * PoolIdcTimeout = 0
  * ProcessNTCRIfLoggedOn = True
  * PutReadSize = 8192
  * Realm =
  * RedirectHeaders =
  * RevocationFreshnessTime = 86400
  * RevocationURLRetrievalTimeout = 0
  * SSIExecDisable = False
  * SSLCertHash (array):
    => <<EmptyArray>>
  * SSLStoreName =
  * ScriptMaps (array):
    => .asp,C:\WINDOWS2\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
    => .cer,C:\WINDOWS2\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
    => .cdx,C:\WINDOWS2\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
    => .asa,C:\WINDOWS2\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
    => .idc,C:\WINDOWS2\system32\inetsrv\httpodbc.dll,5,OPTIONS,GET,HEAD,POST,PUT,DELETE,TRACE
    => .shtm,C:\WINDOWS2\system32\inetsrv\ssinc.dll,5,GET,POST
    => .shtml,C:\WINDOWS2\system32\inetsrv\ssinc.dll,5,GET,POST
    => .stm,C:\WINDOWS2\system32\inetsrv\ssinc.dll,5,GET,POST
  * SecureBindings (array):
    => :443:
  * ServerAutoStart = True
  * ServerBindings (array):
    => :80:
  * ServerComment = Default Web Site
  * ServerListenBacklog = 40
  * ServerListenTimeout = 120
  * ServerSize = 1
  * ServerState = 2
  * ShutdownTimeLimit = 60
  * UNCAuthenticationPassThrough = False
  * UploadReadAheadSize = 49152
  * UseDigestSSP = False
  * UseHostName = False
  * WebDAVMaxAttributesPerElement = 0

Contains Objects (not being dumped)
~~~~~~~~~~~~~~~~
  * Name    = ROOT
    Class   = IIsWebVirtualDir
    AdsPath = IIS://LocalHost/W3SVC/1/ROOT
    GUID    = {8B645280-7BA4-11CF-B03D-00AA006E0975}

  * Name    = IIsCertMapper
    Class   = IIsCertMapper
    AdsPath = IIS://LocalHost/W3SVC/1/IIsCertMapper
    GUID    = {8B645280-7BA4-11CF-B03D-00AA006E0975}
====[ END DUMP "1"]=============================


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Icon Tools[Next]: Install Assistant.EXE


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.