Topic: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?  (Read 76564 times)

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #240 on: February 23, 2021, 05:36:35 PM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 266
Hi,
I test in "my" winpe and my bluetooth headless works well.

Quote
In the WinPE, you have to wait 10 minutes
I don't see this delay in "my" winpe". But it's true, i modify some prg and i don't remember which and why i do that.
But i think i modify deviceSetupManager.dll about this delay of 10 minutes. i write this somewhere in this "thread".
I notice that devicePairingWizard.exe take delay to sea a device. it's why i write my own program.  Need some tests for me later.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #241 on: February 24, 2021, 01:59:29 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
@ Noel,

Your Reply #237 :  I am thrilled when I see what effort You make. Take Your time.
I was looking for a useful solution regarding bluetooth issues myself for months.

And it seems to Me (thank to Slore's quick and friendly delivery of "..\01-Components\Bluetooth\main.bat")
it shines light on the tunnel.

@ Slore,

Many thanks for sharing. I copied and pasted Your "https://gitee.com/slorelee/wimbuilder2/blob/master/Projects/WIN10XPE/01-Components/Bluetooth/main.bat" and I am impressed by Your work. Now I go to evaluate Your code work and try to insert it somehow into my PE and to test it.

It will take some time then I'll report back.

Have a nice day everyone.
« Last Edit: March 22, 2021, 10:01:26 AM by HeyJoe, Reason: Removed spaces in url »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #242 on: February 25, 2021, 09:59:21 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
@ Noel,

don't worry about session system/admin... I am sure You will get it.

 I applied Your fantastic ISO work. This file was servicing to Me verry well (as excpected !). Not only in virtual box but also with a machine which is a bit older (about 2005 or so). BTW, during testing I noticed that the machine is x64-capable (great  :smile: I didn't care until then about its capability).
Your ISO is x64 v2009. I use x86 v1809 as I wrote. Using x86 s my intention because a lot of friends around Me use older machines (not all of theese machines are x64 capable ones) that is completely sufficient they say, so they don't want renew. And so, I can assis themt sometimes in repair tasks or other technical matters.

So, bluetooth now works.
What next? Maybe the often helpfull M$ event logging systen I saw You got working.  Let's see.

Finally, I would like to thank you very much for your kind support.



@ Slore,

again big thank to You for "..\01-Components\Bluetooth\main.bat".
Strangely enough, only a few files and registry entries were missing.
Together with Noel's unbelievable effort it seems done for Me.
I'm really looking forward to your next announced compilation "WimBuilder2-Full.v2021-03-03.7z package"



@ Noel + @ Slore

You are great buddies.
Stay healthy and have a nice day everyone.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #243 on: February 25, 2021, 10:24:41 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi,

because I am not allowed to edit My last post yet.

here is what I missed:

If,ExistFile,%Source_Sys%\btwdi.dll,Require_FileQ,btwdi.dll
Require_FileQ,PlayToDevice.dll
Require_FileQ,playtomenu.dll
Require_FileQ,PlayToReceiver.dll
Require_FileQ,PlayToStatusProvider.dll
Require_FileQ,dafAspInfraProvider.dll
Require_FileQ,DafDnsSd.dll
Require_FileQ,dafDockingProvider.dll
Require_FileQ,DafGip.dll
Require_FileQ,DAFIoT.dll
Require_FileQ,DAFIPP.dll
Require_FileQ,dafpos.dll
Require_FileQ,DafPrintProvider.dll
Require_FileQ,dafupnp.dll
Require_FileQ,dafWCN.dll
Require_FileQ,dafWfdProvider.dll
Require_FileQ,DAFWiProv.dll
Require_FileQ,DAFWSD.dll
Require_FileQ,QuickActionsDataModel.dll
Require_FileQ,irprops.cpl

Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\DevQuery
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\mediaCategories
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\mediaInterfaces

Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\DeviceAssociationBrokerSvc
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\DeviceAssociationService
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\SWENUM
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\WinSock
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\WinSock2

Many greetings from Germany to everyone in this impressive community.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #244 on: February 26, 2021, 12:17:53 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
HeyJoe,

Just a small tip about "file-copy" syntax to get it more compatible and easier to write :

Code: [Select]
Require,FileList,,My_List
//-
If,%BuildClass%,Equal,2,Begin
If,ExistFile,%Source_Sys%\btwdi.dll,Require_FileQ,btwdi.dll
End
//-
If,%BuildClass%,Equal,3,Require,FileList,,My_List_btwdi_dll

[My_List_btwdi_dll]
btwdi.dll

[My_List]
\Windows\System32\PlayToDevice.dll
\Windows\System32\playtomenu.dll
\Windows\System32\PlayToReceiver.dll
\Windows\System32\PlayToStatusProvider.dll
\Windows\System32\dafAspInfraProvider.dll
\Windows\System32\DafDnsSd.dll
\Windows\System32\dafDockingProvider.dll
\Windows\System32\DafGip.dll
\Windows\System32\DAFIoT.dll
\Windows\System32\DAFIPP.dll
\Windows\System32\dafpos.dll
\Windows\System32\DafPrintProvider.dll
\Windows\System32\dafupnp.dll
\Windows\System32\dafWCN.dll
\Windows\System32\dafWfdProvider.dll
\Windows\System32\DAFWiProv.dll
\Windows\System32\DAFWSD.dll
\Windows\System32\QuickActionsDataModel.dll
\Windows\System32\irprops.cpl

+ add mui files

:turtle:

Edit: fix codes and add notes, thanks to HeyJoe
« Last Edit: February 26, 2021, 01:52:25 PM by Lancelot »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #245 on: February 26, 2021, 01:44:38 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Lancelot,

Nice to see You around from time to time.
I am honored to receive a tip from You in spite of Your limited time to answer.

BTW: I mainly use buildclass 2 for coding.
So, "Require_FileQ,..." seems sufficient to Me. There is the advantage: You don't need to write down the * .mui files separately.

May I insert some example chars to Your example:

Code: [Select]
...
If,%BuildClass%,Equal,2,Begin
  If,ExistFile,%Source_Sys%\btwdi.dll,Require_FileQ,btwdi.dll
End

[My_List]
\Windows\System32\PlayToDevice.dll
\Windows\System32\playtomenu.dll
...
\Windows\System32\??-??\PlayToDevice.dll.mui
\Windows\System32\??-??\playtomenu.dll.mui

See You
« Last Edit: February 28, 2021, 11:09:00 PM by HeyJoe, Reason: Removed color elements. Seem not working here in codebox. »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #246 on: February 26, 2021, 02:05:20 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Thanks HeyJoe,

I become rusty ... fixed my previous post.
+
So, "Require_FileQ,..." seems sufficient to Me. There is the advantage: You don't need to write down the * .mui files separately.
Incompatibility comes with "If,ExistFile,%Source_Sys%\btwdi.dll"  :wink: , Require_FileQ all compatible  :thumbsup:
ps:
BuildClass3 - source not mounted not extracted, files extracted from install.wim --> If,ExistFile,%Source_Sys%\btwdi.dll always returns FALSE cause trouble...  :wink:

so midway:

Code: [Select]
If,%BuildClass%,Equal,2,Begin
  If,ExistFile,%Source_Sys%\btwdi.dll,Require_FileQ,btwdi.dll
End
If,%BuildClass%,Equal,3,Require,FileList,,My_List_btwdi_dll
Require_FileQ,PlayToDevice.dll
Require_FileQ,playtomenu.dll
Require_FileQ,PlayToReceiver.dll
Require_FileQ,PlayToStatusProvider.dll
Require_FileQ,dafAspInfraProvider.dll
Require_FileQ,DafDnsSd.dll
Require_FileQ,dafDockingProvider.dll
Require_FileQ,DafGip.dll
Require_FileQ,DAFIoT.dll
Require_FileQ,DAFIPP.dll
Require_FileQ,dafpos.dll
Require_FileQ,DafPrintProvider.dll
Require_FileQ,dafupnp.dll
Require_FileQ,dafWCN.dll
Require_FileQ,dafWfdProvider.dll
Require_FileQ,DAFWiProv.dll
Require_FileQ,DAFWSD.dll
Require_FileQ,QuickActionsDataModel.dll
Require_FileQ,irprops.cpl

Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\DevQuery
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\mediaCategories
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Control\mediaInterfaces

Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\DeviceAssociationBrokerSvc
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\DeviceAssociationService
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\Services\SWENUM
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\WinSock
Call,RegCopyKey,HKLM,Tmp_System\ControlSet001\WinSock2

[My_List_btwdi_dll]
btwdi.dll

ps: Require,FileList do not give warning if file exists, Require_FileQ always give warning if file not extracted. That is the reason of writing that way (I ignore warning using Require,FileList ... )

It is quite easy to support BuildClass3 since syntax already compatible, but some logics like "If,ExistFile,%Source_Sys%.... " can not be compatible ......

tip: .mun files also automatic like .mui with Require_FileQ ......

ps: I can not remember if I made adjustments for Require,FileList + mui files, you need to test to see ....

Anway, Keeping short, I do not want to interrupt MicroWinpeBuilder topic with current Bluetooth focus anymore  :thumbsup:
As you see it is few lines to get BuildClass3 compatibility following simple logic which will be useful for your plugins ....

Have fun.  :cheers:

:turtle:

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #247 on: February 26, 2021, 04:02:27 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
@ Lancelot,

You rock! Thanks a lot.

Quote
BuildClass3 - source not mounted not extracted, files extracted from install.wim --> If,ExistFile,%Source_Sys%\btwdi.dll always returns FALSE cause trouble.

That's importent point to Me: I always use extracted ISO since there is space a lot on hd.
Regarding compabilty I respect and stick to it.


Now continue with Bluetooth.

@ Noel,

Ansering to Your latest PM so the interested public can follow.

I tested Your iso (unmodified by Me) in Virtual Box OK. Of course without BT hardware - just wanted to check whether iso is bootable. It is OK.

And tested also (Your iso written by rufus-3.13.exe on an usb3.0-stick) with a new HP-laptop Probook 470 G5 and an older desktop computer.
1.) My Laptop has inbuild BT-chip by Intel (c). Installed matching driver and voilà it's working OK.
2.) For that older (~ 2004 year) desktop computer I connected a v5.0 Bluetooth adapter to an usb2 port - let it boot OK -NO additional driver needed - voilà it's working OK.
Calling DevicePairingWizard.exe did the job each.

Similarly good result with Slore's WimBuilder2 compilation v.2021-01-01. After inserting downloaded "main.bat" to "..\Projects\WIN10XPE\01-Components\Bluetooth\" - did a build - wrote iso to usb3-stick - connected to machines one after another - same procedure - voilà it's working OK.

BTW. Using Slore's iso boot: In Windows control panel "Devices and Printers" all items take time about 10 mins to appear as Slore wrote. But Yours about secs  :smile: that's a surprise to Me.

I wish i could find out the Bottleneck --> but no time in the moment because other things are more important: namely the completion of the bluetooth integration in My Win10PESE.

In this sense, take care and see you soon.
« Last Edit: March 01, 2021, 02:35:36 PM by HeyJoe, Reason: Typo »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #248 on: February 28, 2021, 02:06:17 PM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 266
Hi HeyJoe,
Thank you for your return.
One point because i don't sure i well understand :
Quote
But Yours about secs
Do you want to say "with Noel's  ISO, all items are visible in 10 secondes" or "Noel, with your ISO, all items take 10minutes to be visible " ?
If it's the first point :
I don't remember the delay for this test in my VHD (because i'm looking for an other bug on "my" ISO).
If "my" is faster, i think it's because i modified DeviceSetupManger.dll for "DSMSVC" service. And if this point is good, i think Slore forgets to add the same modification. We worked on this bug a long time ago.
If it's the second : also a next work for me !
Take care !
PS : i hope i'll can bike in germany along the danau ( danube ) river in july....if virus died.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #249 on: February 28, 2021, 02:23:23 PM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 266
Hi,
"SharpPe" said to me that my ISO is not good with ADM session : he is rigth !   :thumbsup: And  i'm too lasy !  :embarrassed:
I very rarely use the Winpe boot with an ISO file (in VM or CD/DVD).
And I don't do all the tests in this setup.
And of course, the 20H2 version (2009) that I had created with my script did not work for "adm".
The problem was common when the "ADM" login.
The service "profsvc" failed when reading the usrClass file.dat.
This anomaly only appears with a "boot on ISO."
In a Winpe Flat mode in VHD, this anomaly does not appear.

