Scribble Posted June 17, 2005 Share Posted June 17, 2005 Hello, This is my first post here, I'm just getting into AutoIT and I love it! My question for you: Is there a way using an autoit script to find out the drivetypes of all driveletters in a system and to even see if a drivetype:CDROM is a DVD or CD and wheter it has writing(burning) abilities (without a CD/DVD being inserted)? Thanx in advance guys! Link to comment Share on other sites More sharing options...
blindwig Posted June 17, 2005 Share Posted June 17, 2005 Try using DriveGetType(), DriveGetFileSystem(), or DriveStatus() to find info about a drive based on it's letter.Or for a more advanced info, interface with DISKPART (on windows XP).see my post at the end of this thread for an example of that. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Scribble Posted June 17, 2005 Author Share Posted June 17, 2005 Try using DriveGetType(), DriveGetFileSystem(), or DriveStatus() to find info about a drive based on it's letter.Or for a more advanced info, interface with DISKPART (on windows XP).see my post at the end of this thread for an example of that.<{POST_SNAPBACK}>Thanx, but this doesn't give me option to see if a drive is DVD or CD and whether it's a writer or a reader... and I need that especially to set the driveletters accordingly in a system with Diskpart. so R: = reader W: = writerAnyone? Link to comment Share on other sites More sharing options...
hoppy Posted June 17, 2005 Share Posted June 17, 2005 Thanks for that beautifull piece of code Larry. Gonna use it in my next unattended XP installation $objWMIService = ObjGet("winmgmts:\\" & @computername & "\root\cimv2") $colItems = $objWMIService.ExecQuery("Select * from Win32_CDROMDrive") For $objItem in $colItems if StringInStr($objItem.Name, "rw") then run ("install nero.exe") Exit EndIf Next Link to comment Share on other sites More sharing options...
Scribble Posted June 18, 2005 Author Share Posted June 18, 2005 try beta + COM + WMI. If this interest's you perhaps I can dig up a ditty... it will most likely only work on win2k/xp$objWMIService = ObjGet("winmgmts:\\" & @computername & "\root\cimv2") $colItems = $objWMIService.ExecQuery("Select * from Win32_CDROMDrive") For $objItem in $colItems MsgBox(4096,"","Device ID: " & $objItem.DeviceID) MsgBox(4096,"","Description: " & $objItem.Description) MsgBox(4096,"","Name: " & $objItem.Name) Next<{POST_SNAPBACK}>Hi Larry,It seems from Hoppy's adjustment this is what I would need!!! But....the script doesn't find any cdrom drive in my system, so does nothing...That's weird because there is a DVD writer on drive G:...Can you tell me what I need to do to make it find that drive?I already tried: Win32_DvdDrive but no such class exists... Thanx again, you guys are really helpful to us newbies. 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