VBScript for Windows cluster


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: VBScript for Windows cluster

  1. #1
    Join Date
    May 2008
    Posts
    6

    VBScript for Windows cluster

    I need the Windows cluster member to auto run a batch job when the cluster resources are fail over to it from another member.
    I use the vbscript below:
    Code:
    Dim WshShell
    Set WshShell = CreateObject("WScript.Shell")
    Function Online()
      RunCommand "c:\start.bat", True
      Online = 0
    End Function
    Function Open()
      Open = 0
    End Function
    Function Close()
      Close = 0
    End Function
    Function LooksAlive()
      LooksAlive = 0
    End Function
    Function IsAlive()
      IsAlive = 0
    End Function
    Function RunCommand(command, wait)
      RunCommand = WshShell.Run(command, 1, wait)
    End Function
    The problem is I can't bring it online in cluster administrator, and can't trigger the batch job. It show an error code and I think i miss something in the code.
    Please, Is there anyone can help me !!!

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    What is the error code and what is the verbage that goes along with it?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    May 2008
    Posts
    6
    The error code id is 5018 (0000139a)

    The attached file is the screen capture of the error.
    Attached Images Attached Images

  4. #4
    Join Date
    May 2008
    Posts
    6
    The problem solved. There was an invalid command inside the batch file cause the error. Thanks to those who had read my thead.

Similar Threads

  1. Replies: 3
    Last Post: 12-18-2006, 09:08 AM
  2. Replies: 0
    Last Post: 10-26-2006, 10:14 AM
  3. not able to open cluster administrator
    By Biju george in forum Database
    Replies: 0
    Last Post: 06-14-2003, 03:30 AM
  4. Replies: 0
    Last Post: 05-23-2001, 01:15 PM
  5. Mix VBscript and ASP
    By Larry in forum ASP.NET
    Replies: 1
    Last Post: 07-25-2000, 02:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center