Jump to content











Photo
- - - - -

PartMgr


  • Please log in to reply
9 replies to this topic

#1 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1914 posts
  • Location:Nantes - France
  •  
    France

Posted 02 April 2017 - 04:09 PM

index.php?app=downloads&module=display&s

File Name: PartMgr
File Submitter: erwan.l
File Submitted: 02 Apr 2017
File Category: Tools

A simple GUI to perform basic tasks on disk partitions.

Click here to download this file


  • Blackcrack likes this

#2 Zharif

Zharif

    Frequent Member

  • .script developer
  • 134 posts
  • Location:Germany
  •  
    Germany

Posted 03 April 2017 - 07:10 PM

erwan.l,

 

it quits immediately with Msg "IOCTL_DISK_GET_DRIVE_LAYOUT_EX failed. The handle is invalid" (translated).



#3 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1914 posts
  • Location:Nantes - France
  •  
    France

Posted 03 April 2017 - 07:33 PM

erwan.l,

 

it quits immediately with Msg "IOCTL_DISK_GET_DRIVE_LAYOUT_EX failed. The handle is invalid" (translated).

 

Hi Zharif,

 

Thanks for your report.

Did you run as admin? If not, can you try?

 

If it still does not run, can you run wmic diskdrive list brief /format:list and report it here?

 

Thanks,

Erwan



#4 Zharif

Zharif

    Frequent Member

  • .script developer
  • 134 posts
  • Location:Germany
  •  
    Germany

Posted 03 April 2017 - 08:54 PM

Yes I ran it as admin.

But after your post and after a new retry it runs without problems.

Maybe it was a file access or memory problem previously.

I've to confess that my PC was very buisy the last two days when I tried to execute your proggy

(running winbuilder while writing Win10PESE plugins and having two to three instances of a virtual machine running for testing).

...bad scenarios for testing I know.

 

Anyway, here is the requested report:

D:\>wmic diskdrive list brief /format:list


Caption=Generic STORAGE DEVICE USB Device

DeviceID=\\.\PHYSICALDRIVE5

Model=Generic STORAGE DEVICE USB Device

Partitions=0

Size=


Caption=ST4000DX001-1CE168

DeviceID=\\.\PHYSICALDRIVE0

Model=ST4000DX001-1CE168

Partitions=2

Size=4000784417280


Caption=Generic STORAGE DEVICE USB Device

DeviceID=\\.\PHYSICALDRIVE7

Model=Generic STORAGE DEVICE USB Device

Partitions=0

Size=


Caption=ST4000DX001-1CE168

DeviceID=\\.\PHYSICALDRIVE1

Model=ST4000DX001-1CE168

Partitions=3

Size=4000784417280


Caption=Generic STORAGE DEVICE USB Device

DeviceID=\\.\PHYSICALDRIVE4

Model=Generic STORAGE DEVICE USB Device

Partitions=0

Size=


Caption=NVMe Samsung SSD 950

DeviceID=\\.\PHYSICALDRIVE2

Model=NVMe Samsung SSD 950

Partitions=3

Size=256052966400


Caption=Generic STORAGE DEVICE USB Device

DeviceID=\\.\PHYSICALDRIVE6

Model=Generic STORAGE DEVICE USB Device

Partitions=0

Size=


Caption=Generic STORAGE DEVICE USB Device

DeviceID=\\.\PHYSICALDRIVE3

Model=Generic STORAGE DEVICE USB Device

Partitions=0

Size=


#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13441 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 April 2017 - 09:06 AM

@Zharif

As a side note a number of those \\.\PhysicalDrives must be USB card readers, they are usually a PITA as they are a \\.\PhysicalDrive and given a drive letter even when they are empty (and Size=[EMPTY]), can you try disconnectring them (by using the safely remove hardware thingy) temporarily and retry? (they will reappear at reboot).

 

:duff:

Wonko



#6 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1914 posts
  • Location:Nantes - France
  •  
    France

Posted 04 April 2017 - 09:15 AM

When launching PartMgr, it will by default attempt to list partitions on \\.\PhysicalDrive0.

User can later on select another disk.

 

I assumed that a system with a disk will always start at 0 (could I be wrong?).

If no \\.\PhysicalDrive0 is present, PartMgr will error.



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13441 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 April 2017 - 09:29 AM

When launching PartMgr, it will by default attempt to list partitions on \\.\PhysicalDrive0.

User can later on select another disk.

 

I assumed that a system with a disk will always start at 0 (could I be wrong?).

If no \\.\PhysicalDrive0 is present, PartMgr will error.

Naah, in Zharif's report there is a Physicaldrive 0 allright:

 

 

Caption=ST4000DX001-1CE168

DeviceID=\\.\PHYSICALDRIVE0

Model=ST4000DX001-1CE168

Partitions=2

Size=4000784417280

 

The issue must be connected to *something else*.

:duff:

Wonko



#8 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1914 posts
  • Location:Nantes - France
  •  
    France

Posted 04 April 2017 - 09:39 AM

"IOCTL_DISK_GET_DRIVE_LAYOUT_EX failed. The handle is invalid" would normally means either :

-no physicaldrive0 at the time partmgr was triggered (but I doubt it and Zharif did report physicaldrive0 was existing)

-no admin rights to open physicaldrive0 (most probable cause).

 

Next release will request admin rights on startup to avoid such issue : all software dealing with disk and volumes should actually request such admin rights - DiskMgr and VolumeMgr do already.



#9 Zharif

Zharif

    Frequent Member

  • .script developer
  • 134 posts
  • Location:Germany
  •  
    Germany

Posted 04 April 2017 - 04:50 PM


@Zharif

As a side note...

Wonko, I know but just followed erwans' clear formulated request for a special report.

It would never come into my mind to modify a requested report by my own hand for a person who's in need for it.

 

 


...I assumed that a system with a disk will always start at 0 (could I be wrong?).

No. I've also been teached of the contrary since having a mainboard equipped with an NVMe M.2 SSD disk and two "regular" hard drives.

Whatever I tried before, I've never been able to set my system disk (SSD) to PHYSICALDRIVE0.

Fiddling around with cable connections or the BIOS didn't change anything.

 

About your last explaination,

It's really remarkable - a few minutes ago I just tried to execute partmgr.exe and the well known error appears again (without buisy state of my PC). It seems, that forever reason your proggry sometimes works and (forever reason) sometimes refuses to open the device handle.

As I wrote (and as we both know about these API calls) - I certainly executed it with admin rights.

And yes, Wonko is right - PYHSICALDRIVE0 is detected as you should see in my report.

But it is NOT my systemdrive.



#10 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1914 posts
  • Location:Nantes - France
  •  
    France

Posted 04 April 2017 - 05:05 PM

I might be too greedy on my createfile.

I'll see if I can lower my "expectations" i.e try read only attributes, etc.

 

I'll also increment the disk number : if 0 fails, try 1, etc until a reasonable number.

 

I may release an update later this evening.

 

Having released 3 "new" softwares last week end, I did not expect to create these parallel discussions :)

All very nice feedback thus !






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users