Portable Windows 7 build from Winpe 3.0

226 posts in this topic

Network connections now finally works. No need penetwork anymore but will be in it because it is usefull for settings and installing network drivers. Wim size 316mb and i can work with 512mb ram if you dont want to use services. Will have all windows services but some of them will be disabled. It have %80 of windows 7 in it. This winpe wim has 64mb stratch size that is more hten microsoft default 32mb. So if you decrease it to default it will use 32mb less memory. Good part of this wim is it is serviceable as winpe yet with SIM. It has latest ati and nvdia graphics drivers in it and it gets wim size bigger. I didnt add extra files to winsxs. It has only files from winpe.wim (maybe i should add some)




remote desktop to my winpe7

works really fast on remote. more then in my vmware



Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

how i did?

It is long story that i worked on it 2 months. But i want to summurize shortly.

First i build a winpe boot wim from windows opk. Added all packages except korean chineese language packs. and for wireless support http://support.microsoft.com/?kbid=972831 Windows6.1-KB972831-x86.cab package. You can find from internet how to build winpe. I won't tell it here. After that i found out what makes explorer to get work from winpebuilder. It is only a registry hiv that is hidden in winpebuilder "clid.reg". It adds keys to Software\Classes section. I manually added this reg file to Config\Software\Classes. Also for explorer to work need Explorer key in Config\Default hiv. I didnt add it manually. I decided to take it from windows install wim and put in it. Because of we want most close winpe to windows 7 i compared and add from windows install.wim hives as much as i can. I added all dll,exe,and cpl files from windows install.wim System32 folder with mui files. Dont add searchinderxer files. I works but get very slower the winpe. Also explorer.exe and its mui. (First we should get it work all we can remove what we dont want later.) If you did until now your pe should boot. Because we didnt do anything yet that it dont boot only add clid.reg. First you can try to boot to a command console and run explorer.exe works or not. Our first aim is to get it work. Before i thought only to add services manually to config\system\services one by one. i was taking from install.wim\config\system\services as reg file and adding to pe. After sometime i undertand that i was doing wrong. What wrong? because i need to make the ownners same too. if you take reg and add another. new reg keys owner is getting yourself. It is true for all registry operations. After i found a way to copy reg keys with owners. found a registry software (Registrar Registry Manager) and copied by it as hiv files. if you work with hiv files i think owners doesnt change. These were my first experiences i used before, after i decided to copy all services tree from windows install\system\services. I was know that it cant run, it doesnt run too. I tried to get manual all services except really needed ones because if a service is automatic it can crash the system. after i imported services hiv added winpe services keys on it too. so there will be all winpe keys and extra windows 7 services.


Share this post

Link to post
Share on other sites

biggest trick for services is the to use legancy support. it was using at last windows xp pe building phases but i dont know it doesnt using much in winpe7. for legancy drivers you need config\system\enum key. you can import all the key from win7 install wim to your pe. it will add all vga usb, network etc legancy support. but it makes winpeutil takes more long time. from legancy network keys you can delete which you dont want. forexample legancy_tcpip6. but keep it all for now. later compared SYSTEM\ControlSet001\Control\ keys and added absent ones. Better to add only absents for now you can add edit if you are expert. Need to change product options key with win7 one it should be Terminal Server Personal or Terminal Server. Now time for edit software hiv. Sorry i remembered now if you read previous message for explorer to work we should make a change in software hiv. need to compare and add suitable keys from SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon for explorer to work. this is important and one more important thing is for services to work you should copy ALL SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost key. And again important key is you should copy ALL SOFTWARE\Microsoft\Internet Explorer key else you take a message that mmc snapins cant work internet explorer version previous then 5.5 error.


Share this post

Link to post
Share on other sites

if you are reading my notes also you can find tricks that builders dont tell ever how they can get them work wink.gif If you scared to make war with hives or couldnt get successfull. simply you can build a winpe7 and continue from there to make it close to windows 7. you dont need to start from opk and winpe.wim. but in every condition you must work with hives if you use winpebuilder or not. For customize it or add extra functionality. Now i want to tell about working with services more because i spend most of my time with services. If one of service dont worksteps for digging it why is here. First control ownerships of service or you will get you dont have permissions error. second check software\winnt\svchost hive and if the service in there or not. third use a small program of microsoft Procmon (it helps me much in everthing) try start the service and look which registry hives it wants to reach and which files it need. copy the needed files. you can use it for features too. fourth use google smile.gif Also imagepath values of services sys files shouldn't be "\SystemRoot\system32\DRIVERS\hidusb.sys" should be "system32\DRIVERS\hidusb.sys". change all

