Vbscript to check if process is running on remote computer

Author Message
geelian

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 12/21/2011
  • Status: offline
Vbscript to check if process is running on remote computer Wednesday, December 21, 2011 7:02 AM (permalink)
0
Hello,
 
I need to do exactly what this script describes that i found through google:
http://www.freevbcode.com/ShowCode.asp?ID=5166
 
But i don't really know much vbscript and know a little about WMI but when i run this script and choose a server other then my own, remote one on the same domain, i get "Microsoft VBScript runtime error: Permission denied: 'GetObject'".
 
After a bit of a search i found that i might need to use this to add to my script somehow, http://msdn.microsoft.com/en-us/library/windows/desktop/aa389290(v=vs.85).aspx , but i haven't been able to get it to work...
 
Can anyone help me out, i feel it might be a bit simple and just a couple of lines to be added there to the script to make it work but i'm been struggeling for a bit with it :S . Login and password can be hard coded in the script for testing purposes, not a problem.
 
Thanks in advanced for your help
 
Cheers
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:Vbscript to check if process is running on remote computer Wednesday, December 21, 2011 7:11 AM (permalink)
    0
    Basically the server needs to be configured to allow you to connect to it remotely through WMI. That is what the second article talks about. There is nothing that you can do in your script to make it work if the server is configured to not allow it.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      geelian

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 12/21/2011
      • Status: offline
      Re:Vbscript to check if process is running on remote computer Wednesday, December 21, 2011 7:21 AM (permalink)
      0
      I believe the server allows WMI queries...can't i add some sort of WMI authentication to the start of the script to make it work  instead of the ("winmgmts://" & strServer) which from i've seen it's only for localhost queries...
       
      #3
        geelian

        • Total Posts : 3
        • Scores: 0
        • Reward points : 0
        • Joined: 12/21/2011
        • Status: offline
        Re:Vbscript to check if process is running on remote computer Wednesday, December 21, 2011 9:49 PM (permalink)
        0
        Am i going this the wrong way ?
         
        Even though i have limited experience on vbscript i thought that checking if httpd.exe is running on a remote server would be easier :S
         
         
        Cheers guys
         
        #4
          ebgreen

          • Total Posts : 8227
          • Scores: 98
          • Reward points : 0
          • Joined: 7/12/2005
          • Status: offline
          Re:Vbscript to check if process is running on remote computer Thursday, December 22, 2011 3:17 AM (permalink)
          0
          WMI is probably the best option. I took the IsProcessRunning function from the first link that you provided and it worked just fine for me. So I still say that there is probably something going on with the permissions on your server.
          "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
          Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
          http://www.visualbasicscript.com/m_47117/tm.htm
           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9