Jump to content
Sign in to follow this  
jbennett

Problem with drivestatus

Recommended Posts

jbennett

Hi everyone,

I seem to be having a problem with drivestatus at the moment.

I'm trying to detect if a network storage drive is available.

The code works fine when i'm logged in but then as soon as I reboot and try again it doesn't work.

I keep having to switch between "INVALID" and "UNKNOWN" in the code to get it to work.

Hope this makes sense as it's driving me crazy.

Thanks

Edited by jbennett

Share this post


Link to post
Share on other sites
zorphnog

Post your code.

Share this post


Link to post
Share on other sites
dbzfanatic

Share this post


Link to post
Share on other sites
jbennett

Hi,

I've got it to work now and it recognizes if the drive isn't available.

The only problem is the code doesn't continue once i connect the drive until I open the mapped drive from My Computer.

Strange?. It seems like the drive only becomes active once i've opened it.

EDIT

-----

The mapped drive is also set to reconnect on login and there isn't a username or password to login

Edited by jbennett

Share this post


Link to post
Share on other sites
jbennett

Hmm i'm thinking something like the following

_RunDos (NET USE Y: $map_drive /persistent:YES)

The $map_drive bit is something I want to call from an .ini file. Is there any way of adding this to the _RunDos code

Thanks

Edited by jbennett

Share this post


Link to post
Share on other sites
zorphnog

_RunDos ("NET USE Y: " & $map_drive & " /persistent:YES")

Share this post


Link to post
Share on other sites
jbennett

Got it to work.

I want to add the Y: bit to my ini and use $drive_letter within that code.

How would I go about that as it doesn't seem to be working if I add that.

thanks

Edited by jbennett

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  

×