ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

In search of a partition identifier ...

(1/3) > >>

barney:
Folk,

I thought this would be simplicity ... definitely misthought!

Been searching for something, preferably portable, that will identify the currently active OS partition.

OK, that's prolly not clear, so here's an example.

Take a desktop with multiple partitions on the HD(s).  Four (4) of these [bootable] partitions are loaded with the same OS, although there are variants within each.  OK, sounds stupid, but special circumstances make some sense of it.  Personally, I'd have done this with VMs, but, oh, well.

So what I'm trying to find is something that will let me identify the active partition w/o having to reboot.  Drive letters are not reliable in this instance, as they can be changed within each OS partition.

I really thought this was going to be simple, but it's turned out to be a bear.  Any thoughts that might be helpful?

MilesAhead:
If nobody on BootLand forum knows, then I don't know who would:

http://reboot.pro/index.php?

sword:
PowerQuest PartitionMagic v7 lists:
Disk | Partition |...| Status |...
 1       C...             Active

MilesAhead:
There are some WinAPI calls to get volume information but I haven't used them myself to know if the info can be easily meaningfully interpreted. Just about everything at BootLand is boot related so there must be some programmers there willing to share some of their secrets.

4wd:
Been searching for something, preferably portable, that will identify the currently active OS partition.-barney (February 05, 2011, 03:28 PM)
--- End quote ---

When you say 'active' do you mean the partition that is marked as Active that carries the MBR, (I only have one per all drives), or do you mean the current System partition ?

ie. In the picture below: The Active or the Boot partition?



Try the attached compiled AutoIt script, it's console only, (so you can stick it in batch file or something), let me know if you want GUI instead.

D:\My Docs\AutoIt>whatboot a
\Device\Harddisk2\Partition1
D:\My Docs\AutoIt>whatboot b
\Device\Harddisk2\Partition2
D:\My Docs\AutoIt>whatboot o
Microsoft Windows 7 Home Premium
D:\My Docs\AutoIt>whatboot s
C:\Windows
D:\My Docs\AutoIt>whatboot e
\Device\Harddisk2\Partition1
Microsoft Windows 7 Home Premium
C:\Windows
\Device\Harddisk2\Partition2

D:\My Docs\AutoIt>whatboot
WhatBoot [A|O|B|S|E]
Where: A - Active partition
       O - Operating System
       B - Boot partition
       S - System directory
       E - Everything
D:\My Docs\AutoIt>
--- End quote ---

EDIT: Should have mentioned, numbering starts at 1 for partitions.

Navigation

[0] Message Index

[#] Next page

Go to full version