Rick Posted June 26, 2006 Share Posted June 26, 2006 (edited) Thought I'd share this script as it may come in useful for others. Ever wanted to know the Drive letter of the CD-RW drive as used by the xp cd burning process?? Well this does it, works with Win95 upwards, feel free to edit it as you wish. Rick ReEdited 27/6/6 to seek out the cdrw differently.What_is_my_cdrw_drive2.au3 Edited June 28, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
stev379 Posted June 26, 2006 Share Posted June 26, 2006 Thought I'd share this script as it may come in useful for others. Ever wanted to know the Drive letter of the CD-RW drive? Well this does it, works with Win95 upwards, feel free to edit it as you wish. Rick Cool script. AutoIT already has a "DriveGetDrive()" function built in that can streamline the process. $drv = DriveGetDrive( "CDROM" ) If NOT @error Then For $i = 1 to $drv[0] MsgBox(0,"CD Drive", "CD drive is: " & $drv[$i]) Next EndIf Link to comment Share on other sites More sharing options...
evilertoaster Posted June 26, 2006 Share Posted June 26, 2006 Cool script. AutoIT already has a "DriveGetDrive()" function built in that can streamline the process. $drv = DriveGetDrive( "CDROM" ) If NOT @error Then For $i = 1 to $drv[0] MsgBox(0,"CD Drive", "CD drive is: " & $drv[$i]) Next EndIfDiffernece is CD-Rom to CD-RW in this case.... Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 26, 2006 Share Posted June 26, 2006 You should redo it to return an array of burner drives. Link to comment Share on other sites More sharing options...
Rick Posted June 26, 2006 Author Share Posted June 26, 2006 (edited) If you want me to add an array of burner drives then i'll do it, altho my main purpose was just to establish the drive letter of the main cd-rw drive as used by the xp cd burning process. Let me know, if ya want it Edited June 27, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 26, 2006 Share Posted June 26, 2006 HI, nice, but my Combo-drive has the burner on d: and your script shows f:. :"> I'll have to look at it. Thanks 4 sharing! So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
PartyPooper Posted June 26, 2006 Share Posted June 26, 2006 Nice script that works quickly but it reports my Virtual Drive as a CDRW on F:, not my Combo-drive on E:. Link to comment Share on other sites More sharing options...
Rick Posted June 26, 2006 Author Share Posted June 26, 2006 (edited) Odd, as the reference i seek in the script is the DriveIndex stored for the xp cd burning capabilty at: RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning", "DriveIndex") , i then do a DriveGetDrive( "All" ) , DriveIndex being the drive let me know if you suss it Edited June 26, 2006 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
PartyPooper Posted June 27, 2006 Share Posted June 27, 2006 Not sure if it'll help you identify a better way to detect the CDRW, but here is my registry settings for the CD Burning tree: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning] "CD Recorder Drive"="\\\\?\\Volume{ad0c7710-ecd7-11da-9ff4-806d6172696f}\\" "DriveIndex"=dword:00000004 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning\Current Media] "TotalBytes"=hex:00,78,6c,7a,00,00,00,00 "FreeBytes"=hex:00,00,00,00,00,00,00,00 "Media Type"=dword:00000002 "UDF"=dword:00000001 "Disc Label"="MY DVD" "Set"=dword:00000001 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning\Drives] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning\Drives\Volume{46ca700a-ecbb-11da-908e-00508dd19761}] "Drive Type"=dword:00000003 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CD Burning\Drives\Volume{ad0c7710-ecd7-11da-9ff4-806d6172696f}] "Drive Type"=dword:00000002 "CurrentCDWriteSpeed"=dword:ffffffff "MaxCDWriteSpeed"=dword:0000007c Link to comment Share on other sites More sharing options...
Rick Posted June 27, 2006 Author Share Posted June 27, 2006 ok, I've found another way to find CD-RW drive, once i've created it i'll post it, tho its a shame DriveGetDrive( "All" ) is misleading Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Rick Posted June 27, 2006 Author Share Posted June 27, 2006 Ok, heres goes... I've edited my original Script to look at "Mounted" devices instead of using DriveGetDrive("All"). Can you guys test it for me ta Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 27, 2006 Share Posted June 27, 2006 Hi Rick, works as designed! So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Rick Posted June 27, 2006 Author Share Posted June 27, 2006 Yay! Thanks th.meger Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
PartyPooper Posted June 27, 2006 Share Posted June 27, 2006 Works as expected for me too. I take it that it'll just pick the first drive if you happen to have two CDRWs or perhaps a DVDRW and CDRW? Link to comment Share on other sites More sharing options...
Rick Posted June 27, 2006 Author Share Posted June 27, 2006 Works as expected for me too. I take it that it'll just pick the first drive if you happen to have two CDRWs or perhaps a DVDRW and CDRW? I thought i'd already answered that further up ^^^^^^^^ Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
PartyPooper Posted June 28, 2006 Share Posted June 28, 2006 Ahh I see, by 'main' you meant first. Cool thanks. Link to comment Share on other sites More sharing options...
Gyppie Posted May 31, 2009 Share Posted May 31, 2009 Hi! I'm new to autoit. Could someone give me an example of writing the value of the cdrw drive letter to a file insted of a msgbox? I have tried on my own with out any luck. Gyppie Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 31, 2009 Share Posted May 31, 2009 Hi!I'm new to autoit. Could someone give me an example of writing the value of the cdrw drive letter to a file insted of a msgbox? I have tried on my own with out any luck.GyppiePost the question in support please. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
rajeshontheweb Posted June 1, 2009 Share Posted June 1, 2009 good job, there. i was actually working on the information retrieved from cd burning registry key to get the drive information. and got just what i was about to do. this was further to someone's request here. i used to have a utlitity (closed source) to detect all capabiliiltes of a given optical drive and i intend to build one such soon, considering that IMAPI2 has already been ported to autoit ... (i had quit half way because i didnt have enough time to concentrate on studying imapi2 interface.. your code is good. thanks man.it will come handy. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
rajeshontheweb Posted June 1, 2009 Share Posted June 1, 2009 in line with my earlier note , i had been working on retrieveing info from guid , and found the dll call in msdn and as usual, people had already ported it into autoit. so , saved lottts of time (coz i am very bad at dllcalls and errors are unpredictable so need to spend too much time to get it working!) here's what u can do , for getting the drive information. This version might seem a little longer but 1) get last error is avoidable, its very rare that the registry call would be needed, so if the code needs to be small use second version_GetCDDrive.au3_GetCDDrive._Full.au3 Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet 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