SS3 SDK: VBScript: Can't IRS::Put() Integer Properties (189745)



The information in this article applies to:

  • Microsoft Site Server 3.0

This article was previously published under Q189745

SYMPTOMS

The following scripts, RollbacksToKeep and Port, get set incorrectly in the registry:
    Dim vPort
    Dim crsServer

    vPort = 508

    Set crsServer = CreateObject("CRSApi.ReplicationServer")
    crsServer.Initialize ("")
    crsServer.Put "Port", vPort
    crsServer.Put "RollBacksToKeep", 2
    crsServer.Commit
				

WORKAROUND

To work around this problem, you must force VBScript to set these parameters as type VT_I4. (VBScript defaults integer parameters to VT_I2, which the Content Replication System does not support.) IReplicationServer::Put() on integer properties can set invalid values when called from VBScript.

Set integer properties as type VT_I4. This can be done in VBScript by using the CLng() function on the value.

Modification Type:MajorLast Reviewed:2/13/2000
Keywords:kbprb KB189745