Of course, this detail has been known for a long time. But because I don't understand English well, I miss a lot of information.
http://theoven.org/index.php?topic=2390.msg34825#msg34825
Congratulations to ChrisR and Slore who founded the solution a long time ago.

But I had not found their solution. So I searched with "procmon" for at least a day.
My initial observation:

   session adm = Ok :                                      session adm not Ok:
X:\windows\system32>set user                        X:\windows\system32>set user
USERDOMAIN=MicroWinPe                               USERDOMAIN=MicroWinPe
USERDOMAIN_ROAMINGPROFILE=MicroWinPe           USERDOMAIN_ROAMINGPROFILE=MicroWinPe
USERNAME=Administrator                               USERNAME=System
USERPROFILE=x:\users\Administrator              USERPROFILE=x:\users\Temp

In case anyone is interested in the method I used to locate this anomaly, I attach an excerpt from the procmon capture file.
Of course, you have to take the time to look at the names that suggest the functions that appear in the stack.
That's why I'm glad to finally find a way to dispose of the debug symbols in the "system" session. One can of course take the trace "Procmon" in Winpe and analyze it in another Win10. But, for me, it is an additional constraint.

To return to "usrClass.dat" there are two possibilities:
- find such a file in a normal Windows 10
- or create it when building Winpe: it's my choice now.
For this, I mount the hive system of Winpe. Then I create a key in this hive. And I'm backing it up
with "reg.exe save" in a file I call "usrclass.dat." I file in the profile directory of ADM
I always have in mind the idea of continuing to provide a set of information and details so that everyone can build their own "Winpe".
This anomaly will find a place in my PDF.

