Put

The ADSI Put method sets the value for a metabase property in the object. Some languages, such as VBScript, also support the object.property syntax as an alternative to the Get and Put methods.

Syntax

object.Put property, value 
or 
object.property = value 
 

Parts

object
Contains an IIS Admin Object, usually as a result of a previous GetObject operation.
property
A property of the object that has been retrieved from the metabase.
value
The value for the property.

Code Example

<% 
Dim IIsObj, vRead, vWrite 
Set IIsObj = GetObject("IIS://LocalHost/W3SVC/1/Root") 
' Get the value from the object 
vRead = IIsObj.Get("AccessRead") 
' Can also use object.property syntax 
vWrite = IIsObj.AccessWrite 
' Set the values 
vRead = True 
vWrite = False 
' Put the values back in the object 
IIsObj.Put "AccessRead", vRead 
' Use optional object.property syntax 
IIsObj.AccessWrite = vWrite 
' Save the changes back to the metabase 
IIsObj.SetInfo 
%> 
 

See Also

GetInfo, SetInfo, Get, GetEx, PutEx, GetInfoEx


© 1997 by Microsoft Corporation. All rights reserved.