Jump to content
Sign in to follow this  
Roger

DriveStatus No Longer Works with UNC Paths

Recommended Posts

Roger

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.

Share this post


Link to post
Share on other sites
DicatoroftheUSA

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 by DicatoroftheUSA

Share this post


Link to post
Share on other sites
Roger

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.

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.