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)
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
|
|
|
|
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)
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.
|
|
|
|
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)
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...
|
|
|
|
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)
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
|
|
|
|
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)
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.
|
|
|
|