I dont know what to add more now. free for questions for more info.


Share this post

Link to post
Share on other sites

from the topic you can see it is close to final. i dont finished yet :( Need disable unneded services (will not delete only disable) and delete related files (if you want it to work copy needed files only.) Everybody wants small and wants everything. Both cant stay together. Functionality or speed and slimness need to choose one. Everybody wants it to work under 512 mb ram but also they want all services. it is not possible. Want to share details after i feel it is ready and effective. I decided that wont be these, maybe they can work but i dont want. Nearly 100 services can work.

Dot net framework (eventsystem,infocard dont work without it i think. it can get wim size very bigger)

Internet explorer, side show, gadgets.


windows update


tabletpc stuff

ofcourse readyboost,prefetch (why need in a pe)

I dont have wireless hardware. i didnt test wireless support in real. If you use penetwork wireless starts and works without hardware

And finaly i get it work to remote desktop to my winpe. oleyyyyy. Do you know how did this start. I started to this job only can remote desktop to my winpe. My aim was not to build a portable windows 7. and at last i succeded. i dont care else.

Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

audio anpointbuilder and audio service works but mmcss service qwave not. for audio service to work should delete a dependency. in dependencies only should be auidoenpointbuilder and rpcss. i added hd audio support also ati hdaudio driver (it was small) i am experimenting in virtual machine. do you want screenshot before to install drivers or a clean boot without work of winpeutils.? for the dirvers forcely install need to use portlock device manager. it can be grab from their demo portfrog cd.

want to give a trick just i discovered. for it to get more closer to a windows 7 should copy all software\microsoft\windows\explorer key from a windows install.wim. small trick but gives more functionality. i dont know why but my flashdisk started to automount after this :)


i have creative soundcard. didnt add its driver. it is big and useless. but now i am using usb speakers without drivers. I am using only from flashdisk when i complate. now i am testing in vmware.

Change user started to work too. Only i miss is now shutdown in start menu. It will be fully functional after i solve it. I was working under system account i know from my past experiences but i forgot how i did it i cant do agin :( Aero only works if you enter as Administrator. I think system user doesnt have right for themes i dont know. shutdown button works too if you logged as Administrator. :) will try to login administartor default when boot.

Another trick

For local users and groups in computer managerment to work need to add Software\microsoft\Ads registry key to pe

Need change {4026492F-2F69-46B8-B9BF-5654FC07E423} key in clid.reg. it contains firewallcontrolpanel.exe that doesnt contain in windows 7 systems only vista it has maybe made from vista. it doesnt let firewall control panel to load. should be like this


@="Windows Firewall"

























as you can see from picture it is servicable yet. you can add packages. enable profiling and remove unused files. if use winpe7builder it wont be servicable anymore. it will give the opportunity to change language. but need to add mui files of your languages from windows 7 dvd manually.


Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

This is the list that profiling gave me

MOD EDIT: this file list was really slowing down the topic. I put it in a text file instead.


Edited by xper
removed file list

Share this post

Link to post
Share on other sites

this list can be usefull for you if you change all tr-tr to en-en with notepad and apply to your winpe7 (only an idea need to try if its work or not)

i added xwizard files (xw*.* all they are all apporximately 1mb) and imported config\software\microsoft\windows\current version\xwizards key and now network connection manager looks fully working. (you can add delete network connections) i dont have a wireless card but wireless connection setup should work. i cant say anything sorry. This 1mb extra cost can give you all the network opportunities. I think it should be a must.



Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

i am sit all today front of this pc. offf. get lots of improvement. things i wrote to here are only small part of it. impossible to write everything. my wim is unoptimized yet. i degreased size to 303mb after added more functions and get 316 again. it is my limit i think. trying to add net framework. it looks like wants only a file mscorwks.dll but 5mb. if optimization is universal we can have a 250mb all windows 7 i think :) optimization should be the last option. and one more trick. for wmi support and mmc snapin need system32\wbem\wbemcntl.dll

