[THIN] Re: Script help

  • From: "Ron Oglesby" <roglesby@xxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Thu, 18 Dec 2003 14:47:37 -0600

'***********************************************************************
*****

'

'svrOnline.vbs

'

'Description: Bring a MF XP server "online" by re-publishing
applications 

'             published from the server.  The published app names are
stored

'             to a text file in a path specified in the command line
that is

'             the output of the svrOffline script.

'

'Usage: Two required command line parameters - 1) MF XP server name
(case

'       sensitive  2) file path (with trailing "\" character)

'

'       e.g. >cscript svrOnline.vbs MFXPTS05 C:\WINNT\TEMP\

'

'***********************************************************************
*****    

    

    Dim fso

    Dim fp

    Dim svrName

    Dim savePath

    Dim mfSvr

    Dim mfApp

    Dim appName

    Dim mfAppBinding

    

    Set objArgs = WScript.Arguments

    If objArgs.Count > 1 Then

    

        svrName = objArgs(0)

        savePath = objArgs(1)

        

        Set fso = CreateObject("Scripting.FileSystemObject")

        Set fp = fso.OpenTextFile(savePath & svrName & ".txt", 1,
vbFalse)

        

        Set mfSvr = CreateObject("MetaFrameCOM.MetaFrameServer")

        mfSvr.Initialize 6, svrName

       

        While Not fp.AtEndOfStream

            Set mfApp =
CreateObject("MetaFrameCOM.MetaFrameApplication")

            appName = fp.ReadLine

            mfApp.Initialize 3, appName

            mfApp.LoadData True

            

            Set mfAppBinding =
CreateObject("MetaFrameCOM.MetaFrameAppSrvBinding")

            mfAppBinding.Initialize 6, svrName, appName

                    

            mfApp.AddServer mfAppBinding

            mfApp.SaveData

 

        Wend

        

        fp.Close

        

    Else

        MsgBox "Usage: svrOnline.vbs <ServerName> <FileSavePath>"

    End If

 

Ron Oglesby

Senior Technical Architect

 

RapidApp

Office 312.372.7188

Mobile 815.325.7618

email roglesby@xxxxxxxxxxxx

 

-----Original Message-----
From: Jim Kenzig http://thethin.net [mailto:jimkenz@xxxxxxxxxxxxxx] 
Sent: Thursday, December 18, 2003 2:15 PM
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: Script help

 

The one on scripthorizen is a cmd line script and very simple but you
need a file from FR3 to run it. 

JK

 

        -----Original Message-----
        From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx]On Behalf Of Phillips, Kevin
        Sent: Thursday, December 18, 2003 1:38 PM
        To: thin@xxxxxxxxxxxxx
        Subject: [THIN] Re: Script help

        Thanks Ron! That worked great.

         

        
  _____  


        From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Ron Oglesby
        Sent: Thursday, December 18, 2003 1:11 PM
        To: thin@xxxxxxxxxxxxx
        Subject: [THIN] Re: Script help

         

        What samples do you have? Got this one?

         

        
'***********************************************************************
*****

        '

Other related posts: