Jump to content











Photo
* * * * - 3 votes

Make_WinPE - Make PE WIM File from x64 Windows ISO

winpe wimlib winntsetup wim

  • Please log in to reply
202 replies to this topic

#126 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 03 March 2022 - 06:59 PM

Your SFX Firefox_Profile.exe is working GREAT  :)

 

After booting with SMALL PE and Running first Firefox_Profile.exe

then indeed using the Desktop Link to Run Y:\FirefoxPortable\App\Firefox64\firefox.exe allows to use Internet and Bookmarks without Welcome Screen.

 

Then I added the created Mozilla folder at  X:\Windows\System32\config\systemprofile\AppData\Roaming to Add_Folders_Files\Windows\System32\config\systemprofile\AppData\Roaming

And Rebuild the PE_19041_US_S.wim file

 

It means when you Add the Mozilla profile folder to the PE WIM file on the proper location 

then there is no need anymore After booting with SMALL PE to Run first Firefox_Profile.exe



#127 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 March 2022 - 07:38 PM

Your SFX Firefox_Profile.exe is working GREAT  :)

 

After booting with SMALL PE and Running first Firefox_Profile.exe

then indeed using the Desktop Link to Run Y:\FirefoxPortable\App\Firefox64\firefox.exe allows to use Internet and Bookmarks without Welcome Screen.

 

Then I added the created Mozilla folder at  X:\Windows\System32\config\systemprofile\AppData\Roaming to Add_Folders_Files\Windows\System32\config\systemprofile\AppData\Roaming

And Rebuild the PE_19041_US_S.wim file

 

It means when you Add the Mozilla profile folder to the PE WIM file on the proper location 

then there is no need anymore After booting with SMALL PE to Run first Firefox_Profile.exe

 

No, that will not be enought, a single file is not enought, as mentioned in this post.

 

The new approach used in SFX Firefox_Profile.exe contains two different Mozilla folders, not only one, and both are required in its own location to make this work fine.

 

EDIT: I was wrong, only required folder is: \Windows\System32\config\systemprofile\AppData\Roaming\Mozilla

IAW tests made by wimd and commented in this post, and I can confirm that info.

 

From my previous post:

 

Good news:

 

I finally was able to avoid the need to use fBackup and also launch twice FireFox, all we need to do is backup two Mozilla folders, and extract them in advance before running FireFox. In SMALL PE the two folders are located in:

 

\Windows\System32\config\systemprofile\AppData\Local\Mozilla and in \Windows\System32\config\systemprofile\AppData\Roaming\Mozilla

 

If you want to test this approach, for your convenience I made an SFX file that will extract them in required locations.

 

But as mentioned for safety reasons it is better if the user creates it own set of 2 folders:

 

 

I strongly recommend every user needs to collect their own set of files and create their own SFX or 7.z file, this is a safety precaution as doing it this way the folders with the profile will have random names and also the gererated key4.db will be unique for each one, use the included Backup just for testing pourposes.

 

alacran



#128 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 03 March 2022 - 08:14 PM

The Mozilla folder created in Roaming can be Added next time when you Make PE.

 

It works OK for me as shown in the attachment.

 

Indeed there is a second Mozilla folder created in Local, but that will be recreated without trouble.

It seems that the Mozilla folder in Local does not contain the important data.

 

Attached File  WinPE_Mozilla_sshot-004.jpg   80.58KB   0 downloads



#129 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 03 March 2022 - 09:16 PM

I had the idea we needed both folders, it is good you already tested only the folder in Roaming is required, this reduce the amount of MBs we need to add to our SMALL PE.

 

alacran


  • wimb likes this

#130 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 06:33 AM

JFYI

 

Just made a new SMALL PE build, but this time having in:

 

\Add_Folders_Files\Windows\System32\config\systemprofile\AppData\Roaming\Mozilla folder.

 

To see how much this 11.7 MB folder impacts the final size of the SMALL PE, and I can say:

  1. The added size to the WIM file is negligible, it's only 149 KBs, once compressed, my PE_10x64_US_S.wim is still reported as 346 MB size.
  2. This approach works very fine.

Now we only need to remember to add in Remove_Folders_MEDIUM.txt the following lines:

 

 

Custom folders to remove
;
\Windows\System32\config\systemprofile\AppData\Roaming\Mozilla

 

NOTE: Not required in Remove_Folders_LARGE_EXPL.txt as \Windows\System32\config\systemprofile is included.

 

