Jump to content











Photo
* * * * * 1 votes

vMount

vhd

  • Please log in to reply
222 replies to this topic

#176 erwan.l

erwan.l

    Platinum Member

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

Posted 11 May 2020 - 06:15 PM

Just a short note about my previous comment:

with usebackq and by passing to findstr (which accepts arguments without quotes) I found the batch solution to get the volume number from the disk number via diskpart:

@echo off
SETLOCAL EnableExtensions enabledelayedexpansion

SET DSK=1
for /F "usebackq tokens=2" %%a in (`"(echo select disk %DSK% ^& echo detail disk) | diskpart | findstr Partition"`) do (set VOLN=%%a)
echo VOLUME NUMBER FOR DISK %DSK% IS: %VOLN%

Sometimes taking a break is really useful ^_^

 

Cheers,

V.

 

Not willing to spoil the fun (well done, really) but keep in in mind that one disk can have multiple volumes : what happens then?

 

/Erwan



#177 erwan.l

erwan.l

    Platinum Member

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

Posted 11 May 2020 - 06:17 PM

Also, also not related to how to map volumes and drives, referencing here a script around vmount where i go from the output ot attachvhd (giving me a disk number), then mapping it to a logical drive letter.

 

Once you have a logical drive letter, you are not too far away from a volume guid...

 

PS : wondering how much time before I get slapped by Wonko about probably misusing disk and drive keywords :)

 

EDIT : link fixed.

rem get drive letter
FOR /F "tokens=* USEBACKQ" %%F IN (`vmount-win64 attachvhd %vhd%`) DO (
SET drive=%%F
)
...
echo %drive:~17,1%
rem get drive letter
FOR /F "tokens=* USEBACKQ" %%F IN (`vmount-win64 devices Harddisk%drive:~17,1%`) DO (
SET letter=%%F
)
echo %letter%
...


#178 erwan.l

erwan.l

    Platinum Member

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

Posted 11 May 2020 - 07:27 PM

Latest vmount version will dislay the disk number "behind" a volume (NEW).

If need be, i could also add the partition number.

 

Hopefully I did not introduce any nasty bugs as this is monday (back to work) and it has been a while I did not put my fingers on vmount :)

 

vmount-win64 volumes
#;VolumeGuid;Drive;VolName;FS;Size;Disk
0;\\?\Volume{e26e7b15-122a-11e7-82bf-806e6f6e6963}\;;[R'serv' au systSme];NTFS;349MB;0
1;\\?\Volume{876ebd81-ce10-11e8-8334-94de80c2a41e}\;E:\;[DATA];NTFS;152624MB;1
2;\\?\Volume{c91f3411-92db-11ea-835b-001a7dda7113}\;G:\;[];NTFS;510MB;2
3;\\?\Volume{e26e7b16-122a-11e7-82bf-806e6f6e6963}\;C:\;[SYSTEME];NTFS;114126MB;0
4;\\?\Volume{c3ccf19b-9cbc-11e8-8325-806e6f6e6963}\;D:\;;;;;

To sum it up, we have the volume options (above) where we have the volume guid, the logical driver letter and the disk number (and possibly the partition number if one asks gently).

 

From a disk number, you can jump to a partition or device, and from there (based on the drive letter), you can jump to a volume using FOR /F "tokens=* USEBACKQ" %%F IN ...

 

Next to volumes, where you can get pretty much everything in one go (guid, letter, disk number...), we also have the disks, partitions and devices options.

 

Volumes can be filtered on guid field (NEW).

Disks can be filtered on the productid field.

Partitions is filtered on the device field.

Devices is filtered on the drive field.

vmount-win64 disks
DiskNr;SN;ProductId;Size;Type;Removable
0;[01020304];WDC_WDS120G2G0A-00JH30;114480MB;SATA;NON-REMOVABLE
1;[56B682DC];Hitachi_HDP725016GLA380;152627MB;SATA;NON-REMOVABLE
2;[D1842729];Virtual_Disk;512MB;UNKNOWN;NON-REMOVABLE
vmount-win64 partitions
Drive;VolName;FS;Device;Size
C:;[SYSTEME];NTFS;\device\harddisk0\partition2;114126MB
E:;[DATA];NTFS;\device\harddisk1\partition1;152625MB
G:;[];NTFS;\device\harddisk2\partition1;511MB
R:;[RAMDRIVE];NTFS;\device\imdisk0;1024MB
vmount-win64 devices
Device;Drive;size
\device\harddisk2\partition1;G:;511MB;
\device\harddisk0\partition1;;350MB;
\device\harddisk0\partition2;C:;114126MB;
\device\harddisk1\partition1;E:;152625MB;

  • Tokener likes this

