cyberal Posted February 16, 2012 Share Posted February 16, 2012 It there some special way to use "drivestatus" to determine if a network connected PC or Laptop is on and connected? I tried Local $status = drivestatus("\\MarDellLaptop") which doesn't seem to work. Local $status = drivestatus("G:\") for a locally connected USB external drive does work just fine. Naturally, I just assumed the \\marDellLaptop would work.Thanks for any helpCyberal Yah, I'm an old fart, but what the hey, still enjoy keeping busy Link to comment Share on other sites More sharing options...
jdelaney Posted February 16, 2012 Share Posted February 16, 2012 (edited) You can always Ping it: $bSuccess = ping("marDellLaptop") msgbox ( 4096, "Ping", $bSuccess ) Unless it really is mapped to a drive on your comp, then there are other options...or you can event attempt to map to an open drive, and see if success/failure to determine. Edited February 16, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
cyberal Posted February 16, 2012 Author Share Posted February 16, 2012 The ping does work but I am getting different results. Sometimes it tells me they are there (PC and Laptop) and other times their not there. Both of them are on and connected. I guess that is not to dependable. I used a timeout of 10000. I'm a newbe and am not sure how to do you other suggestions. cyberal Yah, I'm an old fart, but what the hey, still enjoy keeping busy Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2012 Share Posted February 16, 2012 The ping does work but I am getting different results.Are you aware that the ping gives you different numbers each time you ping. 0 means they are not connected and other numbers mean they are connected. Link to comment Share on other sites More sharing options...
cyberal Posted February 17, 2012 Author Share Posted February 17, 2012 Yes, I am getting 0 sometimes and a number other times. Go figure ????? cyberal Yah, I'm an old fart, but what the hey, still enjoy keeping busy Link to comment Share on other sites More sharing options...
shornw Posted February 17, 2012 Share Posted February 17, 2012 First off, and more concerning, you need to identify why you are getting unreliable ping responses. Are you working on a domain? Most important - What name resolution method is being used? Is the machine you are pinging them from getting refreshed (DNS cache, WINS cache, arp cache) If you ping the machines manually do they always respond (If they do, I have found: $test = RunWait(@ComSpec & " /c ping computername") to be much more reliable than Ping() , which has given me some strange responses in the past when used across different segments of a network [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
cyberal Posted February 17, 2012 Author Share Posted February 17, 2012 ShornW,Again newbee here. I do have wireless network and my HP printer is wireless and my wife's desktop is also. The laptop is a direct connect to my router/modem via coax connection as is my own desktop PC. I am using the computer name to test both the laptop( mardelllaptop) and my wife's desktop (marpc). That's just not working reliably which you mentioned. I am going to try your new method shortly.I also am trying to test for the existance of a unique folder name on her desktop and shared that folder ("DoNotDelete" is the folder name)if FileExists("mardelllaptopDoNotDelete") then msgbox(0,"Does it exist","Mardelllaptop does Exists")Else msgbox(0,"Does it exist","mardelllaptop Does not exist")EndIfexitThis seems to be working every timeI'll let you know how I make out on these solutions...Thanks for all your helpcyberal Yah, I'm an old fart, but what the hey, still enjoy keeping busy Link to comment Share on other sites More sharing options...
cyberal Posted February 19, 2012 Author Share Posted February 19, 2012 ShornW, Sorry for not getting back to you sooner. The "RunWait" doesn't seem to be very reiliable either. The test for a folder existing does seem to be pretty reliable. Time will tell for sure. I truely appreciate your help! cyberal Yah, I'm an old fart, but what the hey, still enjoy keeping busy 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