alacran


  • wimb likes this

#131 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 March 2022 - 08:22 AM

The Mozilla Profiles folder contains some extreme long path\filenames in folders storage and datareporting and saved-telemetry-pings.

 

In Make_WinPE then I got DirCopy Error that was solved by removing in Mozilla Profiles the folders storage and datareporting and saved-telemetry-pings

 

And indeed for MEDIUM Version we need to remove Mozilla folder with Remove_Folders_MEDIUM.txt



#132 noel

noel

    Frequent Member

  • Advanced user
  • 178 posts
  • Location:nantes
  •  
    France

Posted 04 March 2022 - 10:55 AM

Hi Wimb,

 

some extreme long path\filenames

I know it's not a good workaround in your tool....
i use "C:\WINDOWS\system32>robocopy /?" : it copies more than 256 characters in a path.

( /256 : disables support for very long paths ? so, default value is : enables support for very long paths ?)

 

Do you have an idea of the APIs used by Robocopy in this case?

Thank you.



#133 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 11:26 AM

JFYI

 

About HotSwap! pre-settings

 

I ran following quick test:

 

Installed PE_10x64_US_S.wim in a WB VHD, and keeped it mounted and used Remote Regedit TI to import following REG file.

 

HotSwap.reg

 

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Software\HotSwap!]
"AutoRun"=dword:00000001
"DisplayPDO"=dword:00000000
"SpinDown"=dword:00000000
"DFlags"=dword:10000006

 

 

 

Unmounted the VHD and rebooted from it, and HotSwap! settings were just as desired.

 

But so far I'm not able to make a working TK_HotSwap.reg to be used during building the SMALL PE.

 

alacran



#134 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 March 2022 - 12:50 PM

TK_DEFAULT_HotSwap.reg is working

 

Update will follow later this day ....

 

Attached File  HotSwap_sshot-004.jpg   208.83KB   0 downloads



#135 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 12:53 PM

HotSwap! settings solved:

 

I added the HotSwap.reg file to \Add_Folders_Files\Windows\System32 and edited the Pecmd.ini

 

Added in _SUB PostShell section the following:

// Load HotSwap.reg in background
EXEC @!%WinDir%\System32\HotSwap.reg

Just before:

// HotSwap! 'Safely Remove Hardware' tray Icon
EXEC %WinDir%\System32\HotSwap!.exe

 

alacran



#136 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 01:02 PM

Same can be done also if we make a SFX FF_Profile.exe, copying it to \Add_Folders_Files\Windows\System32

 

And adding in Pecmd.ini _SUB PostShell section the following:

 

// Load FireFox profile in background
EXEC @!%WinDir%\System32\FF_Profile.exe

At the end of _SUB PostShell section

 

It works fine, but a txt file is shown on screen when booting phase finish.

 

This could be an alternative way to avoid the long paths issue.

 

alacran



#137 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 March 2022 - 01:08 PM

Update Download:  Make_WinPE_Trusted-36 -  pw=bootwimb   for Windows 10/11 x64 OS 
 
Download:  Win10_2004_English_x64.iso  (best)    Or  Win11_English_x64v1.iso  Or  Win11_English_x64.iso  (better than 11v1)
 
QuickFix
- Update ImDisk Desktop Icon
- Added TK_DEFAULT_HotSwap.reg to get correct HotSwap Settings
 
Yes there are different ways, but the present solution is working OK

  • alacran likes this

#138 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 01:09 PM

TK_DEFAULT_HotSwap.reg is working

 

Update will follow later this day ....

 

So the trick is use [HKEY_LOCAL_MACHINE\TK_SOFTWARE\HotSwap!]

 

Not [HKEY_USERS\TK_.DEFAULT\Software\HotSwap!]

 

alacran



#139 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 04 March 2022 - 01:25 PM

No that is also wrong.

 

The DEFAULT Hive is online via Component Load on HKEY_LOCAL_MACHINE loaded as TK_DEFAULT

 

The correct Registry Fix for HotSwap is then

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\TK_DEFAULT\Software\HotSwap!]
"AutoRun"=dword:00000001
"DisplayPDO"=dword:00000000
"SpinDown"=dword:00000000
"DFlags"=dword:10000006


  • antonino61 likes this

#140 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 04 March 2022 - 02:00 PM

