adding to vhd right click?


  1. Posts : 4
    win11
       #1

    adding to vhd right click?


    Friends, I want to right click on any vhd or vhdx file and compact it. I can do it in the cmd prompt, but I don't want to deal with the codes all the time. Is there any way to do this easily?

    The codes I use;

    diskpart
    select vdisk file="D:\test.vhdx"
    attach vdisk readonly
    compact vdisk
    detach vdisk
    exit
    exit
      My Computer


  2. Posts : 43,022
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, perhaps the easiest way might be to create that as a script with a parameter (the path and file name) and I think you could possibly use Send to, with an appropriate addition to the Send to folder. I've never tried that with passing a parameter though.

    Another way is to add the script to file context menus (possibly requiring SHIFT rt click so it's not always an available option).
    You can do that quite readily with Easy Context Menu (free) by Sordum Tools.
      My Computers


  3. Posts : 15,498
    Windows10
       #3

    It is actually quite complicated recovering space in virtual hard drives. Comiacting does not work very well without defragging vhd which can take ages.

    There are various other ways of doing it but easiest way is to clone an existing vhd to a new blank vhd, deleting old vhd an renaming new one.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:18.
Find Us




Windows 10 Forums