User Guide

468
OLE Automation Function Reference
AddWildcard
Adds a wildcard for files to the installation. Wildcards are used to dynamically link a
source directory to a destination directory. As you add files to or delete files from the
source directory, the files and associated components are added to or deleted from the
installation. Components are created as needed.
Function
Prototype
HRESULT AddVirtualDirectory(BSTR strFeature, BSTR strName, BSTR strDirectory, BSTR
strAppName, BSTR strDefaultDoc, BSTR strWebserverName, ApplicationProtection
lAppProtection, ExecutePermission lExecutePerm, VirtualDirectoryAttributes lAttr,
VARIANT_BOOL *retval)
Parameters strFeature: name of the feature that, when installed, causes the virtual dirtectory to be
added
strName: the name associated with the virtual directory’s alias
strDirectory: name of the physical directory on the Web server that the virtual directory
name points to
strAppName: descriptive text string that sets the application name in the IIS configuration
settings
strDefaultDoc: default document name, such as default.asp, if required by your web
server
strWebserverName: the Web server name under which to install the Web application
AppProtection: set application protection for the Web application you are installing:
0 for low
1 for medium
2 for high
ExecutePerm: set the level of script execution for this virtual directory:
0 for none
1 for scripts only
2 for scripts and executables
Attr: set attributes of the virtual directory:
1 for read
2 for write
4 to allow indexing
8 to allow directory browsing
16 for anonymous authentication
32 for basic authentication
64 for integrated authentication
128 to remove the virtual directory on uninstall
You can combine these parameters. Example: 5 for read + indexing
Return Value TRUE if successful; FALSE if not