Roger Posted February 15, 2014 Share Posted February 15, 2014 Once upon a time, I was able to use the DriveStatus() function to return "READY" if a path was accessable. I believe 3.3.0.0 was the last time this actually worked the way I was using it. It would return INVALID if the server was down and the path was not accessable. Now with the current version and maybe the one before it, it always returns INVALID. I am currently using v3.3.10.2. Example Path: <server name>sfc_sysapplications I currently get around this by using the FileExists function. It just seemed a cleaner solution to use the DriveStatus(). Did anyone else use DriveStatus this way? On a side note, I have been using AutoIt since 2003 and I can't say how great this program is. It has saved me a lot of time. I use it to automate printer installation, push out updates to machines and so much more. Thank you to the great developers that created this application. Link to comment Share on other sites More sharing options...
Solution DicatoroftheUSA Posted February 15, 2014 Solution Share Posted February 15, 2014 (edited) UNC paths are not drives, so I disagree that it is cleaner. Are you sure you weren't using it with a mapped drive? as the might make some sense. from the help file " The list of possible return values may be incomplete. DriveStatus may even work when a complete directory path (which exists) is given. However, a file path won't work. " Edited February 15, 2014 by DicatoroftheUSA Statism is violence, Taxation is theft. Autoit Wiki Link to comment Share on other sites More sharing options...
Roger Posted February 15, 2014 Author Share Posted February 15, 2014 UNC paths are not drives, so I disagree that it is cleaner. Are you sure you weren't using it with a mapped drive? as the might make some sense. from the help file " The list of possible return values may be incomplete. DriveStatus may even work when a complete directory path (which exists) is given. However, a file path won't work. " I am positive that I was using a UNC path. I had several scripts running that used the function in this way. One was written that executed once per hour to check for updates to an application. It read an Access database with all the systems that were networked, pinged the machine and then checked the admin share <computer name>c$ to ensure it could reach it with the DriveStatus function. Another script was written to monitor proper operation of an application across multiple systems. The first version of it was written 10/5/2009 and has been using the DriveStatus function that way until I upgraded AutoIt. Thank you for your reply. I will stick with FileExists since it seems to work just as well. 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