placebo Posted April 10, 2008 Share Posted April 10, 2008 (edited) hi, i'm writing my first script and I have a problem. I can't found the function which allow me to open a specific drive (for example: "o:\") so the user can explore the o-drive can somebody help me? by, filip Edited April 10, 2008 by filipvds Link to comment Share on other sites More sharing options...
TheCreator Posted April 10, 2008 Share Posted April 10, 2008 Hello, What do you mean open a specific drive? You can change to it, list it's contents, etc etc, but you don't need to open it. This isn't c#/c++ etc where you have to have handles to heverything. ~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions. Link to comment Share on other sites More sharing options...
TheCreator Posted April 10, 2008 Share Posted April 10, 2008 ShellExecute("explorer.exe", "C:\")I really don't think that was what he wanted. ~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions. Link to comment Share on other sites More sharing options...
placebo Posted April 10, 2008 Author Share Posted April 10, 2008 the script checks if the drive map "o:\" is active. If not, it will map \\servername\data to "o:\" at last i want to open o-drive, so the user doesn't have to go to "my computer > o >" Link to comment Share on other sites More sharing options...
TheCreator Posted April 10, 2008 Share Posted April 10, 2008 lunch break just ended. so I can't dive into this, but there are functions to see if the drive exists ~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions. Link to comment Share on other sites More sharing options...
placebo Posted April 10, 2008 Author Share Posted April 10, 2008 (edited) hi, i have a solution. This is my full script and it's the result i wanted: $var = DriveStatus( "o:\" ) if ($var = 'INVALID') Then DriveMapAdd ( "o:", "\\server\data$") $var = DriveStatus( "o:\" ) if ($var = 'INVALID') THEN msgbox(0, "Error", "Not possible to create the o-drive! Check your network settings!", ""); Else ShellExecute("explorer.exe", "o:\") endif else ShellExecute("explorer.exe", "o:\") endIf btw: i didn't see the other reply's. You were to fast for me :-) thanks! Edited April 10, 2008 by filipvds 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