Jump to content











Photo
- - - - -

VHD to fixed drive

vhd vhd mounter

  • Please log in to reply
7 replies to this topic

#1 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2022 - 12:36 AM

Posted Image

File Name: VHD to fixed drive
File Submitter: alacran
File Submitted: 15 Aug 2022
File Updated: 05 Sep 2022
File Category: Tools

VHD to fixed drive is a set of programs capable to find and run in any drive, a folder containing a second program, that in turn mounts a VHD located into same folder, to Y drive letter.

I made FD-VHD-Loader-*_x64.exe in AutoIt inspired by PS_x64.exe (by wimb) that finds and runs \PStart\PStart.exe

To make the Loader.exe, I used an Script that makes the process using diskpart, and latter made the EXE file using Bat_To_Exe_Converter.

I have tested it in Win7 to Win10 and it works fantastic, now we can have all our Portable Programs located into a VHD LZX Compacted, and just copy the VHD from our PC to a USB in a matter of seconds.

And avoid using a partition to locate our Portables, and the time consumption required to copy them, as this task is made one by one, and the inconvenience they lose the compression when copied. There are alternative ways to solve this as making a WIM file and applying it to new location or clone the drive, but nobody can deny just copy a VHD is faster.

The EXE files work fine In WinPEs, Mini VHDs and also in MiniWin VHDs, they can be loceted in:
  • On he Desktop to run it manually.
  • In C:\Program FilesVHD_Loader folder to run automatically every boot, made by means of its respective Installer.
To run automatically FD-VHD-Loader-*_x64.exe every boot, from a WinPE please see this Post.

NOTE-1: Older versions 1.2 and 1.1 are still available, after pressing Download button.

NOTE-2: The secondary EXE file, is fully new, and is not based on my previous script used in Set drive-Y, (that uses LetterSwap.exe as Win10XPE does), and doesn't need to use any tag file into the VHD.

The download is a 7z file package containing two folders. PASSWORD = alacran

The README file in v1.3 (2022-09-05):
Spoiler


Hope you enjoy it as I do.

alacran

Click here to download this file

#2 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2022 - 02:55 AM

To automatically launch FD-VHD-Loader-USB_x64.exe every boot when running my Win10XPE_x64-WB.vhd, located in a partition of my USB device, just copied the EXE file to \Windows\System32 folder, and in same folder edited pecmd.ini as following:

First I disabled LetterSwap.exe to avoid any potential conflict, commentig its commands this way:

// LetterSwap
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /bootdrive Y:\CDUsb.y /Log %Temp%\LetterSwap.log
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /SetLetter Y:\CDUsb.y /Log %Temp%\LetterSwap.log

And added the following:

// Launch FD-VHD-Loader-USB_x64.exe
EXEC %WinDir%\System32\FD-VHD-Loader-USB_x64.exe

Almost at the very end of pecmd.ini file, just after:

// Launch PENetwork
EXEC X:\Program Files\PENetwork_x64\PENetwork.exe

And my VHD containing all my collection of Portable Programs was attached automatically as drive Y:\ when booting.

 

alacran



#3 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 16 August 2022 - 01:39 PM

My dear alacran, i always enthuse at your space- and time-saving bravados and inventions. I once applied this 1 to a winpe and it worked fine - the result was colorfully picturesque (all those icons pointing to the handiest software). Now i c 2 versions: a hd 1 and a usb 1. Me, i have a hd (called d: in the end) hosting the active vhd (called c:) and a whole directory with my favorite portables inside. Now, which of the 2 versions applies to my case? Or rather, in the event of neither 1 applying, what do u suggest i do to take most advantage of the config u propose?
Tx in avance!



#4 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2022 - 09:29 PM

@ antonino61

 

This set of programs is mainly focused on portability, and as I know that is not your case.

 

So you better take a look to the info in this post. For more info/questions related to that post, please make your questions in that topic.

 

Simple VHD Manager by Sordum.org works very fine to automatically attach/mount a VHD every boot, as long as the path to the VHD file remains unchanged.

 

But if booting from different OS, a VHD, or a WinPE, all drive letters have changed, and this is even worst if booting on different PCs from a USB device in all mentiones scenarios, then is when VHD to fixed drive is really required.

 

 

VHD to fixed drive is a set of programs capable to find and run in any drive, a folder containing a second program, that in turn mounts a VHD located into same folder, to Y drive letter.

 

 

alacran


  • antonino61 likes this

#5 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2022 - 09:34 PM

JFYI

 

VHD to fixed drive v1.1 was just uploaded, and previous version 1.0 was discarted.

Changes:

The 3-OPTIONAL folder content was updated with improved instructions, to help users to create their own programed tasks, and also now includes a set of photos to ilustrate each step.

 

