[THIN] Script help

  • From: "Phillips, Kevin" <KPhillips@xxxxxxxxxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 18 Dec 2003 12:49:24 -0500

I'm just trying to create a script that will un-publish all apps from a
server. I found some examples, but I always get an error "invalid procedure
call" on the line of code "aApp.Initialize MetaframeWinAppObject,appDN" Any
help would be appreciated. Thanks!

 

****************************************************************************
*****************************************************************

'On Error Resume Next

 

Dim Farm, unserver, appDN

 

Set Farm=CreateObject("MetaframeCOM.MetaframeFarm")

farm.Initialize 1

Const MetafameWinAppObject=3

 

Wscript.Echo "Farm name is " & farm.Farmname

 

unserver = inputbox("What server do you want to unpublish?")

 

For Each mfserver in Farm.servers

            If mfserver.servername=unserver Then

                        Set aApps=mfserver.applications

                        For Each app in aApps

                                    app_name=app.appname

                                    appDN=app.distinguishedname

                                    Set
aApp=CreateObject("MetaframeCom.MetaframeApplication")

                                    aApp.Initialize
MetaframeWinAppObject,appDN

                                    aApp.LoadData(TRUE)

                                    wscript.sleep(500)

                                    aApp.RemoveServer unserver

                                    aApp.savedata()

                                    Set aApp = nothing

                        Next

            End If

 

Next 

 

****************************************************************************
*********************************************************

 

 

 

 

Kevin Phillips

Web Services Administrator

Creative Solutions

 

Kphillips@xxxxxxxxxxxxxxxxxxxxx <mailto:Kphillips@xxxxxxxxxxxxxxxxxxxxx> 

 

Other related posts: