New
#351
Yes.is that just the standard reg file
post up your pecmd.ini.
(I don't use win10xpe builder, but somewhere there must be a command to launch the shel.)
HTML Code:// Pecmd launched from : RegWrite,HKLM,0x1,Tmp_System\Setup,CmdLine,"Pecmd.exe Main #$pWindir#$p\System32\Pecmd.ini" LOGS %WinDir%\System32\Pecmd.log CALL OSInit CALL PreShell CALL Shortcuts CALL PinTo CALL LoadShell CALL PostShell CALL AudioInit CALL NetInit TIPS The Configuration is Finished.,,1,#1 WAIT 3000 EXIT //////////////////////////////////////////////////////////////////////////////////////////////// _SUB OSInit FIND $%USERNAME%=Administrator,REGI HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18\ProfileImagePath=X:\Users\Administrator // Load Display drivers (Uncommented if "Display drivers" selected). Not to be changed, Replace //EXEC by //=EXEC //EXEC =@!%WinDir%\System32\Drvload.exe %WinDir%\inf\basicdisplay.inf %WinDir%\inf\basicrender.inf %WinDir%\inf\c_display.inf %WinDir%\inf\display.inf %WinDir%\inf\displayoverride.inf TEAM DISP W1024 H768 B32|DISP W1366 H768 B32 //TEAM DISP W1024 H768 B32|DISP W1280 720 B32|DISP W1280 H1024 B32|DISP W1366 H768 B32|DISP W1920 H1080 B32 LOGO %WinDir%\web\wallpaper\Windows\img0.jpg // NumLock ON (changed to "NUMK 0" NumLock OFF if selected) NUMK 1 TEXT Welcome, the Configuration is in Progress...#0xFFFFFF L59 T39 $20* // TIPS Welcome, the Configuration is in Progress...,,1,#1 _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB PreShell // winpeshl.ini with [LaunchApps] wpeinit.exe EXEC %WinDir%\System32\winpeshl.exe // LetterSwap //EXEC =!%WinDir%\System32\LetterSwap.exe /auto /bootdrive Y: /Log %Temp%\LetterSwap.log EXEC =!%WinDir%\System32\LetterSwap.exe /auto /bootdrive Y:\CDUsb.y /Log %Temp%\LetterSwap.log // Fix Screen resolution and Show Desktop. NoWait Hide EXEC !%WinDir%\System32\FixScreen.exe // Load and install oem* drivers in background before shell EXEC @!%WinDir%\System32\pnputil.exe /add-driver %WinDir%\inf\oem*.inf /install // Load Users Drivers from Y before shell in background (Uncommented By User Option) //EXEC @!%WinDir%\System32\pnputil.exe /add-driver Y:\Drivers\*.inf /subdirs // Load external Autorun.cmd or PecmdStartup.ini to run program, Install external drivers, keyboard,... IFEX Y:\XPEStartup.ini,LOAD Y:\XPEStartup.ini IFEX Y:\XPEStartup.cmd,EXEC Y:\XPEStartup.cmd // Install ImDisk Ramdisk in background (Uncommented if "Imdisk ramdisk" selected). Not to be changed, Replace //EXEC by //=EXEC //EXEC @!%WinDir%\System32\StartImDIsk.exe 50 % B: RAMDisk "NTFS Compressed" "B:\Temp" INIT IU,3000 _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB Shortcuts LINK %Programs%\System Tools\WinXShell\Display Settings,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_Resolution.zip,%ProgramFiles%\WinXShell\wxsUI\display.ico LINK %Programs%\System Tools\WinXShell\Shutdown,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_Shutdown.zip\full.jcfg,%ProgramFiles%\WinXShell\wxsUI\Power.ico LINK %Programs%\System Tools\WinXShell\Wifi,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_WIFI.zip\main.jcfg -theme dark,%ProgramFiles%\WinXShell\wxsUI\wifi.ico LINK %Programs%\System Tools\WinXShell\Calendar,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_Calendar.zip\calendar.jcfg,%ProgramFiles%\WinXShell\wxsUI\Calendar.ico LINK %Programs%\System Tools\WinXShell\SystemInfo,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_SystemInfo.zip,%ProgramFiles%\WinXShell\wxsUI\MyPC.ico LINK %Programs%\System Tools\WinXShell\Volume,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_Volume.zip\main.jcfg,%ProgramFiles%\WinXShell\wxsUI\Volume.ico LINK %Programs%\System Tools\WinXShell\Settings,%ProgramFiles%\WinXShell\WinXShell.exe,-ui -jcfg wxsUI\UI_Settings.zip,%ProgramFiles%\WinXShell\wxsUI\settings.ico //WinXShell.exe -ui -jcfg wxsUI\UI_Launcher.zip -theme dark //LINK %Programs%\Q-Dir,%ProgramFiles%\Q-Dir\Q-Dir.exe //LINK %Desktop%\Keyboard Layout,%WinDir%\System32\KeyboardLayout.cmd,,%WinDir%\System32\shell32.dll#173 LINK %Programs%\Keyboard Layout,%WinDir%\System32\KeyboardLayout.cmd,,%WinDir%\System32\shell32.dll#173 // Change Explorer Theme shortcuts (Uncommented if "Theme Shortcut" selected). Not to be changed, Replace //LINK by //=LINK //LINK %Desktop%\Change Explorer Theme,%WinDir%\system32\hiderun.exe,%WinDir%\System32\SwitchTheme.cmd,%WinDir%\System32\shell32.dll#174 //LINK %Programs%\System Tools\Change Explorer Theme,%WinDir%\system32\hiderun.exe,%WinDir%\System32\SwitchTheme.cmd,%WinDir%\System32\shell32.dll#174 LINK %Programs%\File Tasks\Explorer,%WinDir%\Explorer.exe LINK %Programs%\Explorer,%WinDir%\Explorer.exe //LINK %Desktop%\Explorer,%WinDir%\Explorer.exe LINK %Programs%\Registry\Regedit,%WinDir%\regedit.exe LINK %Desktop%\Windows Installer,%SystemDrive%\setup.exe LINK %Programs%\System Tools\Windows Installer,%SystemDrive%\setup.exe LINK %Programs%\Administrative Tools\Computer Management,%WinDir%\System32\compmgmt.msc LINK %Programs%\Administrative Tools\Device Manager,%WinDir%\System32\devmgmt.msc LINK %Programs%\Administrative Tools\Disk Management,%WinDir%\System32\diskmgmt.msc LINK %Programs%\Administrative Tools\Services,%WinDir%\System32\services.msc //LINK %Desktop%\Command Prompt,%WinDir%\System32\cmd.exe LINK %Programs%\System Tools\Command Prompt,%WinDir%\System32\cmd.exe LINK %Programs%\System Tools\Regedit,%WinDir%\regedit.exe // ImDisk Virtual Drive Management Shortcut (Uncommented if "Imdisk ramdisk" selected). Not to be changed, Replace //LINK by //=LINK //LINK %Programs%\System Tools\ImDisk Virtual Drive Management,%WinDir%\System32\imdisk.cpl,,%WinDir%\System32\imdisk.cpl#-1 LINK %Programs%\Accessibility\Magnify,%WinDir%\System32\magnify.exe // OSK,mspaint,WordPad,PhotoViewer,SnippingTool shortcuts (Uncommented if "Windows Apps" selected). Not to be changed, Replace //LINK by //=LINK //LINK %Programs%\Accessibility\OSK,%WinDir%\System32\OSK.exe //LINK %Programs%\Accessories\MSPaint,%WinDir%\System32\mspaint.exe //LINK %Programs%\Accessories\WordPad,%ProgramFiles%\windows nt\accessories\WordPad.exe //LINK %Programs%\Accessories\PhotoViewer,%WinDir%\Web\Wallpaper\Windows\img0.jpg //LINK %Programs%\Accessories\SnippingTool,%WinDir%\System32\SnippingTool.exe LINK %Programs%\HW Info\MSinfo32,%WinDir%\System32\msinfo32.exe //LINK %Desktop%\System Recovery,%SystemDrive%\sources\recovery\recenv.exe LINK %Programs%\System Tools\System Recovery,%SystemDrive%\sources\recovery\recenv.exe LINK %Programs%\Network\Enable Firewall,%WinDir%\System32\EnableFirewall.cmd,,%WinDir%\System32\shell32.dll#135 LINK %Programs%\Network\Disable Firewall,%WinDir%\System32\DisableFirewall.cmd,,%WinDir%\System32\shell32.dll#135 LINK %Programs%\Network\Initialize Network,%WinDir%\System32\InitializeNetwork.cmd,,%WinDir%\System32\shell32.dll#164 _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB PinTo //PINT xxx.exe,StartMenu (does not work with SIB) // Examples here. It is done with PinTool, see the section below //PINT %WinDir%\System32\cmd.exe,TaskBand //PINT %Programs%\Explorer.lnk,TaskBand //PINT %ProgramFiles%\Q-Dir\Q-Dir.exe,TaskBand _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB LoadShell //EXEC Y:\Programs\ProcessMonitor_x64\Procmon.exe // Enable ctfmon: Alternative User Input Text Input Processor (TIP) (Uncommented for Chinese and Korean windows source). Not to be changed, Replace //EXEC by //=EXEC //EXEC %WinDir%\System32\ctfmon.exe FIND $%USERNAME%=SYSTEM,SHEL %WinDir%\explorer.exe //SHEL %ProgramFiles%\WinXShell\WinXShell.exe -winpe _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB PostShell LOGO // EXEC = Wait, @background, ! Hide. ex: EXEC =WaitNoHide.cmd, EXEC @!=WaitHide.cmd, EXEC NoWaitNoHide.cmd, EXEC @!NoWaitHide.cmd // Hide start menu Startup folders EXEC !%WinDir%\System32\attrib.exe +s +h "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" EXEC !%WinDir%\System32\attrib.exe +s +h "X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" // Remove desktop.ini IFEX %Desktop%\desktop.ini,FILE %Desktop%\desktop.ini IFEX X:\Users\Default\Desktop\desktop.ini,FILE X:\Users\Default\Desktop\desktop.ini IFEX X:\Users\Public\Desktop\desktop.ini,FILE X:\Users\Public\Desktop\desktop.ini IFEX X:\Users\Administrator\Desktop\desktop.ini,FILE X:\Users\Administrator\Desktop\desktop.ini // Load drivers DEVI %WinDir%\inf\battery.inf //DEVI %WinDir%\inf\usbport.inf // PinTool must be Launched after Explorer EXEC %WinDir%\System32\PinTool.exe -debug %Windir%\System32\Pecmd.ini // Show OSK TabletMode Button (Uncommented if "Show Touch Keyboard Button" enabled). Not to be changed, Replace //LINK by //=LINK //EXEC %WinDir%\System32\OskTray.exe _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB AudioInit //SERV -wait Audiosrv (audio service already started) // Install HDAudio driver sound cards DEVI %WinDir%\inf\hdaudio.inf WAIT 250 // Adjust the volume (windows default 67%) ex: 65535*33% = 21626 (Uncommented if mute is not selected). Volume changed according to "System Volume At Startup" interface value //EXEC=!%WinDir%\System32\nircmd.exe setsysvolume 21626 // Play Startup sound (Commented if mute is selected) EXEC @!%WinDir%\System32\mpg123.exe -q %SystemRoot%\Media\startup.mp3 // Start NonVisual Desktop Access after Audio (Uncommented By NVDA Plugin) //EXEC @!%WinDir%\System32\NVDA_Startup.cmd _END //////////////////////////////////////////////////////////////////////////////////////////////// _SUB NetInit // Load Network drivers at startup EXEC =@!%WinDir%\System32\Drvload.exe %WinDir%\inf\athw8x.inf %WinDir%\inf\netathr10x.inf %WinDir%\inf\netathrx.inf %WinDir%\inf\netbc63a.inf %WinDir%\inf\netbc64.inf %WinDir%\inf\netrtwlane.inf %WinDir%\inf\netrtwlane_13.inf %WinDir%\inf\netrtwlanu.inf %WinDir%\inf\netwbw02.inf %WinDir%\inf\netwew00.inf %WinDir%\inf\netwew01.inf %WinDir%\inf\netwlan92de.inf %WinDir%\inf\netwlv64.inf %WinDir%\inf\netwns64.inf %WinDir%\inf\netwsw00.inf %WinDir%\inf\netwtw02.inf %WinDir%\inf\netwtw04.inf %WinDir%\inf\netwtw06.inf EXEC !=SetWG.exe WORKGROUP EXEC @!%WinDir%\System32\Net.exe Start Wlansvc EXEC @!%WinDir%\System32\Net.exe Start WinHttpAutoProxySvc // Launch PENetwork EXEC %ProgramFiles%\PENetwork\PENetwork.exe // Remote Desktop Server Connect (Uncommented By RDC Plugin) //EXEC @!%WinDir%\System32\mstsc.exe /v: _END //////////////////////////////////////////////////////////////////////////////////////////////// [PINTOOL] StartMenu0=%WinDir%\Explorer.exe|||||||| TaskBar0=%SystemRoot%\System32\cmd.exe|||||||| TaskBar9=%SystemRoot%\Explorer.exe||||||||
_SUB LoadShell
//EXEC Y:\Programs\ProcessMonitor_x64\Procmon.exe
// Enable ctfmon: Alternative User Input Text Input Processor (TIP) (Uncommented for Chinese and Korean windows source). Not to be changed, Replace //EXEC by //=EXEC
//EXEC %WinDir%\System32\ctfmon.exe
EXEC =REGEDIT /S %CurDir%\CUSTOM.REG
FIND $%USERNAME%=SYSTEM,SHEL %WinDir%\explorer.exe
//SHEL %ProgramFiles%\WinXShell\WinXShell.exe -winpe
_END
You could also put it earlier, before the end of the shortcuts subroutine, for example.
subroutines start with
_SUB somename
some commands in here
_END
A subroutine will be ignored unless it is called. You can see the calls at the top of what you posted:
CALL OSInit
CALL PreShell
CALL Shortcuts
CALL PinTo
CALL LoadShell
CALL PostShell
CALL AudioInit
CALL NetInit
Any lines that start with // are also ignored - usually they are just there as comments or explanations for the user.
So pemcd.exe will ignore the //comments and it only "sees" and executes the following:
_SUB LoadShell
EXEC =REGEDIT /S %CurDir%\CUSTOM.REG
FIND $%USERNAME%=SYSTEM,SHEL %WinDir%\explorer.exe
_END
sorry you are losing me - it has to be baby steps for me to have a chance of understanding and learning
You don't need to know this stuff, just add the line I have highligted in red : the lines in black are already in the pecmd.ini you posted above
_SUB LoadShell
//EXEC Y:\Programs\ProcessMonitor_x64\Procmon.exe
// Enable ctfmon: Alternative User Input Text Input Processor (TIP) (Uncommented for Chinese and Korean windows source). Not to be changed, Replace //EXEC by //=EXEC
//EXEC %WinDir%\System32\ctfmon.exe
EXEC =REGEDIT /S %CurDir%\CUSTOM.REG
FIND $%USERNAME%=SYSTEM,SHEL %WinDir%\explorer.exe
//SHEL %ProgramFiles%\WinXShell\WinXShell.exe -winpe
_END
ok - thanks - i did add the line and it did not change the font size - i need to go back and check i have done exactly as you said - am going to start again with just a simple build and the reg file added to check i have not done something wrong
Apart from the DPI setting is the rest working?
What does your reg file contain?Code:Default\Control Panel\Desktop\WindowMetrics",AppliedDPI,108
Are you using
[HKEY_USERS\.DEFAULT\Control Panel\Desktop\WindowMetrics]
I haven't tried fooling around with dpi settings in pe - maybe there is something different about it.
Last edited by SIW2; 04 Jul 2019 at 14:04.