#179 erwan.l

erwan.l

    Platinum Member

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

Posted 11 May 2020 - 08:23 PM

 

Dear Erwan,

I have further tested "attachvhd" and "partitions" commands and have a couple of things to report.

Imagine attaching a vhd file, with NOLETTER option; from the "vmount attachvhd" output you get the new disk number.
The same new disk in "vmount disks" output which has maybe never been attached before.

The partition in the vhd is not mounted yet and, to be able to see mount points in Windows Disk Manager, you want to mount it with:

vmount assign x:\ \\?\Volume{GUID}\
vmount assign x:\mount\ \\?\Volume{GUID}\

There seems to be no way to get the Volume{GUID} information as it is avaliable only from within "vmount volumes" but it's shown only if the volumes are already mounted ( and as volume letters, not paths ).

 

 

I cannot reproduce it right now on my win10.

If i attach a vhd with noletter, i can see it listed in my volumes.

Normally, if there is a recognizable filesystem on the disk, I believe windows will always assign it a volume.

Similar to inserting a USB key ?



#180 erwan.l

erwan.l

    Platinum Member

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

Posted 11 May 2020 - 08:29 PM

I am afraid I have edited (instead of quoted) Virgus post 175 and I see no way back :(

 

@Virgus : terribly sorry about that :(

Hopefully this post was quoted later on by somebody else (but me) and these last posts will still make sense.

Time to end it there : sticky finders...



#181 virgus

virgus

    Newbie

  • Members
  • 26 posts
  •  
    Italy

Posted 12 May 2020 - 12:21 AM

Hello Erwan I'll reply going backwards...

 

#180

I am afraid I have edited (instead of quoted) Virgus post 175 and I see no way back :(

@Virgus : terribly sorry about that :(

 

I've seen that the comment 174 was cut in half, never mind. The important thing is that you could read it.

In the first part I was thanking Wonko and Maro for their tips which helped me quite a lot actually (some results also in comment #175).

Hope they'll read about my gratitude for their help here :)

 

#179

I cannot reproduce it right now on my win10.

If i attach a vhd with noletter, i can see it listed in my volumes.

I'm using it on a W7 Ultimate x64 and unfortunately unmounted volumes don't appear. Nor do volumes mounted to a folder path.

And also mounted A: volume does not appear, while B: volume is there...

 

Normally, if there is a recognizable filesystem on the disk, I believe windows will always assign it a volume.

I made another test: I removed every mountpoint detached the VHD and then re-attached and no mountpoints are created. So that's fine, vMount behaves correctly, I must have messed with all the tests I've done. :merc:

 

#178

Latest vmount version will dislay the disk number "behind" a volume (NEW).

If need be, i could also add the partition number.

 

[...] (and possibly the partition number if one asks gently).

:hyper: Great to hear that !!! Thanks!
:loleverybody: Yes please, we'll be greateful for life :yahoo:
 
#177

Also, also not related to how to map volumes and drives, referencing here a script around vmount where i go from the output ot attachvhd (giving me a disk number), then mapping it to a logical drive letter.

 

Once you have a logical drive letter, you are not too far away from a volume guid...

Your url in the link has been messed up I think, but I got the idea.

 

I suppose that the difference between W7 and W10 with volume command created many of my issues.

Hope that you have a spare W7 install to test it. Or please, if I could help somehow with debug info, don't hesitate to ask.

 

#176

Not willing to spoil the fun (well done, really) but keep in in mind that one disk can have multiple volumes : what happens then?

 

:dubbio: Good point, I confess that the objection popped into my mind but at the moment I'm burnt and cannot think about vhds with more than one partition :hmm:

 

Thanks for your good news and for the detailed replies

(and to those precious ones of Wonko's and Maro's as well)

and talk to you soon!

V.


Edited by virgus, 12 May 2020 - 12:26 AM.


#182 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 May 2020 - 09:32 AM

There is still (IMHO) the issue with the "other" name for volumes, i.e. the \\?\Device\HarddiskVolumen

 

If you could try on a same machine, both the vmount with the various options:

vmount-win64 volumes

vmount-win64 disks

vmount-win64 partitions

vmount-win64 devices

 

And dd --list

http://www.chrysocome.net/dd

http://www.chrysocom...dd-0.6beta3.zip

 

In my little batches I didn't use those names but dd --list lists them just fine.

 

 

Spoiler

 

And both Olof's dosdev:

http://www.ltr-data.se/opencode.html/

 

 

 

C:\appoggio\diskparttests>OLdosdev.exe /Q C: D: E: G: H: I: J:
C: => \Device\HarddiskVolume1
D: => \Device\HarddiskVolume2
E: => \Device\Harddisk2\DP(1)0-0+8
G: => \Device\Harddisk3\DP(1)0-0+9
H: => \Device\Harddisk4\DP(1)0-0+a
I: => \Device\CdRom0
J: => \Device\Harddisk5\DP(1)0-0+b

and MS own dosdev:

http://priede.bf.lu....RPT_CLUSTER.EXE

 

C:\appoggio\diskparttests>MSdosdev.exe
C: = \Device\HarddiskVolume1 [Fixed]
D: = \Device\HarddiskVolume2 [Fixed]
E: = \Device\Harddisk2\DP(1)0-0+8 [Removable]
G: = \Device\Harddisk3\DP(1)0-0+9 [Removable]
H: = \Device\Harddisk4\DP(1)0-0+a [Removable]
I: = \Device\CdRom0 [CDRom]
J: = \Device\Harddisk5\DP(1)0-0+b [Removable]

 

use the "other" names.

 

:duff:

Wonko



#183 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 12 May 2020 - 01:17 PM

Dear Erwan

thanks a lot for enhancing vmount tool.

We really appreciate this a lot.

 

Best regards   T.


  • erwan.l and virgus like this

#184 erwan.l

erwan.l

    Platinum Member

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

Posted 12 May 2020 - 04:46 PM

Dear Erwan

thanks a lot for enhancing vmount tool.

We really appreciate this a lot.

 

Best regards   T.

 

Thanks ReTokener for your kind words :)

Always a pleasure to contribute over here !


  • virgus likes this

#185 erwan.l

erwan.l

    Platinum Member

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

Posted 12 May 2020 - 04:47 PM

 

#178

:hyper: Great to hear that !!! Thanks!
:loleverybody: Yes please, we'll be greateful for life :yahoo:
 
 

 

Done, latest version now displays both disk# and part#.

As always, disks start at index 0 while part start at index 1.

vmount-win64 volumes
#;VolumeGuid;Drive;VolName;FS;Size;Disk#;Part#
0;\\?\Volume{e26e7b15-122a-11e7-82bf-806e6f6e6963}\;;[R'serv' au systSme];NTFS;349MB;0;1
1;\\?\Volume{876ebd81-ce10-11e8-8334-94de80c2a41e}\;E:\;[DATA];NTFS;152624MB;1;1
2;\\?\Volume{e26e7b16-122a-11e7-82bf-806e6f6e6963}\;C:\;[SYSTEME];NTFS;114126MB;0;2
3;\\?\Volume{c3ccf19b-9cbc-11e8-8325-806e6f6e6963}\;D:\;;;;;

  • Tokener and virgus like this

#186 erwan.l

erwan.l

    Platinum Member

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

Posted 12 May 2020 - 04:54 PM

There is still (IMHO) the issue with the "other" name for volumes, i.e. the \\?\Device\HarddiskVolumen

 

....

:duff:

Wonko

 

You mean like done in CloneDisk.

 

Yes, I need to figure out the different (multiple) ways to word a (NT or DOS or ???) device name.

Is there a standard or convention even?

 

0aT5jOt.png


  • virgus likes this

#187 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 May 2020 - 06:05 PM

Is there a standard or convention even?

IF there is one, it is not at all clear, the dd --list is the only program AFAICR that lists *all* possible names, possibly also Olof's dosdev with the "right" comand lines but its output is "huge" and not easily parsable.

 

The "rule" must be EITHER:

"Win32 Available Volume Information" <- according to dd --list

\Device\HarddiskVolumen

OR

"NT Block Device Objects" <- according to dd --list

\\?\Device\Harddiskm\Partition

OR both :w00t:,

 

and the instant you decide if #1,#2 or both, you encounter this (JFYI):

http://reboot.pro/to...ssible/?p=88825

 

For our common uses, the \Device\HarddiskVolumen provides not any particularly useful info (besides a possible name/id that could be used in other command line programs), whilst:

\\?\Device\Harddiskm\Partitionn additionally tells us on which disk it is.

 

Ideally it could be a parameter/switch to show the one or the other name (or both), depending on uses.

 

:duff:

Wonko


  • virgus likes this

#188 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 12 May 2020 - 09:21 PM

 

Done, latest version now displays both disk# and part#.

As always, disks start at index 0 while part start at index 1.

A man of his word.  :thumbup:

Thank you Erwan

 

Sincerely   T.


  • virgus likes this

#189 virgus

virgus

    Newbie

  • Members
  • 26 posts
  •  
    Italy

Posted 12 May 2020 - 09:52 PM

EDIT : link fixed.

Very interesting experiment! I'll try asap to do the same. :fine:

 

Done, latest version now displays both disk# and part#.

As always, disks start at index 0 while part start at index 1.

Thanks, great job !!! Looking forward to test the new version :jump:


Edited by virgus, 12 May 2020 - 09:52 PM.


#190 ERIC26

ERIC26
  • Members
  • 5 posts
  •  
    France

Posted 02 July 2020 - 05:57 AM

Hi Erwan !

 

This tool is great and very usefull for me. I'm using it to "auto mount" a VHDX file at session startup with a startup script (Windows 10 x64).

 

But i'm facing a little problem. It works fine for one and unique user session on a computer but not with more. I'll try to explain a bit more :

 

 

- One VHDX is affected to a user (calling "A") with 1 volume mounted with letter O: - This works fine !

- A second VHDX (different of the first) is affected for a second user "B" and the volume have to be mounted with letter O: too.But the system says "O: is already used" :-(

 

When user A closes his session, His VHDX is unmounted. So O: letter should be free to be used by another user, right ? But Windows seems to record the letter affectation for a volume.

 

So I tryed to use "vmount.exe assign" function to force the letter assignment at startup but how to get the correct volume GUID ? Is there a way to target the volume number (that dont change) instead of volume GUID ?

 

Here is the part of the script :

vmount.exe attach "C:\vhdx\%username%.vhdx" NOLETTER

vmount.exe assign O:\ volume N°2

 

Thanks !!

 

Regards,

Eric



#191 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 July 2020 - 07:59 AM

Can't you run a simple MOUNTVOL command?

 

If the situation is as you describe, you should have:

 

vmount.exe attach "C:\vhdx\%username%.vhdx" NOLETTER

 

Mountvol <- here a single volume GUID with no letter assigned (or possibly more than one, as an example the EFI partition, that you can exclude as it will have a known GUID)

vmount.exe assign O:\ volume N°2

 

Do also a dump to .reg of HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices in the various situations.

 

The entry in MountedDevices is Disk Signature + offset to volume, that won't change.

 

Or you can try:

mountvol O: /D

 

:duff:

Wonko



#192 ERIC26

ERIC26
  • Members
  • 5 posts
  •  
    France

Posted 02 July 2020 - 09:19 AM

Hi Wonko and thank you for your reply.

 

mountvol doen't work because the volumeGUID is not the same for the both users and can change on another computer. What doesn't change is le Volume number that is ever 2 for all users on all computers because only 1 vhdx should be mounted.

 

I've tried to use diskpart as this :

DISKPART > SELECT VOLUME 2

DISKPART > ASSIGN LETTER=O

 

And it works...but only with administrator privileges. Using a "runas" function with admin's credentials in an unsecured logon script is not a good solution too -_-



#193 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 July 2020 - 10:01 AM

Yep, I know that the GUID changes, the point is that:

1) normally only one GUID will have not any letter assigned

OR:
2) there will always be another GUID with no letter assigned (typically - if any - the not mounted EFI partition) BUT this will always have the same GUID (on a same machine)

 

So it shouldn't be difficult to find which ones needs to be mounted.

 

What I am not sure about is whether Mountvol requires anyway Admin privileges.

 

The "volume" naming like  \Device\HarddiskVolume2, as seen before is one of those "vague" links, maybe in your specific setup that VHD always get volume 2 , but it is not given on different machines/setups.

 

Anyway.

 

When Mountvol runs check that one (or more) volumes have a GUID but not a drive letter assigned.

In the same run you can also check whether the O: drive letter is *somehow* still assigned.
Look in Registry HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices for that (those) GUID(s).

Compare the entry with Disk Signature and offset to volume (these won't ever change and are "unique"[1]).

Try using mountvol with GUID that matches Disk Signature/Offset, assigning the O: drive letter.

 

Since - if I get this right - the issue is with user switching - it is also possible :dubbio: that what gets in the way is another Registry structure, related to Explorer:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2

 

You can still use (see a few posts above) dd --list to "couple" GUID with HarddiskVolume, but as said I wouldn't trust that VHD to alwsy be volume 2.

 

:duff:

Wonko

 

[1] consistency of Disk Signature needs to be checked anyway because if at any given moment a NT system senses two devices with the same disk signature connected it will silently change the disk signature of one of the two (usually the latest attached).



#194 erwan.l

erwan.l

    Platinum Member

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

Posted 02 July 2020 - 08:34 PM

Hi Erwan !

 

This tool is great and very usefull for me. I'm using it to "auto mount" a VHDX file at session startup with a startup script (Windows 10 x64).

 

But i'm facing a little problem. It works fine for one and unique user session on a computer but not with more. I'll try to explain a bit more :

 

 

- One VHDX is affected to a user (calling "A") with 1 volume mounted with letter O: - This works fine !

- A second VHDX (different of the first) is affected for a second user "B" and the volume have to be mounted with letter O: too.But the system says "O: is already used" :-(

 

When user A closes his session, His VHDX is unmounted. So O: letter should be free to be used by another user, right ? But Windows seems to record the letter affectation for a volume.

 

So I tryed to use "vmount.exe assign" function to force the letter assignment at startup but how to get the correct volume GUID ? Is there a way to target the volume number (that dont change) instead of volume GUID ?

 

Here is the part of the script :

vmount.exe attach "C:\vhdx\%username%.vhdx" NOLETTER

vmount.exe assign O:\ volume N°2

 

Thanks !!

 

Regards,

Eric

 

Hi Eric,

 

I would have thouught that different users/sessions can use the same logical drive letter.

 

But may be we can work around that : do you have to use specific letters?

If not simply cann attachvhd and let windows decide on the drive letter?

 

If you need to retrieve the drive letter you can use something like below.

And you could extend this batch to retrieve the volumeguid from the logical drive letter with vmount-win64 volumes.

FOR /F "tokens=* USEBACKQ" %%F IN (`vmount-win64 attachvhd %vhd%`) DO (
SET drive=%%F
FOR /F "tokens=* USEBACKQ" %%F IN (`vmount-win64 devices Harddisk%drive:~17,1%`) DO (
SET letter=%%F

Cheers,

Erwan



#195 ERIC26

ERIC26
  • Members
  • 5 posts
  •  
    France

Posted 03 July 2020 - 05:33 AM

Hi all !

 

@Wonko : In my case, the mounted VHDX set always the related volume number as "volume 2". It could be different if another drive is connected before the VHDX but it should not happen else in very rare cases.

 

@Erwan : Yes, I've to retrieve the same drive letter for everyone but the VHDX file is different. I'll give a try to your batch. Thanks ! :)



#196 ERIC26

ERIC26
  • Members
  • 5 posts
  •  
    France

Posted 03 July 2020 - 07:32 AM

Back about batch given by Erwan.

 

Something does not work with it. Here is my code :

FOR /F "tokens=* USEBACKQ" %%D IN ('c:\Commandes\vmount-win64.exe attach "C:\test.vhdx"') DO (SET drive=%%D)

echo drive = %drive:~17,1%

FOR /F "tokens=* USEBACKQ" %%F IN ('c:\Commandes\vmount-win64.exe devices Harddisk%drive:~17,1%') DO (SET letter=%%F)

echo letter = %letter%

c:\Commandes\vmount.exe assign %letter% c:\Commandes\vmount-win64.exe devices Harddisk%drive:~17,1%

Output "drive" returns "n" and output "letter" retruns (logically) "c:\Commandes\vmount-win64.exe devices Harddiskn"

 

c:\Commandes\vmount-win64.exe attach "C:\test.vhdx" works to mount my VHDX and returns this :

OpenVirtualDisk OK

AttachVirtualDisk OK

\\.\PHYSICALDRIVE1

So, I understand that all is OK at this step but I don't understand what "%drive:~17,1%" have to return specifically.

 

Regards,

Eric



#197 Zharif

Zharif

    Frequent Member

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

Posted 03 July 2020 - 10:40 AM

Just as a side note, according to Wonko

 

 

What I am not sure about is whether Mountvol requires anyway Admin privileges.

 

 

 

As long as a user is allowed to open a console, mountvol listing feature always works.

This does not depend on the login account. Login as (restricted-) user, or as admin will work.

 

However, for any mounting or dismounting action, mountvol expects elevated priviliges.



#198 ERIC26

ERIC26
  • Members
  • 5 posts
  •  
    France

Posted 03 July 2020 - 12:03 PM

Hi again,

 

Finally I got it ! :D

 

Here is what works :

FOR /F "tokens=*" %%D IN ('c:\Commandes\vmount.exe attach "c:\Commandes\test.vhdx" NOLETTER') DO (SET drive=%%D)

FOR /F "tokens=1" %%F IN ('c:\Commandes\vmount.exe devices Harddisk%drive:~17,1%') DO (SET volume=%%F)

c:\Commandes\vmount.exe assign O: %volume%

Everytime for all users, mounting VHDX with NOLETTER, getting \device\Harddisk*\partition* and assigning the correct letter ;)

 

 

Thanks all for your help !

 

Regards,

Eric
 



#199 erwan.l

erwan.l

    Platinum Member

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

Posted 03 July 2020 - 01:11 PM

Hi again,

 

Finally I got it ! :D

 

Here is what works :

FOR /F "tokens=*" %%D IN ('c:\Commandes\vmount.exe attach "c:\Commandes\test.vhdx" NOLETTER') DO (SET drive=%%D)

FOR /F "tokens=1" %%F IN ('c:\Commandes\vmount.exe devices Harddisk%drive:~17,1%') DO (SET volume=%%F)

c:\Commandes\vmount.exe assign O: %volume%

Everytime for all users, mounting VHDX with NOLETTER, getting \device\Harddisk*\partition* and assigning the correct letter ;)

 

 

Thanks all for your help !

 

Regards,

Eric
 

 

 

Very good !

Note that you are assigning a letter using a device path here (similar to what subst or dosdev would do), not a volume.

A device path which you are retrieving thru the vmount-win64 devices function (instead of the volumes function).

And that is probably why you can do it without admin rights.

 

If you were to use vmount-win64 O:\ %volume% (notice the \ after O:), then vmount would use another set of windows API's (related to volumes) and you would have to provide a volume path.

And you may be facing user vs admin issues then.

 

Disks, Drives, Volumes, physical vs logical, etc is confusing : that's why we have Wonko over here to correct us when we deviate too much :)

 

Still, well done : you have worked it around and I am happy for you :)



#200 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 July 2020 - 01:21 PM

Just as a side note, according to Wonko

 

 

 

As long as a user is allowed to open a console, mountvol listing feature always work.

This does not depend on the login account. Login as (restricted-) user, or as admin will work.

 

However, for any mounting or dismounting action, mountvol expects elevated priviliges.

 

 

Just as a side note, according to Wonko

 

 

 

As long as a user is allowed to open a console, mountvol listing feature always work.

This does not depend on the login account. Login as (restricted-) user, or as admin will work.

 

However, for any mounting or dismounting action, mountvol expects elevated priviliges.

Yep, this is what I expected, though vmount.exe seemingly can do (at least with "device") with non-elevated privileges, so one can still use mountvol to list and then vmount to assign the letter.

 

Anyway, the issue is solved :).

 

@erwan

The command you just posted:

vmount-win64 O:\ %volume% 

 

Makes no sense whatsoever (AND it is seemingly undocumented in the thread).

 

The usage of a command line tool NEEDS to be consistent.

 

All examples till now were:
Command <action> [parameters]

your seems:
Command <drive letter> <confusing separator (duly noticed)> <undefined variable>

 

Maybe you could spend a few lines detailing and explaining it.

 

:duff:

Wonko







Also tagged with one or more of these keywords: vhd

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users