Jump to content











Photo
- - - - -

Adding WoW64 to WinPE 10 for 32-bit app support - V2


  • Please log in to reply
41 replies to this topic

#26 Atari800XL

Atari800XL

    Member

  • Members
  • 74 posts
  •  
    Netherlands

Posted 28 July 2016 - 08:09 PM

Wait, it's probably a language thing... My PESE and WinRE are Dutch, my WinPE is en-US...

Sorry, didn't think of that, will rebuild PESE with en-US source tomorrow...

 

Thanks for sticking in there! (Well, until now most issues have been somewhat "productive" for any future howto's, for example "ignore registry import errors", etc.)


Edited by Atari800XL, 28 July 2016 - 08:11 PM.


#27 spleenharvester

spleenharvester

    Member

  • Members
  • 92 posts
  •  
    United Kingdom

Posted 28 July 2016 - 08:15 PM

Wait, it's probably a language thing... My PESE and WinRE are Dutch, my WinPE is en-US...

Sorry, didn't think of that, will rebuild PESE with en-US source tomorrow...

 

Thanks for sticking in there! (Well, until now most issues have been somewhat "productive" for any future howto's, for example "ignore registry import errors", etc.)

 

Certainly possible - good luck! And yeah, could be a lifesaver for others trying to do this - shame I can't edit the OP. 



#28 Atari800XL

Atari800XL

    Member

  • Members
  • 74 posts
  •  
    Netherlands

Posted 29 July 2016 - 05:16 AM

Success!! I made a new basic Win10PESE build (enUS this time), used enUS PE and enUS PESE, ran my new script on it (takes 2 minutes) and things are working just fine. Sorry for being so stupid...

Next issue for me is a bit of a strange one: If I run XYPlorer (which is 32bit only), I get an error ("-2147319780"), which I never have on a normal PESE. The odd thing is: if I run my old portable Excel '97 first and then try XYPlorer again, it runs fine! Running this old Excel in PE is just a "joke", actually, and I found out by accident it fixes the XYPlorer issue, but running it must do "something" to fix the issue. Maybe it does some initializing somewhere, but I can't tell what or where. I ran Procmon on it and compared "before and after Excel", but couldn't find anything. Spleen, what exactly did you do to fix your XYPlorer issue?


  • spleenharvester likes this

#29 spleenharvester

spleenharvester

    Member

  • Members
  • 92 posts
  •  
    United Kingdom

Posted 29 July 2016 - 03:59 PM

Success!! I made a new basic Win10PESE build (enUS this time), used enUS PE and enUS PESE, ran my new script on it (takes 2 minutes) and things are working just fine. Sorry for being so stupid...

Next issue for me is a bit of a strange one: If I run XYPlorer (which is 32bit only), I get an error ("-2147319780"), which I never have on a normal PESE. The odd thing is: if I run my old portable Excel '97 first and then try XYPlorer again, it runs fine! Running this old Excel in PE is just a "joke", actually, and I found out by accident it fixes the XYPlorer issue, but running it must do "something" to fix the issue. Maybe it does some initializing somewhere, but I can't tell what or where. I ran Procmon on it and compared "before and after Excel", but couldn't find anything. Spleen, what exactly did you do to fix your XYPlorer issue?

 

Great to hear! As for XYplorer, all I had to do was regsvr32 syswow64\oleaut32.dll. I think I originally had the same error as you. Things you can try:

 

1) Look at process monitor for file dependency issues. Nvm I see that you did this.

 

2) If nothing obvious sticks out, run the following from command prompt to rule out DLL registration issues (sometimes they don't get carried over with the syswow64 regkeys, I am not sure why):

dir /b x:\windows\syswow64 >x:\wow64.txt
for /f "delims=*" %a in (x:\wow64.txt) do (x:\windows\syswow64\regsvr32.exe /s x:\windows\syswow64\%a)

3) If that still doesn't fix it, launch RegShot and take a shot before and after opening excel, then compare.

 