Please re-download it again, sorry for the inconvenience.

alacran



#6 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 17 August 2022 - 10:52 AM

Include FD-VHD-Loader-USB_x64.exe and/or FD-VHD-Loader-HD_x64.exe in your new WinPE build.

 

If you want to include FD-VHD-Loader-USB_x64.exe and/or FD-VHD-Loader-HD_x64.exe in your new build using Win10XPE  or  Make_WinPE (Large version), when you are planning to mainly run it from a USB device, on Build Core >>> Main Interface Tab select Load ALL PROGRAMS in Ram and select Add your Custom folder.  Also in Apps >>> System Tools don't select XPE Startup.

 

Select only very few Apps in your build, only select programs that you don't have the respective Portable Program, (that you can run from your automatically attached VHD), to keep the WIM small and make it boot faster,

 

There is no need to waste time making an Script, just copy FD-VHD-Loader-USB_x64.exe and/or FD-VHD-Loader-HD_x64.exe to the folder \Win10XPE\Custom\x64\AdditionalFiles\Windows\System32, and edit \Win10XPE\Custom\Pecmdini\pecmd.ini file:

 

Disabled LetterSwap.exe, commentig its commands this way:

// LetterSwap
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /bootdrive Y:\CDUsb.y /Log %Temp%\LetterSwap.log
//EXEC =!%WinDir%\System32\LetterSwap.exe /auto /SetLetter Y:\CDUsb.y /Log %Temp%\LetterSwap.log

 

And add the following lines (in same order):

// Launch FD-VHD-Loader-USB_x64.exe
EXEC %WinDir%\System32\FD-VHD-Loader-USB_x64.exe

 

// Launch FD-VHD-Loader-HD_x64.exe
EXEC %WinDir%\System32\FD-VHD-Loader-HD_x64.exe

 

Almost at the very end of pecmd.ini file, just after:

// Launch PENetwork
EXEC X:\Program Files\PENetwork_x64\PENetwork.exe

 

I suggest to add both because it can be very useful in following scenarios:

 

Booting the PE from USB:

 

The PE will be run usually from a USB device, then FD-VHD-Loader-USB_x64.exe will find and run \VHD_from_USB\Loader.exe in your USB, mounting your VHD to Y drive.

 

Then when FD-VHD-Loader-HD_x64.exe runs, to find and run \VHD_from_HD\Loader.exe, even if it is found in your internal HD, as Y drive is already in use, the VHD located into the HD can't be mounted to same drive, and Loader.exe will close automatically (no message).

 

Booting the PE from internal HD:

 

As the USB device will not be plugged, FD-VHD-Loader-USB_x64.exe will run first and it will not find \VHD_from_USB\Loader.exe, then FD-VHD-Loader-USB_x64.exe will show a message saying \VHD_from_USB\Loader.exe wasn't found in any drive, and after a few seconds the message will disapear.

 

Then when FD-VHD-Loader-HD_x64.exe runs, it will find and run \VHD_from_HD\Loader.exe in your internal HD, mounting your VHD located into the internal HD to Y drive.

 

EDIT: To create links in desktop, you can add in pecmd.ini,  at the end of _SUB Shortcuts section the following lines:

 

LINK %Desktop%\FD-VHD-Loader-USB_x64,%WinDir%\system32\FD-VHD-Loader-USB_x64.exe

LINK %Desktop%\FD-VHD-Loader-HD_x64,%WinDir%\system32\FD-VHD-Loader-HD_x64.exe

 

For readers convenience I attached here my custom pecmd.ini

 

pecmd.7z  Password = alacran

 

alacran

Attached Files

  • Attached File  pecmd.7z   3.19KB   541 downloads


#7 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 18 August 2022 - 07:42 PM

JFYI

 

VHD to fixed drive v1.2 was just uploaded.

Changes:

v1.2 Now includes REG files to create a service to run the main EXE for HD or USB, (or both) every boot.

 

The service(s) just run(s) once when booting and after this stop, please see attached photo.

 

alacran

Attached Thumbnails

  • Services.png


#8 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 September 2022 - 09:26 AM

JFYI

 

 VHD to fixed drive v1.3 was just uploaded.

 

Password = alacran

 

Changes:

 

For users convenience, now with fully automated Installer files for HD and USB versions. they will create \Program Files\VHD_Loader folder, link on desktop, and also create a service that automatically runs every boot FD-VHD-Loader-*_x64.exe.   Each installer runs on %Temp% and autodeletes once finish its task, no unwanted remaining files in your OS.
 

NOTE: All is malware free, but for people that prefer to watch carefully before installing something, the old (manual installation) versions are still available, after pressing Download button.

 

alacran







Also tagged with one or more of these keywords: vhd, vhd mounter

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users