sorry to butt in in an off-topic-like fashion, but while trying to safely delete as much as possible from ordinay vhd os installs, what wonko once said of the reducing procedure (a couple of years ago) suddenly hit my mind again - proceding by addition to a winPE-like vhd, rather than by reduction of an already installed full vhd. now my question is, what could we learn from a winpe \windows\system32 and \windows\syswow64 file and subfolder structure that could come of advantage in the making of the smallest operable win10 or win11 vhd filedisk install? more specifically, if we keep the same windows structure (mainly the root files) as the winpe in the vhd filedisk, what files do we need to add in order to get to a workable minimal windows install?

my concern is to avoid taking out some vital files in further and further reducing, inasmuch as it is quite a bit of a pain to backtrack what file or files should not have been taken out from among a myriad - it could be done, but it is easier if we could add whatever to a minimal workable than to take out as much as possible from a maximum working. all of this with a view to doing a cleaner job.



#141 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 March 2022 - 11:31 PM

@ wimb

 

Understood, if we want to add something to the PE Registry in DEFAULT hive we should use:

 

[HKEY_LOCAL_MACHINE\TK_DEFAULT\.....\.....]

 

Also I'm going to keep the following addition to the Pecmd.ini file, but commented, it doesn't hurt to keep it (memory is weak sometimes), just in case I may need to use it in the future:

 

 

// Load FireFox profile in background
// EXEC @!%WinDir%\System32\FF_Profile.exe

 

 

alacran



#142 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 March 2022 - 12:33 AM

@ antonino61

 

Hi my friend, about the comment in your post:

 

 

wonko once said of the reducing procedure (a couple of years ago) suddenly hit my mind again - proceding by addition to a winPE-like vhd, rather than by reduction of an already installed full vhd.

 

Assuming your remember clearly that Wonko suggested that.

 

With all due respect to our very appreciated friend Wonko, I fully disagree in that advise, as it doesn't make sense.

 

When dealing with PEs we start from an environment that lacks many features and then it makes sence to find the dependencies we need for the software we want to add, and also find what we need to add to the Registry to make that software work. So in this case the process is aditive.

 

When dealing with Mini-VHDs we start from the oposite environment, we start from an environment that already have almost all we may need, and even many more things we will never user, then to reduce its size we delete all we don't need/want. So in this case the process is subtractive.  But IMHO it is better to let the Registry untouched (it doesn't hurt), just in case we latter need to copy back some EXE, DLL and/or MUI files we may need in the future.

 

With the only exception that in Mini-VHDs we may find latter some additional software, (portables or installed programs), that we may want to use but they don't run fine in a Reduced Mini-VHD, then in this case we have to act just like in a PE environment to make they run fine, finding the dependencies and also (if required) find what we need to add to the Registry to make that software work, but this is not a very frecuent case.

 

For now during the development of this project, several things that can be also safely deleted in the Mini-VHDs, have being found, but our good friend wimb, already added them to his new version of Win_Reduce_Trusted-62,  so don't worry, so far all findings are already included, only lack is the info quoted in the spoiler.

 

Spoiler

 

But if you mean you want to continue your never ending task of reduce even more your Mini-VHD personal version, IMHO this is not the right place to comment about it, it is better you talk about that in your own topic, related specifically to that:   Get-alladafluff-out

 

alacran


  • antonino61 likes this

#143 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 05 March 2022 - 01:36 AM

ok, thanks for the answer, I did try the doubt in the spoiler, and went even further, by deleting the efi folders, which are superfluous in my case. are there any other doubts about the boot subfolders? as for wonko, I do not think he exactly said to start from the winpe; he said the spirit was to start from the idea of the winpe and rely on portables, but i do not think he meant to start from the winpe concept itself, which as I had suspected and u have confirmed, would hinder the process by its registry. we were only talking about the number of files in the root of the two main windows subfolders and a way to reducing it by relying more and more on portables to avoid the influence of the registry and make the system cleaner (our vhds will be as efficient two months later as they are today mainly because we hardly install anything, we hardly modify the registry, thre is little or no dll confusion, and all this in small and fairly controllable sizes). that was the sense of it. as for me, I have to admit that the amount and quality of portables in the winpe here has lured me into the mirage of being able to run everything from winpe, but before too long I realized that it would be ludicrously stupid with such a surgical expertise as we have developed in wimboot tech. and yes, I will continue trying to get rid of some more files, but I agree with u that I am close to the limit of operability. Not so for u, as u seem to be happy with the bare minimum (no dx, almost no framework.net). so i keep putting my shrinking findings in getalladafluffout and in wimboot.



