Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Script running time over Remote Desktop

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Script running time over Remote Desktop
  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 >>
 Script running time over Remote Desktop - 7/10/2007 12:01:42 AM   
  RobertParker

 

Posts: 24
Score: 2
Joined: 6/8/2007
Status: offline
I wrote a script that pings a list of computernames one by one, and writes the data to several files.  When I run the script on my computer each ping takes roughly 2.5 seconds, but when I run it over remote desktop it takes 30 seconds for each ping.  I use remote desktop from my laptop to connect to one server, and then I remote desktop from that server to a second server.  There are two seperate networks that are disconnected except through a single computer.

30 seconds doesn't seem like that long, but the list will hold several thousand names. 30 seconds/computer * 4,000 computers = a really long time( around 30 hours ).
How can I adjust the ping timeout or speed the program up in anyway?   Here is the code that does the pinging.  I isolated the delay to this function.

Function Ping(strHost)
Dim objPing, objRetStatus
Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & strHost & "'")
For each objRetStatus in objPing
   If IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode<>0 then
     Ping = False
   Else
     Ping = True
   End If
Next
End Function
 
 
Post #: 1
 
 RE: Script running time over Remote Desktop - 7/10/2007 4:57:51 AM   
  RobertParker

 

Posts: 24
Score: 2
Joined: 6/8/2007
Status: offline
Turns out it is an issue with DNS/WINS, and it has nothing to do with vbscript.

(in reply to RobertParker)
 
 
Post #: 2
 
 
 
  

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 >> Script running time over Remote Desktop 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