maybe i can get eventviewer and other .net dependent mmc snapins to work but also it wants vc80.crt.manifest and vc.80 dll files dont work only yo copy them. they want sidebyside registry key. i can add that key but i afraid it can destroy servicability. for servicability shouldnt touch to sidebyside registry hives.

i use vista imagex. it works very faster. i am testing in every 15 minutes. for to use dism need to install and it works very very slow. i cant optimize now.

Event viewer of windows xp works in pe but it gives The handle is invalid error and not shows any logs. http://support.microsoft.com/kb/172156 not helps. anybody knows a solution?

I have some ideas.

1-) What will be? Apply install.wim to a partition and apply profiling enabled winpe.wim on it. It will change all files to winpe.wim and we will have extra install.wim files (all of them) After we open with a windows dvd and select repair boot and create boot folder. Disable ramboot and let it work as it installed system. It will be installed winpe.wim. (it shouldnt be impossible. I am sure winpe.wim can work from disk too.) After we have all of the options should work. (You should merge all windows 7 hives and winpe hive like me without loosing servicablity.) We can open all the programs and options we want and save the profile and we apply that profile to that image.

2-) Or need a pc that have more then 4gb memory and boot this image to ram :) and apply profile.

3-) Less possible option is boot from winpe to ram. change drive letters and make windows install.wim partition the X: partition. and apply the profile.

First need to solve profiling size problem. Maybe if i decide and have lots of time to experiment and willing i can try.

I am trying to optimize the wim. I try to run as many options but after that it says profile size get the biggest size of it can be and lost some lines, look to the documentation to set its size bigger. I set the scratch size bigger not solved. Anybody knows the command line setting to set profile file size.? Or registry trick.?

One more trick. Removing hive log files break servicability. If you are deleting them for having space dont forget this.

And the worlds smallest windows 7 coming soon with 250mb wim size, 12mb winsxs folder and working 100 services under 512mb ram. I dont know why but after optimization and it delete so many files more services started to work :) Event system and Sens started to work.


259mb wim size. can work smoothly with 512mb ram. but in photo there is working 102 services and there is a remote connection. If you need remote desktop and more services you need better to have more ram. But for internet 512 enough. normal usage uses 460 mb ram. And believe me there are more files to delete inside wim :)

Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

it was a initial list but not many things changed after that list. I am editing and changing the wim everyday. I don't manually edit profile list, maybe it can break dism. i give unchanged.

I want that if you will use in winpebuilder or somewhere want you to add somewhere (in a readme.txt or else) a thanks for the helps of my name. It is a MUST for me.

I think for the .Net framework dependent soft and services i had a HALF support. How did i do that.your Microsoft.NET folder should be like this.








Microsoft.VC80.CRT.dll file is equal to the msvcr80.dll only name changed.

Microsoft.VC80.CRT.manifest is equal to the x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5.man

ifest file in winsxs folder.


Share this post

Link to post
Share on other sites

smardcard and winbio maybe can work only add extra files i dont think they need registry edit. I want suggestions about what service you want to work or want features you want it to work in this project. Also the feautres that will never need and ideas for to remove welcome too. because we want the smallest and useful isnt it. I will shape the final steps with your ideas.

action center - no

sytem restore - looks like have but i dont know works or not.

firewall - yes

performance center - yes but now says it works under battery and dont show anything in my vmware

can work for fundemantal options.

remote desktop - yes fully functioning also with want support by mail but i dont know how it will be wihout mail client :)

backup restore - works also want dvd writer but i dont have in my vmware

scheduler - service works but mmc snapin not.

disk manager - yes

event viewer - not

Network and internet center - looks fully function

database support - looks functioning

printer support - have fundemental driver. spooler and services stay. some files from system32 stay. but didnt try.

autoplay - looks have everything

sound vga - usb sound driver works, standart vga works. have latest ati nvdia drivers. but after i start sound services and

install drivers the red cross on volume system tray icon doesnt disappear. didnt heard sound yet. there is no player.

directx - all versions stay. dont know about directplay or open gl.

monitor - options stay.

program add remove. - looks like functioning. but doesnt show any installed prog or add remove feature.

compatibility - no

default programs - yes

user accounts. - half working. add user change password. etc. works

cardspace - no

credential manager - yes

personalization, monitor settings - works. but couldnt change theme in system account. change walpaper not works because i didnt add picture viewer