I notice that WinPE seems to be missing some OLE-related functions at stock compared to WinRE (Multicommander etc wouldn't run either because oledlg.dll was missing). I'm guessing it's either a DLL registration issue or OLE-related regkeys are missing.

 

EDIT ~ Also does XYplorer give you any more details on the error other than code?


Edited by spleenharvester, 29 July 2016 - 04:02 PM.


#30 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 July 2016 - 04:20 PM

 

I notice that WinPE seems to be missing some OLE-related functions at stock compared to WinRE (Multicommander etc wouldn't run either because oledlg.dll was missing). I'm guessing it's either a DLL registration issue or OLE-related regkeys are missing.

 

Seemingly OT, but JFYI, a good ol' way to check/fix:
http://reboot.pro/to...10-mb/?p=154017

 

:duff:

Wonko


  • spleenharvester likes this

#31 spleenharvester

spleenharvester

    Member

  • Members
  • 92 posts
  •  
    United Kingdom

Posted 29 July 2016 - 04:35 PM

Seemingly OT, but JFYI, a good ol' way to check/fix:
http://reboot.pro/to...10-mb/?p=154017

 

:duff:

Wonko

 

Ooh neat, thankyou for this!



#32 Atari800XL

Atari800XL

    Member

  • Members
  • 74 posts
  •  
    Netherlands

Posted 29 July 2016 - 05:06 PM

regsvr32 syswow64\oleaut32.dll. I think I originally had the same error as you.

 

Yep, this did the trick:

x:\windows\syswow64\regsvr32.exe /s x:\windows\syswow64\oleaut32.dll

I believe I had tried that before, but that must have been back when I had the languages mixed up.

(BTW: So XY could have registered this itself, like Excel did?)

So now I have my favorite file explorer working. It's actually an old (free giveaway) version: 11.90. Normally, free versions don't have the nice "portable file associations" feature, but 11.90free has it. Launching documents from XY always starts the correct program, associating them is very easy from an ini file. Very easy to configure, works on any OS (incl. PE), I use it on all systems. Great on w10 as well (which keeps "stealing" assocs).

Just wanted to share why I like XY so much. Of course, the author could/ should have made a 64bit version by now...

 

With XY as my file explorer, TCCLE as command line, and Autohotkey as PE shell (!), things are starting to look pretty good. (Ask me about ahk as a PE shell...), Oh, and of course WinNTSetup for OS installs, and TSE as text editor. Etc., etc.



#33 spleenharvester

spleenharvester

    Member

  • Members
  • 92 posts
  •  
    United Kingdom

Posted 29 July 2016 - 05:56 PM

Yep, this did the trick:

x:\windows\syswow64\regsvr32.exe /s x:\windows\syswow64\oleaut32.dll

I believe I had tried that before, but that must have been back when I had the languages mixed up.

(BTW: So XY could have registered this itself, like Excel did?)

So now I have my favorite file explorer working. It's actually an old (free giveaway) version: 11.90. Normally, free versions don't have the nice "portable file associations" feature, but 11.90free has it. Launching documents from XY always starts the correct program, associating them is very easy from an ini file. Very easy to configure, works on any OS (incl. PE), I use it on all systems. Great on w10 as well (which keeps "stealing" assocs).

Just wanted to share why I like XY so much. Of course, the author could/ should have made a 64bit version by now...

 

With XY as my file explorer, TCCLE as command line, and Autohotkey as PE shell (!), things are starting to look pretty good. (Ask me about ahk as a PE shell...), Oh, and of course WinNTSetup for OS installs, and TSE as text editor. Etc., etc.

 

Seemingly Excel must have done - doesn't surprise me that MS could add 'self-repair' functions like that if it detects a registry problem.

 

I really hope a 64-bit version of XY is released. It's a really incredible program, but it has issues with WoW64 redirection in this environment - any attempts to open a .reg, .vbs or .msc file will fail because it's being redirected to WoW64, and 10PESE doesn't have WoW64 versions of regedit, MMC and others. I'm very tempted to add the dependencies for them in WoW64 manually in the meantime because it is so much better than multicommander.

 

Theoretically it wouldn't be that hard to add support for blocking redirection for those programs since the program is capable of doing so when viewing system32, but I suppose this very niche scenario is the only time that it would be necessary.

 

(Also had never heard of any of those other programs you mentioned - they look useful!)


Edited by spleenharvester, 29 July 2016 - 05:58 PM.


#34 Atari800XL

Atari800XL

    Member

  • Members
  • 74 posts
  •  
    Netherlands

Posted 29 July 2016 - 06:08 PM

See, that's why I insist on a XY version with Portable File Associations.

Example (xyplorer.ini):

[FileAssoc]

1=+"Open with Sumatra" pdf>"C:\Program Files\SumatraPDF\SumatraPDF.exe" -esc-to-exit

2=+"Open with TSE" xml>c:\program files\tse\q.exe
3=+"Open with UltraISO" iso> C:\Program Files\Utilities\UltraISO\UltraISO.exe
etc.

 

As long as you keep the ini with the XYPlorer exe, you always have the correct program opening your documents (like I said, great for PE, but also great for Windows 10 and its stupid Metro associations).

 

Oh, and by the way: No chance of a 64bit version anytime soon, I'm afraid.


Edited by Atari800XL, 29 July 2016 - 06:10 PM.


#35 spleenharvester

spleenharvester

    Member

  • Members
  • 92 posts
  •  
    United Kingdom

Posted 03 August 2016 - 01:43 AM

Update for 02/08/16 - I can confirm this still works on the Anniversary update, but a few notes:

  • You need to make all your regkeys etc again from scratch. If you use the SxS keys for 10.0.586.0 at any stage you will get CRITICAL_PROCESS_DIED.
  • If you have just installed the Anniversary update and have not received further updates you can export the SxS keys from your own running installation.
  • win32u.dll and gdi32full.dll are new dependencies for syswow64 in 14393 necessary for many programs to work.

 

I am also working on translating 5-WoW64.script/part of 1-Files.script to batch form to bypass the Winbuilder steps entirely, which generates WinSxS, Syswow64 and System32\catroot for you from a source. Used it to successfully add WoW64 to my new anniversary image, and it has only added 56mb to the WIM size. Will upload when some things have been smoothed out.


Edited by spleenharvester, 03 August 2016 - 02:13 AM.


#36 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 August 2016 - 10:41 AM

I am also working on translating 5-WoW64.script/part of 1-Files.script to batch form to bypass the Winbuilder steps entirely, which generates WinSxS, Syswow64 and System32\catroot for you from a source. Used it to successfully add WoW64 to my new anniversary image, and it has only added 56mb to the WIM size. Will upload when some things have been smoothed out.

Wonko approves of this batch "translation" :), though you cannot really use "only" to refer to 56 Mb (you will need a special license for that ;)).

:duff:
Wonko

#37 Greg13

Greg13
  • Members
  • 4 posts
  •  
    France

Posted 22 April 2017 - 08:19 AM

Hello thanks for the tutorial :) but i have a problem when i want to add some registry keys, if i do this manually with regedit it return "Some keys are open by the system or other processes." and if i do in command line with reg.exe it return "access error to registry" Does somebody have solution ? thanks by advance everybody :) Sorry if my english is not so good that your :)

 

 

I have make a modded batch file based from Atari800XL work

@Echo Off

If "%1"=="" goto Usage
If "%2"=="" goto Usage
If "%3"=="" goto Usage

Mkdir temp
:: Testing File
If NOT exist %1 (
	Echo File : %1
	Echo Not Found ...
	Pause
	Goto End
)
If NOT exist %2 (
	Echo File : %2
	Echo Not Found ...
	Pause
	Goto End
)	
:: Export hive from PESE
7z.exe x %1 -otemp\pese\hive windows\system32\config
If not exist temp\pese\hive\windows\system32\config\system (
	Echo Error whil extrating file on PESE.WIM
	Pause
	Goto Clear
	)
)

:: Export reg key from pese hive
Mkdir temp\pese\reg
reg load hklm\sys temp\pese\hive\windows\system32\config\system
reg load hklm\soft temp\pese\hive\windows\system32\config\software
reg export "hklm\sys\ControlSet001\Control\Session Manager" temp\pese\reg\01sys-bootexecute.reg
reg export "hklm\soft\Microsoft\Windows\CurrentVersion\SideBySide" temp\pese\reg\02sidebyside.reg
reg export "hklm\soft\WOW6432Node" temp\pese\reg\03wow6432node.reg
reg export "hklm\soft\Classes\WOW6432Node" temp\pese\reg\04classeswow6432node.reg
reg export "hklm\soft\Microsoft\Windows\CurrentVersion\SMI\WinSxS Settings" temp\pese\reg\05smi.reg
reg unload hklm\sys
reg unload hklm\soft

:: Export PESE files
7z.exe x %1 -otemp\pese\files Windows\WinSxS
7z.exe x %1 -otemp\pese\files Windows\System32\Catroot
7z.exe x %1 -otemp\pese\files Windows\SysWOW64
7z.exe x %1 -otemp\pese\files Windows\System32\wow64.dll
7z.exe x %1 -otemp\pese\files Windows\System32\wow64cpu.dll
7z.exe x %1 -otemp\pese\files Windows\System32\wow64win.dll
7z.exe x %1 -otemp\pese\files Windows\System32\loadWOW64.exe

