Jump to content

Regwrite or regread timeout


Recommended Posts

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

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

Uhmmm... Ping() with a short timeout value? See help file.

:mellow:

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

- Use nslookup (sometimes resolves faster than ping, depends on your DNS)

DNS queries won't tell you if the device is online or not.

:mellow:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...