system tray, folder options, fonts, clear type - works

date, time, system zone, keyboard, mouse - works

accessibility -no

deployment tools - yes

iscsi - yes with configurator and cpl support

location notifications - yes

calc,notepad, charmap -yes

Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

i am a little busy for 2 days. will try to help when i find time. first try to run seclogon and sessionenv services (maybe more session and user dependent services.) try to logon as different user. (you are system user by defaut, login admin) use a working winpe registry hives (preferably in your language) and try to use control panel and explorer and be sure problem is because of registry. (need to eleminate possibilities.) i think is is because of language difference. i remember i had such a problem when i start this job mixing english locale tiny7 and winpe but i dont remember now how i solved.

Edit: I think i remembered. try changing config\software\microsoft\windows\currentversion\explorer key with the one from windows install.wim.

Edit II. Use procmon. try to open explorer or control panel. Look which hives or files are the reason of the error. It can help.

and i want to say that i never used vista or windows 7 in my life :cheers: cheers

for usb webcam support needed file list






























for portable skype



need to disablae firewall or add rule. (i think will need to do that all other nonmicrosoft software that use internet :glare: )

not more then 1.5 mb uncopomressed. doesnt change wim size much. my web cam installed successfully. need to check if it works. will edit post after check. sti service works. skype says stream error.


Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

Key's like these can only work in full windows, as PE doesn't have user login.



"RunAs"="Interactive User"

They should be removed as they cause problems in PE mode.

I registered ieproxy.dll and it works now. For auto register ieproxy.dll, i booted in winpe. registered it. Backed up HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface key. after i imported offline winpe.wim. ıt works now without need to register it.


Note: I can't work power.cpl :) Need help for it. Advices wellcome. Maybe i can solve reboot shutdown.

Trick: For photoviewer i deleted runas keys from classes registry key. and added system32\spool\color folder. it need for icm

Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

my boot process is like this.

first winpeshell.ini works. it starts dart6.5 netstart.exe ( netstart.exe complately hides winpeutil commands in background. i dont see and dos command windows. my winpeshell.ini like this.)




Netstart works, asks as promt to work winpeutil to work or not. if i select yes, it works that and install all drivers and network support at background. if i select no. it doesnt work winpeutil. (Without winpeutil works i can start winpeutil later by running penetwork when i need network and driver support.)

After it loads PEShell.exe. My PEShell.exe is like this.

[shell Loader]




WinPe7 = Explorer.exe

Active@ Bootdisk = startshl.exe

Portlock = "%SYSTEMDRIVE%\Program Files\Portlock\Leap Frog\OSManager.exe"

Dart 6.5 = ERDLogon.exe X:\sources\recovery\tools\MSDartTools.exe

Recovery Environment = X:\sources\recovery\recenv.exe

Command Prompt = Cmd.exe

Explorer = dxplorer.exe


; Command Line Syntax:

; StartupFlag=CommandLine

; StartupFlag is a bit field.

; Examples:

; 0 = run hidden and wait (00 00 00 00)

; 1 = run normal and wait (00 00 00 01) (Default in previous version)

; 2 = run hidden and don't wait (00 00 00 10)

; 3 = run normal and don't wait (00 00 00 11)





it automatically works explorer as shell hidden at background. i dont select the system at startup. i will add peshell icon to desktop and change shell when i want. i open explorer as shell first boot default. In this 270mb wim there is also dart 6.5 tools and recovery environment. now i need to add portlock and active@ bootdisk.

it works flawless now. i can change any shell without problems. there is no extra loader, crate icon stuff (i create icons manually and put to config\system profile\desktop). nothing to get it slower. Only disadvantage is netstart or maybe dart 6.5 causes double folders in root drive. dxplorer.exe is renamed explorer.exe of dart tools. it will conflict with windows explorer.exe if not renamed. (i dont remember now if i hexedited it, i think i did.)


Share this post

Link to post
Share on other sites

My nightly build. I dont think you will see such a pe for some years. But don't forget the topic title. Nothing is impossible. Winsxs folder same 12mb. without changing it i can add anything. I dont understand from this microsoft job. It is a little strange that i dont take any sidebyside error. wim size not much bigger but doesnt works under 512 ram becase of running programs and services. They use more ram them the wim size. it's 3am.


Edited by Kullenen_Ask

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.