Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RPC Service error

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,64059
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RPC Service error
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 RPC Service error - 9/4/2008 10:47:43 PM   
  mdlister

 

Posts: 16
Score: 0
Joined: 7/22/2008
Status: offline
Greetings,

I have a script that pings a machine, if sucessful it will the check to see if a user is logged on and return there username, it will also connect to AD and resolve the username to a friendly username, it also checks to see if a service is running.

The script works great however there are a few machines that i get the error message:

"the remote server machine does not exist or is unabailable: 'GetObject' "

i have found that this is due to the rpc service not started on the machine as i can not even run on to the admin shares of the computer

Is there a way of trapping this error so it just echo's back "RPC service is not running on machine x and then quit rather than the windows script host error message?

below is the first part of the code to prompt for the machine LRQxxxxx

and Set objWMIService = GetObject("winmgmts:" _ is the line it keeps crashing out on. I have tried to put some error handling but that does not work, is there another way or a better way to check?


      



_____________________________

.: Lister :.
 
 
Post #: 1
 
 RE: RPC Service error - 9/7/2008 2:19:12 PM   
  wjcott

 

Posts: 41
Score: 0
Joined: 9/7/2008
Status: offline
I think you are looking for something like this, with error trapping enabled before the CreateObject statement.


      

(in reply to mdlister)
 
 
Post #: 2
 
 RE: RPC Service error - 9/7/2008 5:21:09 PM   
  mdlister

 

Posts: 16
Score: 0
Joined: 7/22/2008
Status: offline
Thanks wjcott, i have made the admenments and will test it on the machine i know it ususally errors on as soon as the user gets in.

Fingers crossed

(in reply to wjcott)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RPC Service error Page: [1]
Jump to:





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
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts