Jason
Guest
|
Posted:
Thu Dec 08, 2005 9:30 pm Post subject:
Script to clone publishing points |
|
|
I am trying to get a vbscript to clone a publishing point. I have
other scripts which allow me to add, remove and change points but I
can't seem to clone one. Here is what I have:
clonepub.vbs
---------------------------------------------
pubpointcopy "x.x.x.x"
sub pubpointcopy (wmsserver_ip)
set Srvobj = createobject("WMSServer.server",wmsserver_ip)
set pubpoints = Srvobj.PublishingPoints
'pubpoint(6) is the point I was to use as a template
set originalPubPoint = pubpoints(6)
strName = "Cloned Pub Point"
set NewPubPoint = PubPoints.Clone(strName, originalPubPoint)
end sub
---------------------------------------------
The error i get is:
C:\scripts\clone>cscript clonepub.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved
C:\scripts\clone\clonepub.vbs(12, 1) (null): Access is denied.
Line 12 = set NewPubPoint = PubPoints.Clone(strName, originalPubPoint)
Any ideas or code samples that do clone?
|
|