batfastad Posted May 11, 2004 Posted May 11, 2004 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
scriptkitty Posted May 11, 2004 Posted May 11, 2004 Usually I just try to see a file on a network share. FileGetSize etc. AutoIt3, the MACGYVER Pocket Knife for computers.
brett Posted May 11, 2004 Posted May 11, 2004 do u mean the user or the actual computer? if it was the computer u could just ping the computer -Brett
brett Posted May 11, 2004 Posted May 11, 2004 AND if it was the user, you could use pstools (PSLoggedOn) to see who is logged on. -Brett
batfastad Posted May 14, 2004 Author Posted May 14, 2004 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
sugi Posted May 14, 2004 Posted May 14, 2004 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)
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