In my opinion, the most important thing is to find the origin of this difference in Winpe behaviors according to the boot method.

Regarding the time it takes to open the ADM session in a VM:
   variable, 30 to 60 seconds during a boot on ISO
   about 5 seconds during a flat boot in a VHD
The peculiarity of a Winpe flat mode in a VHD is the persistence of files.
So you have to make the comparison by taking a capture "Procmon" during the first boot (which is not the case here). Also, it'll be a test for another day.


Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #250 on: February 28, 2021, 06:53:39 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Noel,

thank You for Your reply #248.

To clarify My comment a bit more:
I saw while testing with Noel's ISO --> after boot completed nearly all items are visible in just about 10 secs. (on SYSTEM session) - that is We can say "immediately" :)
Testing Slore's: about 10 mins to appear - but on ADM session.
BTW. I'm pretty sure Slore also did modifications in "DeviceSetupManager.dll" (in "spoolsv.exe" too) regarding unicoded text "SystemSetupInProgress".
So I guess that is not the reason of diffrent delays.

Quote
PS : i hope i'll can bike in germany along the danau ( danube ) river in july....if virus died.

You Great fellow, very brave  :thumbsup:
I wish you a lot of fun.

Stay healthy and have a nice day
« Last Edit: March 01, 2021, 02:37:57 PM by HeyJoe, Reason: Typo »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #251 on: February 28, 2021, 09:38:03 PM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 266
Hi HeyJoe
 :undecided:
Is this delay exist/occurs for printers or only for Bluetooth devices?

I often mix my informations. My memory is not very good. I just reread some of my notes.

- SpoolSv.exe doesn't contain a string SystemSetupInProgress. I search again with procexp64.exe from systinternals (select spoolsv.exe, double clic, strings tab).
   And there is not a such modification in my script
