Jump to content
Sign in to follow this  

Detect disc

Recommended Posts

Hi everyone!

Is anyone know how I can made programm autodetect disc?

I meen detect inserting disc into CD-rom or removable disc into USB & skip floppy?


Share this post

Link to post
Share on other sites

Does DriveStatus() not do what you want?

DriveStatus ( "path" )

Return Value

Value ....... Interpretation

UNKNOWN ....... Drive may be unformatted (RAW).

READY ....... Typical of hard drives and drives that contain removable media.

NOTREADY ....... Typical of floppy and CD drives that do not contain media.

INVALID ....... May indicate the drive letter does not exist or that a mapped network drive is inaccessible.

Edited by ChrisL

Share this post

Link to post
Share on other sites

Hi I can't get it working

I want to exclude a floppy but include all other , the following code will only exclude the floppy when nog floppy is inserted

Func DriveInfo()

$DriveList = "|"

$drive_set1 = DriveGetDrive("ALL")

for $i = 1 to $drive_set1[0]

$DriveType = DriveGetType($drive_set1[$i]) ;

if $DriveType = "Fixed" or ($DriveType = "Removable" and $DriveStatus <> "NOTREADY") or $DriveType = "RAMDisk" then

$DriveStatus = DriveStatus($drive_set1[$i])

$drive_set1[$i] = StringUpper($drive_set1[$i])

$DriveList = $DriveList & $drive_set1[$i] & "|"

GUICtrlSetData ($List_d1,$DriveList,$drive_set1[1])




Could someone help me



Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...