mattw112 Posted June 23, 2010 Share Posted June 23, 2010 Is there a way to configure the regwrite or regread timeout? Currently I have a script that is making changes to registry settings across our network. But if a machine is turned off (which many likely will be at night), then the regwrite and regread take a long time to figure this out and return to the script. The downside is if you are trying to do many systems in as short of time as possible this holds things up way too long... I don't want to have to leave this running all night. At first I was going to do a ping to each system to see if it was on, but I can't find a good\fast ping function to use. I've tried some examples from the forums and either they didn't work (wmi), or take longer than the regwrite\read just timing out (cmd /c ping...) So, if anyone knows about speeding up the timeout that would be good, or if anyone has a good ping function that is fast, that would simply return a 1 or 0 to me if the system is pingable that would be great! Thanks, Terry Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 23, 2010 Share Posted June 23, 2010 Uhmmm... Ping() with a short timeout value? See help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Skruge Posted June 23, 2010 Share Posted June 23, 2010 The Ping function supports a fixed timeout (as does ping.exe), so you can tell it how long you'll allow it to wait.In my case, the bottleneck is DNS resolution rather than transfer speed, and the timeout is only enforced after such resolution.It all depends on your source list and your network topology, but here are a few alternatives:- Use nslookup (sometimes resolves faster than ping, depends on your DNS)- Bypass DNS and just use IP addresses. (Not good if machines move around)- Use something like NBTScan, which is very fast. (doesn't work on Wireless networks, and might be actively blocked on some other networks) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
mattw112 Posted June 23, 2010 Author Share Posted June 23, 2010 Uhmmm... Ping() with a short timeout value? See help file.lol, has this always been here and worked with hosts on a network?About a year and a half ago I thought I had researched all the commands for this with no success. geesh.Anyway, thanks, yes this will work fine it looks like.Terry Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 24, 2010 Share Posted June 24, 2010 - Use nslookup (sometimes resolves faster than ping, depends on your DNS)DNS queries won't tell you if the device is online or not. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now