Topic: WimBuilder2 - New Builder with Re:WIN10XPE project(~20H2 Supported)  (Read 38326 times)

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #140 on: April 28, 2019, 05:44:35 AM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
v2019.04.28.8a4aaaea updated:

Added: SnipingTool (Components - > Windows Accessories)
Added: Microsoft Wubi Input Method Option
Updated:Set 4GB fbwf cache size with Windows 10 origin driver
Fixed: BitLocker unlock menu does not display problems
Fixed: Administrator cannot be switched when using Korean input method
Fixed: Korean/English toggle key can not be used
Fixed: 20H1 (10.0.18885) unable to switch Administrator account
Fixed: 20H1 Administrator account can not automatically create user profiles and load the user registry hive. (Thanks to yamingw  :thumbsup:)
          fixed problems:can not rename folder, software incorrect Association and other issues

WimBuilder2.part1.rar (6000 kB)
* WimBuilder2.part2.rar (5611.04 kB - downloaded 332 times.)
« Last Edit: April 28, 2019, 09:15:19 AM by slore »

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #141 on: April 28, 2019, 08:09:15 AM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
fbwf.c
Code: [Select]
NTSTATUS  FbwfCheckForVolatileBoot(__int64 size)
{
    ...
    if ( is_WINPE )
    {
      RtlInitUnicodeString((PUNICODE_STRING)&keyName, L"WinPECacheThreshold");
      result = ZwQueryValueKey(KeyHandle, (PUNICODE_STRING)&keyName, KeyValuePartialInformation, &pvpi, ulSize, &ulSize);
      if ( result >= 0 && pvpi->Type == REG_DWORD )
      {
        TotalBytes = (unsigned int)(pvpi->Data << 20);
      }
    }
    if ( KeyHandle )
      result = ZwClose(KeyHandle);
   ...
}

So it can be set to 4GB.

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
v2019.06.21.67e23086 updated:
(included v2019.06.13 updated, v2019.05.28 updated)

*  [Fixed]: WimBuilder2 cannot run in the root directory of the drive
*  [Fixed]: IE8 compatibility fix (Windows 7 IE8 can be built normally)
* [Fixed]: The Lite list cannot be built
* [Update]: drvinst patcher for 20h1 (JFX)
* [Update]: 32-bit program is unable to display text in 64-bit environment for 20h1 (thanks to nf17b)
* [New]: TextReplace macro supports regular expressions
* [New]: Added Printing Components (List of hhh333)
* [Improvement]: Direct use of 3rd part applications' EXE, 7z and other official direct download files (StartIsBack, 7-Zip, PENetwork), easy (automatic) updates
* [Improvement]: Move 3rd part applications' installer package to WimBuilder2\vendor directory for multiple projects to share them
* [New]: Extract2X, V2X, VGetFile macro commands for extracting files from Vendor directory into WIM
* [New]:Admin User Options Make a Separate Settings Page to Support Password Verification
* [New]: Enable a new Lua loader when PECMD is not selected
   * Supports high version of fixed program to taskbar, start menu
   * Dual user(SYSTEM, Admin) login, switching interaction
   * Multilingual support
   * Enhanced freely expandable link'pin'exec command
* [New]: LINK macro command for creating shortcuts (automatically adapted to PECMD, LUA loader)
* [New]: RunBeforeShell macro command for execution before the shell program loads (automatically adapted to PECMD, LUA loader)


Code: [Select]
D:\Dev\WimBuilder2\vendor>tree /f
├─7-Zip
│      7z1900-x64.exe
│      7z1900.exe

├─PENetwork
│      PENetwork.7z
│      PENetwork_x64.7z

└─StartIsBack
        StartIsBackPlusPlus_setup[v2.8.1].exe
        StartIsBackPlusPlus_setup[v2.8.4].exe
        StartIsBackPlusPlus_setup[v2.8.5].exe

WimBuilder2\Projects\WIN10XPE\_CustomFiles_\PEMaterial\pecmd.lua
Code: [Select]
local function OSInit()
  if File.exists('X:\\Windows\\Temp\\OSInited.txt') then return 1 end
  --set_progress('%{System configuration, Please Wait...}')

  -- show cursor
  exec('/wait', '%WinDir%\\System32\\winpeshl.exe')
  -- // Load Display drivers
  exec('/wait /hide', [[Drvload.exe %WinDir%\inf\basicdisplay.inf %WinDir%\inf\basicrender.inf %WinDir%\inf\c_display.inf %WinDir%\inf\display.inf %WinDir%\inf\displayoverride.inf]])
  -- // Try resolution(s)
  Screen:DispTest({'1152x864', '1366x768', '1024x768'})

  File.delete('X:\\Users\\Public\\Desktop\\desktop.ini')
  exec('/hide', 'cmd.exe /c echo done>X:\\Windows\\Temp\\OSInited.txt')
  return 0
