penggilas2 0 Posted May 30, 2012 (edited) My hardisk have 4 partition 1.PQServe Hiden Partition 2.Windows 3 & 4. Document DriveGetDrive "ALL" only read 3 partition 2,3,4 ?? How To Read Hiden partition with AutoIt..?? Edited May 30, 2012 by penggilas2 Share this post Link to post Share on other sites
water 2,359 Posted May 30, 2012 DrivegetDrive only enumerates drives. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
penggilas2 0 Posted May 30, 2012 Water.. U have autoit script to show hiden partition in autit list..?? Share this post Link to post Share on other sites
water 2,359 Posted May 30, 2012 This script (created using ) should give you information about your partitions (if it works for hidden partitions - I don't know):expandcollapse popup; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_DiskPartition", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output = $Output & "Access: " & $objItem.Access & @CRLF $Output = $Output & "Availability: " & $objItem.Availability & @CRLF $Output = $Output & "BlockSize: " & $objItem.BlockSize & @CRLF $Output = $Output & "Bootable: " & $objItem.Bootable & @CRLF $Output = $Output & "BootPartition: " & $objItem.BootPartition & @CRLF $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF $Output = $Output & "DiskIndex: " & $objItem.DiskIndex & @CRLF $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF $Output = $Output & "ErrorMethodology: " & $objItem.ErrorMethodology & @CRLF $Output = $Output & "HiddenSectors: " & $objItem.HiddenSectors & @CRLF $Output = $Output & "Index: " & $objItem.Index & @CRLF $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF $Output = $Output & "Name: " & $objItem.Name & @CRLF $Output = $Output & "NumberOfBlocks: " & $objItem.NumberOfBlocks & @CRLF $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0) $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF $Output = $Output & "PrimaryPartition: " & $objItem.PrimaryPartition & @CRLF $Output = $Output & "Purpose: " & $objItem.Purpose & @CRLF $Output = $Output & "RewritePartition: " & $objItem.RewritePartition & @CRLF $Output = $Output & "Size: " & $objItem.Size & @CRLF $Output = $Output & "StartingOffset: " & $objItem.StartingOffset & @CRLF $Output = $Output & "Status: " & $objItem.Status & @CRLF $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF $Output = $Output & "Type: " & $objItem.Type & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_DiskPartition" ) Endif Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
penggilas2 0 Posted May 30, 2012 Thank's Water.. But Not Show Hiden Partition.. Disk#0, Partition#0 Share this post Link to post Share on other sites
water 2,359 Posted May 30, 2012 Then I'm running out of ideas Maybe the UDF offers some functions? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
Tripredacus 35 Posted May 30, 2012 To start, you'll want to be able to know what you are looking for!What paritition type does your part have? Some may have a type 0x27, although other values may exist. You can confirm the type using Diskpart. Example...DISKPART> sel disk 0 Disk 0 is now the selected disk. DISKPART> list part Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 500 MB 1024 KB Partition 2 Recovery 6000 MB 501 MB Partition 3 Primary 68 GB 6501 MB DISKPART> sel part 2 Partition 2 is now the selected partition. DISKPART> detail part Partition 2 Type : 27 Hidden: Yes Active: No Offset in Bytes: 525336576 Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- * Volume 4 Recovery NTFS Partition 6000 MB Healthy Hidden DISKPART>Presumably, the 0x27 would also be returned using a call to this:http://msdn.microsoft.com/en-us/library/windows/desktop/aa365450%28v=vs.85%29.aspxThere doesn't seem to be a WMI object other than DiskPartition to look in, but it should show up on there. Disk 0, Part 0 should return a type of "Unknown" which should match how Disk Management deals with it. Aka it can't do anything with it. I don't think Windows has the appropriate ability to return the partition type. So you'll either need to automate Diskpart or use the API calls it uses.Then again, this all presumes you are using at least Vista. Twitter | MSFN | VGCollect Share this post Link to post Share on other sites
penggilas2 0 Posted June 3, 2012 (edited) Microsoft DiskPart version 5.1.3565 Copyright © 1999-2003 Microsoft Corporation. DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C Windows Xp NTFS Partition 83 GB Healthy System Volume 1 D Dokumen NTFS Partition 215 GB Healthy DISKPART> How To Read Label with AutoIt from Diskpart Not from drivegetlabel when type list volume in diskpart autoit will display "volume 0 label is Windows Xp info System.." Create list.txt type list volume in list.txt Run(@ComSpec & " /k diskpart.exe /s list.txt") wih autoit How To display in autoit "volume 0 label is Windows Xp info System.." Edited June 3, 2012 by penggilas2 Share this post Link to post Share on other sites
JohnOne 1,603 Posted June 3, 2012 Think only by using StdoutRead() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
JFX 10 Posted June 3, 2012 Should list all partitions: $RET = DllCall("Kernel32.dll", "int", "FindFirstVolume", "str", "", "str", 255) ConsoleWrite($RET[1] & @TAB & DriveGetLabel($RET[1]) & @CRLF) $RET[1] = $RET[0] while 1 $RET = DllCall("Kernel32.dll", "int", "FindNextVolume", "int", $RET[1], "str", "", "str", 255) IF Not $RET[0] Then ExitLoop ConsoleWrite($RET[2] & @TAB & DriveGetLabel($RET[2]) & @CRLF) WEnd Share this post Link to post Share on other sites
SSmail 0 Posted December 16, 2012 hey, you can use dos command line to get your info. create a file : test.txt content : ------------------- sel dis 0 lis par ------------------- Create another file: b.bat ---------------------------------------------- diskpart /s test.txt > diskpartition.log ---------------------------------------------- then you run b.bat. then you can get a diskpartition.log. the content of diskpartition.log is what you want. Share this post Link to post Share on other sites