::Export raw PE from orginal boot wim
wimlib-imagex.exe export --boot %2 1 %3

:: Deleting WinSxS from the raw PE
wimlib-imagex.exe update %3 1 --command="delete \Windows\WinSxS --recursive"

:: Export hive from raw pe
7z.exe x %3 -otemp\pe\hive windows\system32\config
:: Import PESE reg key to raw PE
reg load hklm\sys temp\pe\hive\windows\system32\config\system
reg load hklm\soft temp\pe\hive\windows\system32\config\software
reg import temp\pese\reg\01sys-bootexecute.reg
reg import temp\pese\reg\02sidebyside.reg
reg import temp\pese\reg\03wow6432node.reg
reg import temp\pese\reg\04classeswow6432node.reg
reg import temp\pese\reg\05smi.reg
reg unload hklm\soft
reg unload hklm\sys

:: Update file and registry in raw PE 
echo delete 'windows\system32\config' --force --recursive > temp\wim-update.txt
echo add 'temp\pe\hive' '' >> temp\wim-update.txt
echo add 'temp\pese\files' '' >> temp\wim-update.txt
wimlib-imagex.exe update %3 1 <"temp\wim-update.txt"

:Clear
rmdir temp /s /q
Goto End

:Usage
CLS
Echo.
Echo ThisBatch.bat pese_wim boot.wim new_wim
Echo.
Echo 	*** "pese_wim" is a PESE 64bit with 32Bit support idealy from spam
Echo 	*** "boot.wim" from original Windows Setup
Echo 	*** "new_wim" your final RAW PE 64bit with 32Bit support
Echo.
Echo ----------
Echo \ Original script from "Atari800XL", Modded by Greg13
Echo / Based on "spleenharvester" from Reboot.pro
Echo ----------
Pause

:End


Edited by Greg13, 22 April 2017 - 08:34 AM.


#38 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 22 April 2017 - 09:19 AM

@Greg13
Without having access to your registry entries it's difficult to know which entry/entries are causing problems.

I had a similar issue in MistyPE and use a workaround - adding the necessary entries via a batch script executed by winpeshl.ini.

Alternatively you could use Erwan's excellent Offlinereg :worship: - this can bypass the security permissions in the registry.

Misty

P.s. Why use a PESE build as a base? It's possible to obtain all of the required SysWoW64 files from the same RTM .iso containing your boot.wim file.

#39 Greg13

Greg13
  • Members
  • 4 posts
  •  
    France

Posted 22 April 2017 - 10:36 AM

Hello thanks for quick answer, i will going to try Offlinereg  :)
 
I use PESE build, for falow the tutorial of spleenharvester, in the pese build of spam the file of SysWoW64 are not patched ?

Edited by Greg13, 22 April 2017 - 10:37 AM.


#40 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1920 posts
  • Location:Nantes - France
  •  
    France

Posted 24 April 2017 - 12:06 AM

Hello thanks for quick answer, i will going to try Offlinereg  :)
 
I use PESE build, for falow the tutorial of spleenharvester, in the pese build of spam the file of SysWoW64 are not patched ?


Hi Greg,
If you need help with offlinereg you can PM me in french if you wish.

Cheers,
Erwan

#41 Greg13

Greg13
  • Members
  • 4 posts
  •  
    France

Posted 26 April 2017 - 12:39 PM

Thanks, dont worry offlinereg is easy to use :) I just do not understand why it does not manage export...

 

 

But (yes another one problem) when all is do i have a new error message :

 

 

 

SYSTEMROOT directory(X:\Windows) is different from the configured one (x:\Windows~BT\Windows)

Edited by Greg13, 26 April 2017 - 12:41 PM.


#42 Greg13

Greg13
  • Members
  • 4 posts
  •  
    France

Posted 26 April 2017 - 04:35 PM

I have solved my problem with DISM /Set-TargetPath:X:\ (Link)

But ... I have a Side-By-Side error... while i have fully export and import Side-By-Side registry key of PESE, i don't have any idea for this if someone have solution?

 

(i Make my english training when i wrote a new post lol  :D  My english is corect for moment ?)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users