Go to http://www.scripthorizon.com <http://www.scripthorizon.com> and click on script library in the left menu. The second link there is one. JK -----Original Message----- From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx]On Behalf Of Phillips, Kevin Sent: Thursday, December 18, 2003 12:49 PM To: thin@xxxxxxxxxxxxx Subject: [THIN] Script help 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>