Sign in to follow this  
Followers 0
batfastad

Detect Whether A User Is Connected To A Network...

6 posts in this topic

There must be a way to detect whether a user is connected to a network.

What is it?

I'm new to v3 so i'm trying my hand at a few things that I couldn't figure out using v2.

Thanks

Share this post


Link to post
Share on other sites



Usually I just try to see a file on a network share. FileGetSize etc.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

do u mean the user or the actual computer? if it was the computer u could just ping the computer


-Brett

Share this post


Link to post
Share on other sites

AND if it was the user, you could use pstools (PSLoggedOn) to see who is logged on.


-Brett

Share this post


Link to post
Share on other sites

What's PSTools?

I couldn't find any mention of it in the AutiIt 3 documentation!

If I wanted to do it by pinging, then how do I go about it?

I can run the ping command no problem.

Then do I detect the window text to see if it contains "request timed out"?

Is there not a better way to do it?

I don't want a black ping box to be firing up!

I'm trying to make a startup script for our networked database - users get local copies of the database backed up onto their machines for when they are away at show - so they can search for contact details etc.

And when the user runs this script, I'd like to be able to test whether they (user/computer) are connected to our network or not.

The added problem is that some users machines don't auth with the network properly - laptops - which may rule out the FileExist ir FileGetSize option as they might be connected - just not logged in.

If they are connected to our network then load up the network database (I already have my script do this), otherwise load up a local copy (again, no problem).

I just need to know if that user's machine, at that time is connected to OUR network - but not necessarily logged on! Obviously if they're connected but not logged in, then I can't use the FileGetSize on a shared file!

Any other suggestions?

Thanks

Share this post


Link to post
Share on other sites

Just a small addon: There seem to be some problems with the exit code of ping. The exit code only seems to be correct if running on a WinXP computer (check: v3 Scripts & Scraps -> Check if a computer is online)

If you want to get rid of the black command line window, try using

RunWait("foobar", "", @SW_HIDE)

Share this post


Link to post
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
Sign in to follow this  
Followers 0