#144 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 March 2022 - 09:26 AM

Tested v3.6 making SMALL and MEDIUM builds.

 

All working perfectly fine in both versions.  CONGRATULATIONS!!!!!

 

This time there is no more suggestions, as all features/capabilities we could desire from a PE using WinXShell are already there.

 

alacran


  • wimb and antonino61 like this

#145 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 05 March 2022 - 09:28 AM

Tested v3.6 making SMALL and MEDIUM builds.

 

All working perfectly fine in both versions.  CONGRATULATIONS!!!!!

 

This time there is no more suggestions, as all features/capabilities we could desire from a PE using WinXShell are already there.

 

 

Thank you very much for testing and feedback  :)


  • alacran and antonino61 like this

#146 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 March 2022 - 09:35 AM

Thank you very much for testing and feedback  :)

 

It was a pleasure, my friend.

 

alacran


  • wimb and antonino61 like this

#147 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 08 March 2022 - 06:02 AM

Update Download:  Make_WinPE_Trusted-37 -  pw=bootwimb   for Windows 10/11 x64 OS 
 
Download:  Win10_2004_English_x64.iso  (best)    Or  Win11_English_x64v1.iso  Or  Win11_English_x64.iso  (better than 11v1)
 
- Added - Version EXTRA to make PE_19041_US_X.wim - Test Version for Bluetooth and Printer support in cooperation with noel (not ready, under construction ....)
- Changed - In program flow now Adding Drivers is last item and comes after Adding Registry instead of just before

  • alacran likes this

#148 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 09 March 2022 - 09:38 AM

From ericgl :  http://reboot.pro/in...=22621&p=221112

 

Hi @wimb , @alacran,
 
What size is your current mini WinPE10 WIM file?
I mean - with all required files necessary for most popular apps to work (7-Zip, Notepad++, MultiCommander, Everything Search, etc...), including Windows Explorer, and including WoW64 for 32bit app support?
 
Just for comparison, I currently have a WinPE10 x64, which I built on purpose without WoW64 and without Explorer GUI (no taskbar, no start menu, no Windows Explorer), but with all necessary files and registry entries to run most apps just fine.
I use MultiCommander as the file explorer, and all copy/move/paste operations are working fine, including ability to view file properties.
This WIM file is 572MB in size. This is after running the command:

wimlib-imagex export %~dp0%WIMFILE%.wim 1 %~dp0%WIMFILE%_NEW.wim --boot --check --recompress
So, just curious to know how "mini" is your WinPE10 WIM file?

 

 

@ericgl

 

Make_WinPE iresults about PE WIM Size are given here

 

MEDIUM  = 448 MB has WOW64 + everything of SMALL + x86 Portable Apps support

SMALL     = 347 MB without SysWOW64 but with WinXShell + MMC + WiFi + Taskbar + PECMD + x64 Portable Apps support e.g. Launchbar for Portables and PE_Tools, and System_Info

 

Both Versions have build-in  7-zip_x64, ChkDskGUI_x64, DBCTaskmanX64, Explorer++_x64 and IrfanView_x64, multimonitortool_x64, PENetwork_x64, Windows Login Unlocker

and RunScanner, ImDisk, KeyboardLayout.cmd, HotSwap!, LetterSwap, notepad

 

WinPE_Sizes_2022-03-03_092508.jpg



#149 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 09 March 2022 - 11:55 AM

@ ericgl

 

wimb forgot to mention that all works in a nice GUI, and it has installed into it:  7-zip, ChkDskGUI_x64, Explorer++ and IrfanView.

 

And many more programs run from Y dirve, just to mention some of them:

 

FireFox-x64 portable, VLC x64 portable, and a big etc.

 

Also runs PE_Tools and System_Info multi programs packages from Y drive, both made by wimb

 

Additionally to launch user favorite portables as Pstart doesn't run on SMALL version (x64 environment), it uses LauchBar_x64 (running from Y drive) to launch additional programs from Y drive.

 

So I can tell you it is a very little WIM with almost infinite possibilities, As long as the portables are x64.

 

alacran


  • wimb likes this

#150 ericgl

ericgl

    Frequent Member

  • Expert
  • 340 posts
  •  
    Israel

Posted 09 March 2022 - 01:12 PM

wimb,

 

Nice to see that you're using Github for your releases.

Also thanks for credit to some members here  :thumbsup: .







Also tagged with one or more of these keywords: winpe, wimlib, winntsetup, wim

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users