end

local function PreShell()
  -- LetterSwap
  -- // exec('/wait /hide', [[LetterSwap.exe /auto /bootdrive Y:\CDUsb.y /Log %WinDir%\System32\LetterSwap.log]])

  -- Fix Screen resolution and Show Desktop. NoWait Hide
  -- exec('fixscreen.exe')
  -- Load oem drivers before shell in background
  -- exec('/hide', [[%WinDir%\System32\pnputil.exe /add-driver %WinDir%\inf\oem*.inf]])

  -- Prepare environment variables

  local homeprofile = 'X:\\Users\\Default'
  if logon_user ~= 'SYSTEM' then
    homeprofile = 'X:\\Users\\' .. logon_user
  end
  os.setenv('HOMEPROFILE', homeprofile) -- only for PE
  os.setenv('Desktop', homeprofile .. '\\Desktop')
  os.setenv('Programs', homeprofile .. [[\AppData\Roaming\Microsoft\Windows\Start Menu\Programs]])
  if File.exists('X:\\Windows\\explorer.exe') then
    explorer_shell = true
  end
end

local function CustomShortcuts()
end

local function Shortcuts()
  if File.exists('X:\\Windows\\Temp\\Shortcuts.txt') then return 1 end
  set_progress(t('Prepare shortcuts ...'))
  local path = '%Programs%\\Administrative Tools'
  LINK(path .. '\\Computer Management.lnk', 'compmgmt.msc')
  LINK(path .. '\\Device Manager.lnk', 'devmgmt.msc')
  LINK(path .. '\\Disk Management.lnk', 'diskmgmt.msc')
  LINK(path .. '\\Services.lnk', 'services.msc')

  -- LINK('%Programs%\\System Tools\\#{@shell32.dll,22022}.lnk', 'cmd.exe')

  LINK('%Desktop%\\Explorer.lnk', 'Explorer.exe')
  LINK('%Desktop%\\#{@shell32.dll,22022}.lnk', 'cmd.exe')
  LINK('%Desktop%\\Internet Explorer.lnk', '%ProgramFiles%\\Internet Explorer\\iexplore.exe')
  LINK('%Desktop%\\PENetwork.lnk', '%ProgramFiles%\\PENetwork\\PENetwork.exe')

  if File.exists('X:\\Windows\\System32\\seclogon.dll') then
    LINK('%Desktop%\\SwitchUser.lnk', '%ProgramFiles%\\WinXShell\\WinXShell.exe', '-script ' .. script_file .. ' -user #SwitchUser#', 'imageres.dll', 319)
  end

  CustomShortcuts()

  exec('/hide', 'cmd.exe /c echo done>X:\\Windows\\Temp\\Shortcuts.txt')
end

local function RunShell()
  if logon_user ~= 'SYSTEM' then return end
  if explorer_shell then
    shel('explorer.exe')
  else
    shel('WinXShell.exe -winpe')
  end
end

local function LoadShell()
  set_progress(t('load shell ...'))
  exec('ctfmon.exe')

  -- RunBeforeShell

  RunShell()
  exec('WinXShell.exe -daemon')
end

local function WaitShell()
  local sh_win = winapi.find_window('Shell_TrayWnd', nil)
  while (sh_win == nil or sh_win:get_handle() == 0) do
    app:print(string.format("shell Handle:0x%x", sh_win:get_handle()))
    app:call('sleep', 1000)
    sh_win = winapi.find_window('Shell_TrayWnd', nil)
  end
end

local function PostShell()
  WaitShell()
  sui:hide()
  File.delete('%HOMEPROFILE%\\Desktop\\desktop.ini')
  File.delete('%HOMEPROFILE%\\Desktop\\shutdown.bat') -- no need this file if there is WinXShell.exe's UI_Shutdown
  exec('/wait /hide', 'cmd.exe /c del /q "%APPDATA%\\Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar\\*.lnk"')
  Taskbar:Pin('%ProgramFiles%\\WinXShell\\WinXShell.exe', 'UI_Shutdown', '-ui -jcfg wxsUI\\UI_Shutdown.zip\\full.jcfg -blur 5', 'shell32.dll', 27)
  Taskbar:Pin('Explorer.exe')
  Taskbar:Pin('cmd.exe')
  Startmenu:Pin('notepad.exe')
end


local function Logon()
  PreShell()
  Shortcuts()
  LoadShell()
  PostShell()
  -- set_progress('finished')
end

* 18922_admin.gif.zip (517.06 kB - downloaded 80 times.)
« Last Edit: June 22, 2019, 01:30:50 AM by slore »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
WimBuilder2.v2019.06.21 packaged with PECMD, WinXShell, StartIsBack, 7-Zip, PENetwork, HotSwap

