Not working in WinPE

USB Image Tool support forum
arinci
Posts: 7
Joined: Sat May 05, 2018 3:04 pm

Not working in WinPE

Post by arinci » Sat May 05, 2018 3:27 pm

Hello everyone, just trying to have USB Image Tool working in Windows PE.
After reading the FAQ I understood that the tool make use of .Net Framework. For this I create a custom WindowsPE using latest Windows10 AIK (the one released with Win10 v1803), and added WinPE-NetFx.cab package using DISM utility, as recommended by Microsoft.

As result I was able to start the USB Image Tool program using my WindowsPE, the USB key is detected properly, but when I push the "BACKUP" button I have an exception due to a missing COM component. This is the error:

Code: Select all

Creating an instance of the COM component with CLSID {C0B4E2F3-BA21-4773-IDBA-335EC946E88I} from the iClass Factory failed due to the following error: 80040111. 
ClassFactory cannot supply requested class. Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)
After googling a bit it seems related to Visual Themes, and yes this feature is missing in WindowsPE.

As it seems to me that is almost impossible to install Visual Themes in Windows PE, I'm asking if is it possible to have the USB Image Tool working also when Visual Themes are not installed, as in a windows PE environment.
Alex can you help me please? :)
Thanks!

Alex
Site Admin
Posts: 235
Joined: Fri Jul 29, 2011 11:59 pm

Re: Not working in WinPE

Post by Alex » Sun May 06, 2018 6:40 pm

Did you try to use the command line tool? For the GUI tool, I guess there is not much I can do about that, if Windows PE does not support Windows Forms.

arinci
Posts: 7
Joined: Sat May 05, 2018 3:04 pm

Re: Not working in WinPE

Post by arinci » Sun May 06, 2018 8:09 pm

The command-line tool works fine.

WinPE support win forms applications written making use of .Net Framework. The problem I wrote seems related to Visual Themes...probably removing "Visual Styles" will make the app more WinPE compliant.
If is developed in VB: remove the check on "Enable XP visual styles" into application property.
If is developed in C#: comment all Application.EnableVisualStyles calls.

I'm not sure that this is the solution, but If you agree I can make some test with an internal release ;)

Alex
Site Admin
Posts: 235
Joined: Fri Jul 29, 2011 11:59 pm

Re: Not working in WinPE

Post by Alex » Sun May 06, 2018 8:31 pm

I have put a beta version of 1.75 at http://www.alexpage.de/download/usbit/usbit175b.zip. Please try to run this with -novs parameter.

arinci
Posts: 7
Joined: Sat May 05, 2018 3:04 pm

Re: Not working in WinPE

Post by arinci » Sun May 06, 2018 8:46 pm

Just tried the beta version, using -novs option.
Unfortunately does not solve, problem is still there :(

It's a pity...I can do more beta testing for you on this issue if you want. Just let me know!

Alex
Site Admin
Posts: 235
Joined: Fri Jul 29, 2011 11:59 pm

Re: Not working in WinPE

Post by Alex » Mon May 07, 2018 6:15 pm

I just uploaded a new version. It shoud show an debug dialog message when entering the else path, where VisualStyles are not enabled.

arinci
Posts: 7
Joined: Sat May 05, 2018 3:04 pm

Re: Not working in WinPE

Post by arinci » Tue May 08, 2018 8:21 pm

Tested again the new beta version, using -novs parameter.
Now there is a message box when the app is started, but the result is same as before...the exception is still present when the backup (or restore) button is pressed.
Seems very hard to debug. If you want I can send you the WinPE iso image for testing, just let me know.

At the end I have to say however that I have to switch to another USB key imaging tool, this one from PassMark:
https://www.osforensics.com/tools/write-usb-images.html

The reason is simple: I need to backup (and obviously to restore) a VMWare ESXi USB bootable key. The backup / restore procedure executed with above mentioned software works like a charm, the same procedure executed with "USB Image Tool.exe" in standard Windows 10 doesn't work. The same with the usbitcmd.exe, also when running in Windows PE environment.

The error I have with the "restored" key is:

Code: Select all

"BANK 5: Invalid configuration", "BANK 6: Not a valid bootbank"
This is the same error as other users on this forum.

Please let me know if I can help you more: I really like your "USB Image Tool.exe" as it allows to work with compressed images...but I need to backup (and restore) VMware ESXi USB keys! :roll:

Alex
Site Admin
Posts: 235
Joined: Fri Jul 29, 2011 11:59 pm

Re: Not working in WinPE

Post by Alex » Wed May 09, 2018 9:18 pm

Thanks for the feedback. If I understand you correctly, the program at leasts starts up, but crashes on clicking the action buttons (when the file dialogs appear?). Maybe I have to disable visual styles for the dialogs seperatly. If possible, could you provide me the iso for testing purposes on Onedrive/Dropbox or something else?

With 1.75b I tried to fix the BANK 5/6 error when restoring VMWare images. This is caused as other users already analyzed by Windows renumbering partition if it detects a mismatch between USB device size and GPT header information. Could you please try this as well by setting the "Fix GPT after Restore" option.

arinci
Posts: 7
Joined: Sat May 05, 2018 3:04 pm

Re: Not working in WinPE

Post by arinci » Wed May 16, 2018 10:26 pm

Alex wrote:Thanks for the feedback. If I understand you correctly, the program at leasts starts up, but crashes on clicking the action buttons (when the file dialogs appear?). Maybe I have to disable visual styles for the dialogs seperatly. If possible, could you provide me the iso for testing purposes on Onedrive/Dropbox or something else?

With 1.75b I tried to fix the BANK 5/6 error when restoring VMWare images. This is caused as other users already analyzed by Windows renumbering partition if it detects a mismatch between USB device size and GPT header information. Could you please try this as well by setting the "Fix GPT after Restore" option.
Yes, the program starts but crashes when clicking on Backup or Restore buttons. No file dialog appears.
If you want to try by yourself this is the link to download the WinPE ISO image:

Code: Select all

https://mega.nz/#!UN1VWIoA!4GTErfeBO7A9fp-cAXbzqQQKGlLNuHdMlGG7Da5oa3Q
The usbit folder is placed on the root, to simplify testing.
On the next few days I'll retry to restore the saved image using the option you highlighted...I'll let you know the result.

Alex
Site Admin
Posts: 235
Joined: Fri Jul 29, 2011 11:59 pm

Re: Not working in WinPE

Post by Alex » Tue May 22, 2018 6:38 pm

I updated the 1.75b again. Visual styles should now be disabled for dialogs as well. -novs should not be necessary anymore, as the presence of visual styles in the OS should now be auto-detected.

Post Reply