- SpoolSv.exe contains a hardcoded value for delay of 2 minutes ( delay from the start of service spooler and the installation of PDF/XPS printers
   i used IDA for localised this value 0x1D4C0 in spoolSv.exe
- DeviceSetupManager.dll contains a string SystemSetupInProgress
- DeviceSetupManager.dll contains a hardcoded value for delay of 10 minutes before devices were displaying in "devmgmt.msc".
    i suppose this delay occurs for Bluetooth devices like it occurs for printers ( i can't do this test actually)

You can control "yours" 2 files with "fc.exe /b [iso]DeviceSetupManager.dll [winpe]DeviceSetupManager.dll". If identical, modification is missing .
i'm sure you see the "SystemSetupInProgress" bloc of modification (some bytes stay identical in the string, so the string is not complete)
Perhaps you don't see an second little bloc of modification in this result.
I make this comparison and i don't see the second bloc for the value of delay. But i'm not sure i took the good options when i built with wimbuilder2.
In my script, i used:
    $oldBytes  = ( 0xFF, 0xC6, 0x81, 0xFE, 0x20, 0x03, 0x00, 0x00 )  ---> 0x320
    $newBytes = ( 0xFF, 0xC6, 0x81, 0xFE, 0x01, 0x00, 0x00, 0x00 ) ---> 1
(offsets change with versions, so my script don't use the offset notion for the "search and replace" logic)

Perhaps you need to select the "other good" option in WimBuilder2. Sometime, dependancies between components are not well documented.

About delay "2minutes before install PDF/XPS printers" in Spooler :
SpoolSv.exe version Fr 10.0.19041.423
[offset IDA is from beginning of section , not from beginning of file !]
.text:0000000140027C7B ; ---------------------------------------------------------------------------
.text:0000000140027C7B
.text:0000000140027C7B loc_140027C7B:                          ; CODE XREF: PreInitializeRouter(SERVICE_STATUS_HANDLE__ *)+1D↑j
.text:0000000140027C7B                 mov     [rax], rdi
.text:0000000140027C7E                 lea     rax, off_140075338
.text:0000000140027C85                 mov     [rbx+8], rax
.text:0000000140027C89                 call    ?IsContainerOS@@YAHXZ ; IsContainerOS(void)
.text:0000000140027C8E                 test    eax, eax
.text:0000000140027C90                 jnz     short loc_140027CAA
.text:0000000140027C92                 mov     rcx, cs:?hPhase2Init@@3PEAXEA ; hHandle
.text:0000000140027C99   >>>>>>>       mov     edx, 1D4C0h     ;  -------------->>>>>>>>>>>>>>>>>>> dwMilliseconds
.text:0000000140027C9E                 call    cs:__imp_WaitForSingleObject
.text:0000000140027CA5                 nop     dword ptr [rax+rax+00h]
.text:0000000140027CAA
.text:0000000140027CAA loc_140027CAA:                          ; CODE XREF: PreInitializeRouter(SERVICE_STATUS_HANDLE__ *)+40↑j
.text:0000000140027CAA                 cmp     cs:?g_bNoPrintersMode@@3_NA, 0 ; bool g_bNoPrintersMode
.text:0000000140027CB1                 jz      short loc_140027CE8
.text:0000000140027CB3                 mov     rcx, cs:WPP_GLOBAL_Control
.text:0000000140027CBA                 lea     rax, WPP_GLOBAL_Control
.text:0000000140027CC1                 cmp     rcx, rax
.text:0000000140027CC4                 jz      short loc_140027CE1
.text:0000000140027CC6                 test    byte ptr [rcx+44h], 2
.text:0000000140027CCA                 jz      short loc_140027CE1
.text:0000000140027CCC                 mov     rcx, [rcx+38h]
.text:0000000140027CD0                 lea     r8, WPP_b7011c64eaec36f58e65b126635153ea_Traceguids
.text:0000000140027CD7                 mov     edx, 1Bh
.text:0000000140027CDC                 call    WPP_SF_

------ 1D4C0h     ; dwMilliseconds -> C0 D4 01 00

0000000140027C60  00 00 E8 19 A5 FD FF 48  8B D8 48 85 C0 75 0C 48
0000000140027C70  8B 5C 24 30 48 83 C4 20  5F C3 CC 48 89 38 48 8D
0000000140027C80  05 B3 D6 04 00 48 89 43  08 E8 F6 AF FE FF 85 C0
0000000140027C90  75 18 48 8B 0D C7 72 08  00 BA C0 D4 01 00 48 FF  <--- C0 D4 01 00
0000000140027CA0  15 B3 75 06 00 0F 1F 44  00 00 80 3D CF 5A 08 00
0000000140027CB0  00 74 35 48 8B 0D 3E 56  08 00 48 8D 05 37 56 08
0000000140027CC0  00 48 3B C8 74 1B F6 41  44 02 74 15 48 8B 49 38

Old           : 75 18 48 8B 0D C7 72 08  00 BA C0 D4 01 00 48 FF           ------------>> 2 minutes
New          : 75 18 48 8B 0D C7 72 08  00 BA 10 00 00 00 48 FF           ------------>> 10 ms
Because i search the bytes in the file, i don't need the offset. If i find many signatures, i need to try an other logic. But, at this time, this logic works for me.

Best regards

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #252 on: February 28, 2021, 10:40:14 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Noel,

Will give You more info tomorrow - have to go to sleep because day is about to end.  :sad:

Juste tellement pour le moment:
Just so much right now:

Quote
Is this delay exist/occurs for printers or only for Bluetooth devices?

Printers (pdf fax xps) have ~120 secs. delay. ~ 10 sec. to show up in panal "Devices and Printers"
My BT device appears immediately after I plugged it in and ready to connect.

Regards.
« Last Edit: March 01, 2021, 06:07:56 PM by HeyJoe, Reason: strikethrough »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #253 on: February 28, 2021, 10:50:49 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Noel,

I quickly add ...

Quote
My BT device appears immediately after I plugged it in and ready to connect.

My BT device appears immediately after I plugged it in and ready to connect. -- > I plug it in directly after boot is compleded, that is explorer has just started.

Regards.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #254 on: March 01, 2021, 09:36:46 AM »

noelBlanc

  • Chef
  • ***
  • Date Registered: Dec 2013
  • Posts: 266
Hi HeyJoe

I think you want to say "Seulement ceci pour le moment: blabla". I appreciate you try the french language.
And i understand that many people must reorganise the words of my sentences when i write in English ( even with a translator because i don't really know if the translation is good or not).

Quote
have to go to sleep because day is about to end.
It seems to me that you're going to sleep when the sun rises (if hours in the reply text are good)

About the delay "2minutes before  Spooler installs PDF/XPS printers": I searched and found the way to stop this delay. I shared with Slore. And i think Slore added or will add in his Wimbuilder2.
But I didn't put that "stop delay" in "my" ISO that you got because i'm a lot lazy and i worked on Sandbox/hyperV into Winpe ( not winpe in hyperV/sandbox, and i know it's not usefull and Linux is better ! ) and with irfanview for a scaner.

For bluetooth devices, there are too many devices with many features/goals/usages that it's complex to "see" all cases. It's like printers or scaners. It's difficult to test all devices. The test i made last week showed me that for my BT "Headphones" (i wrote sometime "headless") the pairing wizard didn't find/show it quickly. But i'm happy if it's good for you with winpeSE/winpeXPE

Best regards

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #255 on: March 01, 2021, 02:00:18 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Noel,

I hope Google tranlated "Seulement ceci pour le moment..." is good english "Only this for now..." that is because it was late in the evening really. I wrote french words just wanted to be friendly.

Quote
It seems to me that you're going to sleep when the sun rises (if hours in the reply text are good)
Yes. Almost right. :smile:


Back to Your Reply #251 :

You are right, in 20H2en x64 (v.2009 build 19042.631) which You applied as source to build the iso file from (which I was allowed to downloaded - again thx a lot for this):
1.: the spooler "SpoolSv.exe" does not contain no string "SystemSetupInProgress" at all.
     So, does it mean that We do not need changed registry key "HKLM\System\setup\SystemSetupInProgress" value from 1 to 0
     before start spooler (and back later) anymore in version 20H2 and above ?
     Please remember: I am not about to check by Myself because I use v.1809 x86 de (sufficient to Me for now and later...
     let's see).
2.: the spooler "SpoolSv.exe" does contain hex string "75 18 48 8B 0D C7 72 08 00 BA C0 D4 01 00 48 FF" = 120000 ms.
     not 10 ms (if I understood you correctly) - but still the things in "Devices and Printer" panel show up immediately ? I would
     expect two minutes ? Please see today's edit in Reply #252
3.: in "DeviceSetupManager.dll" We can find zero separated string "SystemSetupInProgress"--> saw changed initial letter S to T.

That's for now. See You.
Have a nice day.

PS. Note: mentioned files I extracted from Your iso file. So, check files content was made offline.
« Last Edit: March 01, 2021, 09:30:01 PM by HeyJoe, Reason: add info »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #256 on: March 01, 2021, 05:07:46 PM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, HeyJoe
Quote
1.: the spooler "SpoolSv.exe" does not contain no string "SystemSetupInProgress" at all.
     So, does it mean that We do not need changed registry key "HKLM\System\setup\SystemSetupInProgress" value from 1 to 0
     before start spooler (and back later) anymore in version 20H2 and above ?

No. It is the opposite. Before 20h2, we can change the "SystemSetupInProgress" string to other, so the spoolsv service can start without changing registry key,
Now, it is not in spoolsv.exe, so we have to change the key's value from 1 to 0.


Quote
I shared with Slore. And i think Slore added or will add in his Wimbuilder2.


"E:\WimBuilder2\Projects\WIN10XPE\01-Components\Devices and Printers\last.bat"
Code: [Select]
rem DsmSvc Patch Feature
binmay.exe -u "%X_SYS%\DeviceSetupManager.dll" -s u:SystemSetupInProgress -r u:DisableDeviceSetupMgr
fc /b "%X_SYS%\DeviceSetupManager.dll.org" "%X_SYS%\DeviceSetupManager.dll"
del /f /q "%X_SYS%\DeviceSetupManager.dll.org"

rem Remove 2 minute delay for printers
binmay.exe -u "%X_SYS%\spoolsv.exe" -s "C0 D4 01 00 48 FF" -r "10 00 00 00 48 FF"
fc /b "%X_SYS%\spoolsv.exe.org" "%X_SYS%\spoolsv.exe"
del /f /q "%X_SYS%\spoolsv.exe.org"

Yes, it is in my WimBuilder2 for months, but as Microsoft change the 'SystemSetupInProgress' in spoolsv.exe.
I hesitate to commit it into GitHub(belonged to Microsoft).
Would it be more hard to patch for next version?

"E:\WimBuilder2\Projects\WIN10XPE\01-Components\Devices and Printers\_printer.bat"
Code: [Select]
rem update spoolsv.exe binary
binmay.exe -u "%X_SYS%\spoolsv.exe" -s u:SystemSetupInProgress -r u:DisableSpoolsvInWinPE
fc /b "%X_SYS%\spoolsv.exe.org" "%X_SYS%\spoolsv.exe"
del /f /q "%X_SYS%\spoolsv.exe.org"


Anyway, I share the batch code here, If someone need the printer feature, who can add a custom patch of WimBuilder2 by himself.


« Last Edit: March 01, 2021, 05:08:54 PM by slore »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #257 on: March 01, 2021, 06:25:17 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
Hi Slore,

nice to hear from You. Thanks for clarify. Great. Will test it out once more.

I saw in mentioned *.bat the two binmay'd files regarding "S.S.I.P."
but sorry not "Remove 2 minute delay for printers". Now I know. Thank You and Noel for all Your nive feedback.

Regards.

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #258 on: March 01, 2021, 08:37:42 PM »

HeyJoe

  • Chef
  • ***
  • Location: Germany
  • Date Registered: Apr 2020
  • Posts: 102
@ Slore + Noel

sorry, didn't find hex pattern "C0 D4 01 00 48 FF" neither in "spoolsv.exe" nor "DeviceSetupManager.dll" to remove 2 mins. delay.
on panel "Devices and Printers" - files were extracted from My iso file - My source: v1809 x86

It would be nice to have all items in My winpe_se build iso faster visible, but for now it is more important to Me: bluetooth plugin
works OK. The next step is to clean up plugin itself and the plugins involved.

You rock. Have a nice day.

Regards.

Another info: --> OK. Found three times "C0 D4 01 00" in spoolsv.exe. Trying to find out which one is it.
« Last Edit: March 01, 2021, 10:16:44 PM by HeyJoe, Reason: add info »

Re: MicroWinpeBuilder to adapt its own Winpe : tutorial or 'under the hood'?
« Reply #259 on: March 02, 2021, 01:42:52 AM »

slore

  • WimBuilder
  • Sr. Chef
  • ****
  • Date Registered: Jun 2016
  • Posts: 664
Oh,  the code is for x64.  For x86 needs a byte to make it be unique. I think it is the second one.

 

Powered by EzPortal