1/3 WimBuilder2.part1.rar
« Last Edit: June 21, 2019, 01:13:58 AM by slore »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
2/3 WimBuilder2.part2.rar

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
3/3 WimBuilder2.part3.rar

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Slore,
What is the fix for this ??
Quote
[Update]: 32-bit program is unable to display text in 64-bit environment for 20h1 (thanks to nf17b)


slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
James,

It is very easy to know, if you look at:
Projects\WIN10XPE\00-Configures\Build\WoW64_Basic\submain.bat

Code: [Select]
@windows\SysWOW64\
+ver > 18800
TextShaping.dll
+ver*

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Thanks, I already got that file...



slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
experimental patches ( from noelBlanc's MicroWinpeBuilder http://theoven.org/index.php?topic=1639.msg33169#msg33169 ):

ila_rendered

1. Remote Desktop Service (Connect to PE from others)
2. Enable the native 'Safely Remove Hardware(Eject USB Device)' feature

WimBuilder2\Projects\WIN10XPE\01-Components\USB_DevMgr\main.bat
Code: [Select]
call AddFiles "@\Windows\System32\#nDeviceSetupManager.dll,DevPropMgr.dll"

call RegCopyEx Services DsmSvc
reg add HKLM\Tmp_SYSTEM\Setup\AllowStart\DsmSvc /f

rem DsmSvc Patch
binmay.exe -U "%X_SYS%\DeviceSetupManager.dll" -s u:SystemSetupInProgress -r u:DisableDeviceSetupMgr

* Remote Desktop.zip (13.64 kB - downloaded 60 times.)
* USB_DevMgr.zip (1.42 kB - downloaded 64 times.)

Known issues:
1. Remote Desktop Service works OK on 17763 (RS5), but the connection be black screen for 19H1 and 20H1.
2. If the "Printer" patch is selected, Eject USB Device feature wouldn't work.
3. Remote Desktop Service feature needs ProductOptions registry, so maybe overwrite by others' ProductOptions. (need be improved)
« Last Edit: June 30, 2019, 01:20:33 PM by slore »

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #150 on: September 03, 2019, 03:21:08 PM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
v2019.09.01 updated:
https://github.com/slorelee/wimbuilder2/releases/download/v2019.09.01/WimBuilder2-Full.7z

  • [Update] the latest version of 20H1(10.0.18970) supported  (thanks to hsmy, foxfirefox provides a list of files)
  • [Update] ISO supports BIOS + UEFI boot
  • [New Component] Add Network and Sharing Center (Network Connection (Network Adapter Settings) and Network Status Tray icon)
  • [New Component] Add Microsoft Windows Installer support (known issue that cause Administrator account can't to login)
  • [Update] Synchronized Win10XPE_2019-07-20
  • [Improvement] MTP support will automatically load after login and remove desktop mtp_support.bat file
  • [Improvement] Update RegCopyEx, AddFiles, V2X macro
  • [Vendor update] StartIsBack upgrade to 2.8.8
« Last Edit: September 03, 2019, 03:21:57 PM by slore »

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #151 on: September 08, 2019, 04:48:56 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi Slore,
Congrat for all the work done  :thumbsup:
I looked a bit at the changes for 18870 and in particular for Administrator.

Logon as Admin is very long but it's better indeed with Admin18850+.bat and LsaGetRights.exe  :thumbsup:
To pre-creates Administrator profile with the corresponding registry and Add additional System privileges to the Administrator account.
However, Pintool remains a little long, I don't know why !!!

Do you have the latest source code for LsaGetRights, or maybe Yamingw, thanks to him :worship:
Or is it possible to have an additional and optional parameter for localized Administrator name (ex: Administrateur in French)
rather than Administrator hard-coded (TCHAR lpszAccountName[] = TEXT("Administrator");)
ex: LSAgetRights.exe -c -u:Administrateur (-u Optional, default Administrator)

Thanks

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #152 on: September 09, 2019, 02:52:55 PM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, ChrisR

I see you updated project to the 2019-07-20, but I don't see something like Admin18850+.bat and LsaGetRights.exe,
And no report about the issue that can't rename folder in Administrator account. I thought only zh-CN system need it.

Here is the source from Yamingw.
* LSAgetRights_src.zip (3.01 kB - downloaded 41 times.)

(I never update the PinTool since 2.2.6, and it is fine even on 18975, I don't know why.)

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #153 on: September 09, 2019, 08:12:55 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi Slore,
Thanks for sharing Yamingw's source  :thumbsup:
I don't know cpp so I don't know if I am able to add the administrator username as parameter. Any help is welcome.

By default the Administrator account is localized, Administrateur with French windows source (fr-FR).
Otherwise we get the message: the username or password is incorrect.

ila_rendered

In Win10XPE, it is fixed in Admin.script with security.7z unpacked in Windows\security
and in \templates\unattend.inf there is NewAdministratorName = "Administrator"
In PecmdAdmin.ini, the DefaultUserName must match 
REGI HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName=Administrator
Administrator here, but it could be any other name, as long as they match as done in Admin plugin 

I am currently testing 18870. No problem with the system account but it is very long with the administrator
That's why I looked at Admin18850+.bat and LsaGetRights.exe, it seems better, faster with them
If I want to keep the opportunity to change the administrator name, it must also be done in LsaGetRights.exe

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #154 on: September 11, 2019, 12:54:02 AM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
@Slore
Running This
Code: [Select]
binmay.exe -u "%X_SYS%\DeviceSetupManager.dll" -s u:SystemSetupInProgress -r u:DisableDeviceSetupMgr
Results in Two Files
1) DeviceSetupManager.dll with current date & time
2) DeviceSetupManager.dll.org with original date & Time

Question - What Does This Do?
Code: [Select]
fc /b "%X_SYS%\DeviceSetupManager.dll.org" "%X_SYS%\DeviceSetupManager.dll"

As this then deletes the original "DeviceSetupManager.dll.org"
Code: [Select]
del /f /q "%X_SYS%\DeviceSetupManager.dll.org"


Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #155 on: September 11, 2019, 11:04:05 AM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
File Compare /Binary ??

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #156 on: September 11, 2019, 12:18:30 PM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
Code: [Select]
rem Patch Windows.UI.CredDialogController.dll to use the Credentials Window than Credentials  Console
rem M.i.n.i.N.T => N.i.n.i.N.T
ren %X_SYS%\Windows.UI.CredDialogController.dll Windows.UI.CredDialogController_org.dll
binmay.exe -i "%X_SYS%\Windows.UI.CredDialogController_org.dll" -o "%X_SYS%\Windows.UI.CredDialogController.dll" -s "5C004D0069006E0069004E0054000000" -r "5C004E0069006E0069004E0054000000"
fc /b "%X_SYS%\Windows.UI.CredDialogController_org.dll" "%X_SYS%\Windows.UI.CredDialogController.dll"

Do you remember this ?

I just update binmay with -u option for patch(update) the file without copying org by myself.
and make -s (search), -r (replace) to support Unicode text directly than hex binary data.

Those lines will replace DeviceSetupManager.dll's unicode text 'SystemSetupInProgress' to 'DisableDeviceSetupMgr'.
So I can start the Device Setup Manager service directly than:
1).changing SystemSetupInProgress=>0,
2).net start DsmSvc,
3).restoring SystemSetupInProgress=1.

