Here's an example/comparison of VBScript vs PHP's COM component to connect to an IIS Webserver.
The examples backup the IIS MetaBase (your server's website(s) configuration) in IIS.
VBScript:
Dim obj, iFlags
Set obj = GetObject("IIS://LocalHost")
' Backup to next available version number.
' Set flags to save the metabase first and
' force the backup even if save fails.
iFlags = (MD_BACKUP_SAVE_FIRST or MD_BACKUP_FORCE_BACKUP)
obj.Backup "MyBackups", MD_BACKUP_NEXT_VERSION, iFlags
' Note: The above was copied from Microbucks.
' This is how you would have to do it.
' i.e. use the actual constant's value.
iFlags = (2 or 4)
obj.Backup "MyBackups", &HFFFFFFFF, iFlags
PHP:
<?php
$obj = new COM("IIS://LocalHost")or die("Unable to instantiate IIS");
$err = com_invoke ($obj, "Backup", "MyBackups", "&HFFFFFFFF", 2|4 );
$obj = null;
print "err=".$err; ?>
Glen