ArsenalRecon / Arsenal-Image-Mounter

Arsenal Image Mounter mounts the contents of disk images as complete disks in Microsoft Windows.
https://ArsenalRecon.com/weapons/image-mounter
Other
496 stars 85 forks source link

Using AIM in WinPE #28

Closed homes32 closed 1 year ago

homes32 commented 1 year ago

Is there a proper/recommend method for using Arsenal-Image-Mounter in WinPE in place of ImDisk?

Integrating the drivers with DISM /Add-Driver works for adding the drivers, but does not create the storage controller device. I was able to get everything to work by using aim_ll.exe --install, which installs the driver AND creates the SCSI adapter, however this method creates some overhead by having to include the drivers twice (once for the source folder used by --install and once in the write-filter overlay once installed. Is there a good way to create the SCSI adapter offline or at boot when drivers are integrated directly into a WinPE build?

LTRData commented 1 year ago

When I have prepared WinPE images like that, I have usually used a slightly modified .inf file with a DeviceInstall32 section. That makes dism create a root enumerated device automatically. I do not remember right now the exact configuration syntax for that section, but it has been available in some sample inf files that come with the WDK. We could actually prepare such an .inf file for next release.

homes32 commented 1 year ago

Thanks for the fast reply!

Taking a closer look at the .inf, the DeviceInstall32 routines are present but commented out.

[DeviceInstall32]
AddDevice = ROOT\PhDskMnt,,PhDskMnt_RootEnumInstall

[PhDskMnt_RootEnumInstall]
HardwareIds = ROOT\PhDskMnt

Uncommenting works great and the ramdrive inilitized in WinPE, though the modification invalidates the driver signing so use of /ForceUnsigned is necessary. For this reason a prepared .inf for the next release would be most welcome.

Thanks for you help and for evolving this great little tool

LTRData commented 1 year ago

You are right, I found some old notes about this. I originally had those lines in the .inf file for this purpose (and for installing using devcon install and similar), but it made it very difficult to use the .inf when installing from within an application using setup API and at the same time get some feedback about whether the setup was successful or not. So therefore, those lines where commented out and much more was done in code in the application instead.

But we can have a separate .inf with these lines present in the next version.