Quote
Question - What Does This Do?
Code: [Select]
fc /b

Quote
File Compare /Binary
  :thumbsup:
Show the hex binary bytes diff for checking.

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #157 on: September 11, 2019, 02:07:08 PM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Yes I remember.
Just checking differences with you - between the code structure...
Thank You...
 

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #158 on: September 28, 2019, 12:53:23 AM »

slore

  • Moderator, WimBuilder
  • Sr. Chef
  • *****
  • Date Registered: Jun 2016
  • Posts: 664
Hi, ChrisR
I needs Admin18850+.bat because the PE built by wimbuilder2 can't rename folder, the fonts is not good. I found that the Administrator profile don’t load.
So have to do the LSAGetRights.exe.
With your WIN10XPE, I don't see the difference in SwithToAdmin.script, but yours is OK.
I finally understand what is the difference.
I don't have the default UsrClass.dat.

I add the file, and it load profile automatically in 20H1.

For future speed up the logon time, and different admin username, I updated it with -u option.
If you need it later, you can get it in next release or download from GitHub.


WimBuilder2 will make as hidden option and rename to PreLoadAdminProfile.bat as yours.



Next release is a big update.
* fix printer patch
* support share smart phone is network via USB
* Fast Switch between SYSTEM and Administrator
* Windows Media Player

I need more days to test.

« Last Edit: September 28, 2019, 12:56:30 AM by slore »

Re: WimBuilderUI - New Builder with Re:WIN10XPE project(19H1/20H1 Supported)
« Reply #159 on: October 02, 2019, 09:08:15 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi Slore,
Late answer
Thank you for adding the -u (user) switch to LSAGetRights  :thumbsup:
It is thus available for localized administrator name
For the moment the pre-creation of the administrator account is not useful
but it is good to have the option (hidden for now) for a possible need in future

About UsrClass.dat, I added it a while ago to avoid an error seen in event log
Good to know that it is really required now for switching to Admin with 20H1

 

Powered by EzPortal