[main]
Title=Base files
Description=Make folders and copy all basic files. This step is fundamental to add all needed system files.
Selected=none
Level=1
Author=ChrisR,JFX,Kare
Version=12
Date=06.07.2022
Sizex86=|424903048:41466948:0
Sizex64=|566864800:42599492:0

[Interface]

tEcho_1=Creating directories...
tEcho_2=Taking ownership on [TargetDir]
tEcho_3=Grant full access on [TargetDir]
tEcho_6=Part [1/8] - Copy: Base files
tEcho_7=Part [2/8] - Copy: Registry files
tEcho_8=Part [3/8] - Copy: Drivers files
tEcho_9=Part [4/8] - Copy: Font files
tEcho_10=Part [5/8] - Copy: Side By Side files
tEcho_11=Part [6/8] - Copy: System32 files
tEcho_12=Part [7/8] - Copy: Install.wim\System32 files
tEcho_13=Part [8/8] - Copy: Common files
tMsg_1=SetAcl - ERROR with NTFS permission on target folder.#$xProbably Black Screen on boot


[Interface.07]
Description=Erstellt Ordner und kopiert das Grundsystem. Dieses Skript integriert benötigte Systemdateien in WindowsPE.
//
tEcho_1=Verzeichnisse werden erstellt...
tEcho_2=Besitzübernahme an [TargetDir]
tEcho_3=Vollzugriff auf [TargetDir]
tEcho_6=Abschnitt [1/8] - Kopiere: Basis-Dateien
tEcho_7=Abschnitt [2/8] - Kopiere: Registry-Dateien
tEcho_8=Abschnitt [3/8] - Kopiere: Treiber-Dateien
tEcho_9=Abschnitt [4/8] - Kopiere: Schriftarten-Dateien
tEcho_10=Abschnitt [5/8] - Kopiere: Side-By-Side-Dateien
tEcho_11=Abschnitt [6/8] - Kopiere: System32-Dateien
tEcho_12=Abschnitt [7/8] - Kopiere: Install.wim\System32-Dateien
tEcho_13=Abschnitt [8/8] - Kopiere: Gemeinsame Dateien
//
tMsg_1=SetAcl - FEHLER bei der NTFS-Berechtigung auf das Zielverzeichnis.#$xErgibt beim Booten wahrscheinlich einen Blackscreen.

Panel=1
[process]

Echo,%tEcho_1%
dirmake,%Target_CD%\sources
DirMake,%target_cd%\BOOT\fonts
DirMake,%target_cd%\Boot\en-us
DirMake,%target_cd%\Boot\%DistLang%

DirMake,%targetdir%\Program Files\Internet Explorer
DirMake,%targetdir%\ProgramData

DirMake,%target_win%\%DistLang%
DirMake,%target_win%\schemas\EAPHost
DirMake,%target_win%\servicing
DirMake,%target_win%\boot\fonts
DirMake,%target_win%\boot\Resources\%DistLang%
DirMake,%target_win%\Logs
DirMake,%target_win%\Globalization\Sorting
DirMake,%target_win%\inf
DirMake,%target_win%\fonts
DirMake,%target_win%\winsxs\manifests

DirMake,%target_sys%\config
DirMake,%target_sys%\en-us
DirMake,%target_sys%\%DistLang%
DirMake,%target_sys%\boot\%DistLang%
DirMake,%target_sys%\dism
DirMake,%target_sys%\driverstore
DirMake,%target_sys%\drivers
DirMake,%target_sys%\wbem
DirMake,%target_sys%\SMI
DirMake,%target_sys%\CodeIntegrity

//Shortcuts
DirMake,%TargetDir%\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
DirMake,%TargetDir%\Users\Default\Desktop
DirMake,%TargetDir%\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

DirMake,%targetdir%\Users\Default\AppData\Local\Microsoft\Windows\History
DirMake,%targetdir%\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files"
DirMake,%targetdir%\Users\Default\AppData\Local\Microsoft\Windows\WinX\Group1
DirMake,%targetdir%\Users\Default\AppData\Local\Microsoft\Windows\WinX\Group2
DirMake,%targetdir%\Users\Default\AppData\Local\Microsoft\Windows\WinX\Group3
DirMake,%targetdir%\Users\Default\AppData\Local\Temp
DirMake,%Targetdir%\Users\Default\AppData\LocalLow\
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Cookies
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Libraries
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Network Shortcuts"
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Recent
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\SendTo
//DirMake,"%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories"
//DirMake,"%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools"
DirMake,%targetdir%\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
DirMake,%targetdir%\Users\Default\AppData\Roaming\Microsoft\Windows\Templates
//-
DirMake,%targetdir%\Users\Default\Documents
DirMake,%targetdir%\Users\Default\Downloads
DirMake,%targetdir%\Users\Default\Favorites\Links
DirMake,%targetdir%\Users\Default\Links
DirMake,%targetdir%\Users\Default\Pictures
DirMake,%targetdir%\Users\Default\Music
DirMake,%targetdir%\Users\Default\Videos
//-
DirMake,%targetdir%\Users\Public\Libraries
DirMake,%targetdir%\Users\Public\Desktop
DirMake,%targetdir%\Users\Public\Documents
DirMake,%targetdir%\Users\Public\Downloads
DirMake,%targetdir%\Users\Public\Pictures
DirMake,%targetdir%\Users\Public\Music
DirMake,%targetdir%\Users\Public\Videos
DirMake,%targetdir%\Users\Administrator\AppData\LocalLow\

Echo,%tEcho_2%
filecopy,%boot_win%\WindowsShell.Manifest,%target_win%\
ShellExecute,hide,%Tools%\%HOstArch%\SetAcl.exe,"-ot #$qfile#$q -on #$q%target_win%\WindowsShell.Manifest#$q -actn setowner -ownr #$qn:S-1-5-32-544;s:y#$q"
ShellExecute,hide,%Tools%\%HOstArch%\SetAcl.exe,"-ot #$qfile#$q -on #$q%target_win%\WindowsShell.Manifest#$q -actn ace -ace #$qn:S-1-5-32-544;p:full;s:y#$q"

Echo,%tEcho_6%
If,Not,%DistLang%,=,en-US,then,FileCopy,%boot_sys%\en-US\*.*,%target_sys%\en-US

filecopy,%Boot_win%\Globalization\Sorting\SortDefault.nls,%target_win%\Globalization\Sorting

SetReqFile,%boot_win%,%Distlang%,%FallBack%,%target_win%
CopyFile,regedit.exe,1
CopyFile,boot\Resources\bootres.dll,1

FileCopy,%boot_win%\boot\Fonts\*,%target_win%\boot\Fonts
filecopy,%boot_win%\system.ini,%target_win%
filecopy,%boot_win%\win.ini,%target_win%

Filecopy,%InstallSrc%\ProgramData\Microsoft\Windows\Caches\cversions.2.db,%TargetDir%\ProgramData\Microsoft\Windows\Caches\

//Servicing (DISM /PEIMG)
Dircopy,%boot_win%\servicing\,%target_win%\servicing
Dircopy,%boot_sys%\Dism\,%target_sys%\Dism

//Echo, Processing copy [2/8] Boot Files
FileCopy,%SourceDir%\bootmgr,%Target_CD%
//FileCopy,%SourceDir%\boot\*,%TargetDir%\boot

If,ExistFile,%boot_win%\Boot\PXE\%DistLang%\bootmgr.exe.mui,Then,FileCopy,%boot_win%\Boot\PXE\%DistLang%\bootmgr.exe.mui,%target_cd%\Boot\%DistLang%
DirCopy,%SourceDir%\Boot,%Target_CD%\Boot\,1

//sys32
FileCopy,%boot_sys%\boot\winload.*,%target_sys%\boot
GetDistLang,%DistTmp%,%boot_sys%\boot\winload.*,%Distlang%:%FallBack%,1
FileCopy,%boot_sys%\boot\%DistTmp%\winload.*,%target_sys%\boot\%DistTmp%

// efi support
FileCopy,%SourceDir%\bootmgr.efi,%Target_CD%
DirCopy,%SourceDir%\efi\,%Target_CD%\efi
//DirMake,%target_win%\Boot\EFI\%DistLang%
//FileCopy,%boot_win%\Boot\EFI\*,%target_win%\Boot\EFI,NOREC
//FileCopy,%boot_win%\Boot\EFI\%DistLang%\*,%target_win%\Boot\EFI\%DistLang%

Echo,%tEcho_7%

FileCopy,%BootSRC%\Users\Default\NTUSER.DAT,%TargetDir%\Users\Default\
FileSetAttrib,%TargetDir%\Users\Default\NTUSER.DAT,-RSAH

if,%os%,=,Win8,then
	FileCopy,%boot_sys%\config\BBI,%target_sys%\config
	FileCopy,%boot_sys%\config\BCD-Template,%target_sys%\config
	FileCopy,%boot_sys%\config\COMPONENTS,%target_sys%\config
	FileCopy,%boot_sys%\config\DEFAULT,%target_sys%\config
	// Extended drivers

	FileCopy,%boot_sys%\config\DRIVERS,%target_sys%\config
	FileCopy,%boot_sys%\config\ELAM,%target_sys%\config
	FileCopy,%boot_sys%\config\FP,%target_sys%\config
	FileCopy,%boot_sys%\config\SAM,%target_sys%\config
	FileCopy,%boot_sys%\config\SECURITY,%target_sys%\config
	FileCopy,%boot_sys%\config\SOFTWARE,%target_sys%\config
	FileCopy,%boot_sys%\config\SYSTEM,%target_sys%\config
else
	if,%PEmode%,=,pe,then
		// PE in Ram
		FileCopy,%boot_sys%\config\BBI,%target_sys%\config
		FileCopy,%boot_sys%\config\BCD-Template,%target_sys%\config
		FileCopy,%boot_sys%\config\COMPONENTS,%target_sys%\config
		FileCopy,%boot_sys%\config\DEFAULT,%target_sys%\config
	
		FileCopy,%boot_sys%\config\DRIVERS,%target_sys%\config
		FileCopy,%boot_sys%\config\ELAM,%target_sys%\config
		FileCopy,%boot_sys%\config\FP,%target_sys%\config
		FileCopy,%boot_sys%\config\SAM,%target_sys%\config
		FileCopy,%boot_sys%\config\SECURITY,%target_sys%\config
		FileCopy,%Install_sys%\config\SOFTWARE,%target_sys%\config
		FileCopy,%boot_sys%\config\SYSTEM,%target_sys%\config
	else
		// OS in Ram
		FileCopy,%Install_sys%\config\BBI,%target_sys%\config
		FileCopy,%Install_sys%\config\BCD-Template,%target_sys%\config
		FileCopy,%Install_sys%\config\COMPONENTS,%target_sys%\config
		FileCopy,%Install_sys%\config\DEFAULT,%target_sys%\config
		// Extended drivers
		FileCopy,%Install_sys%\config\DRIVERS,%target_sys%\config
		FileCopy,%Install_sys%\config\ELAM,%target_sys%\config
		FileCopy,%Install_sys%\config\FP,%target_sys%\config
		FileCopy,%Install_sys%\config\SAM,%target_sys%\config
		FileCopy,%Install_sys%\config\SECURITY,%target_sys%\config
		FileCopy,%Install_sys%\config\SOFTWARE,%target_sys%\config
		FileCopy,%Install_sys%\config\SYSTEM,%target_sys%\config
	end
end

RegLoad,%RegSystem%,PE-SYSTEM
RegLoad,%RegSoftware%,PE-SOFTWARE

//- Nls files
RegRead,%CodePage%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,ACP
RegRead,%Variable%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,%CodePage%
If,Not,ExistFile,%TargetDir%\Windows\System32\%Variable%,then,FileCopy,%BootSRC%\Windows\System32\%Variable%,%TargetDir%\Windows\System32
RegRead,%CodePage%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,MACCP
RegRead,%Variable%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,%CodePage%
If,Not,ExistFile,%TargetDir%\Windows\System32\%Variable%,then,FileCopy,%BootSRC%\Windows\System32\%Variable%,%TargetDir%\Windows\System32
RegRead,%CodePage%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,OEMCP
RegRead,%Variable%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,%CodePage%
If,Not,ExistFile,%TargetDir%\Windows\System32\%Variable%,then,FileCopy,%BootSRC%\Windows\System32\%Variable%,%TargetDir%\Windows\System32

//- Fonts
RegRead,%Variable%,HKLM,PE-System\ControlSet001\Control\Nls\CodePage,OEMHAL
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\Console\RasterFonts",CGA40WOA.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\Console\RasterFonts",CGA80WOA.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\Console\RasterFonts",EGA40WOA.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\Console\RasterFonts",EGA80WOA.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\Console\RasterFonts",woafont
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\LargeFont",FIXEDFON.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\LargeFont",FONTS.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\LargeFont",OEMFONT.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\SmallFont",FIXEDFON.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\SmallFont",FONTS.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegRead,%Variable%,HKLM,"PE-software\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\SmallFont",OEMFONT.FON
If,Not,ExistFile,%TargetDir%\Windows\Fonts\%Variable%,then,FileCopy,%BootSRC%\Windows\Fonts\%Variable%,%TargetDir%\Windows\Fonts
RegUnLoad,PE-SOFTWARE

// Keyboard
RegLoad,%RegUser%,PE-USER
If,ExistRegKey,HKLM,PE-User\Keyboard Layout\Preload,1,then
	RegRead,%lcid%,HKLM,PE-User\Keyboard Layout\Preload,1
	If,ExistRegKey,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcid%,Layout File,then
		RegRead,%KBfile%,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcid%,"Layout File"
		If,ExistFile,%boot_sys%\%KBfile%,then,FileCopy,%boot_sys%\%KBfile%,%Target_sys%
	end
end
If,ExistRegKey,HKLM,PE-User\Keyboard Layout\Substitutes,%lcid%,then
	RegRead,%lcSub%,HKLM,PE-User\Keyboard Layout\Substitutes,%lcid%
	If,ExistRegKey,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcSub%,Layout File,then
		RegRead,%KBfile%,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcSub%,Layout File
		If,ExistFile,%boot_sys%\%KBfile%,then,FileCopy,%boot_sys%\%KBfile%,%Target_sys%
	end
end

If,ExistRegKey,HKLM,PE-User\Keyboard Layout\Preload,2,then
	RegRead,%lcid%,HKLM,PE-User\Keyboard Layout\Preload,2
	If,ExistRegKey,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcid%,Layout File,then
		RegRead,%KBfile%,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcid%,"Layout File"
		If,ExistFile,%boot_sys%\%KBfile%,then,FileCopy,%boot_sys%\%KBfile%,%Target_sys%
	end
end
If,ExistRegKey,HKLM,PE-User\Keyboard Layout\Substitutes,%lcid%,then
	RegRead,%lcSub%,HKLM,PE-User\Keyboard Layout\Substitutes,%lcid%
	If,ExistRegKey,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcSub%,Layout File,then
		RegRead,%KBfile%,HKLM,PE-System\ControlSet001\Control\Keyboard Layouts\%lcSub%,Layout File
		If,ExistFile,%boot_sys%\%KBfile%,then,FileCopy,%boot_sys%\%KBfile%,%Target_sys%
	end
end
RegUnLoad,PE-SYSTEM
RegUnLoad,PE-USER

Echo,%tEcho_8%
DirCopy,%boot_sys%\driverstore,%target_sys%\driverstore\
DirCopy,%boot_sys%\drivers,%target_sys%\drivers\
DirCopy,%boot_win%\inf,%target_win%\inf\

if,%os%,=,Win8,then
	If,ExistFile,%boot_sys%\%DistLang%\dxgkrnl.sys.mui,then,Filecopy,%boot_sys%\%DistLang%\dxgkrnl.sys.mui,%target_sys%\%DistLang%
end
//Filecopy,%boot_sys%\%DistLang%\clfs.sys.mui,%target_sys%\%DistLang%


Filecopy,%boot_sys%\wbem\*.*,%target_sys%\wbem
Filecopy,%boot_sys%\wbem\%distlang%\*.*,%target_sys%\wbem\%distlang%


//-- catroot
If,ExistDir,%boot_sys%\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE},then,FileCopy,%boot_sys%\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\*.*,%target_sys%\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}
//-- CodeIntegrity
If,ExistFile,%boot_sys%\CodeIntegrity\driver.stl,then,FileCopy,%boot_sys%\CodeIntegrity\driver.stl,%target_sys%\CodeIntegrity
DirCopy,%Boot_Sys%\SMI,%Target_Sys%\SMI\

Echo,%tEcho_9%

filecopy,%boot_win%\Fonts\8514fix.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\8514fixr.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\8514oem.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\8514oemr.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\8514sys.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\8514sysr.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\app850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\app866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\app936.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga40woa.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga80woa.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga40850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga40866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga80850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\cga80866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\consola.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega40woa.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega80woa.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega40850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega40866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega80850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\ega80866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\lucon.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\marlett.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\micross.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\s8514fix.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\s8514oem.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\s8514sys.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\segoeui.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\seguili.ttf,%target_win%\Fonts
// simpbdo.ttf not exist in %BootSRC% of w7/8 sources
//filecopy,%Install_win%\Fonts\simpbdo.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\\svgafix.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\svgasys.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\tahoma.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\tahomabd.ttf,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vga850.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vga866.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vga936.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vgafix.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vgafixr.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vgaoem.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vgasys.fon,%target_win%\Fonts
filecopy,%boot_win%\Fonts\vgasysr.fon,%target_win%\Fonts

String,%Var%,Left,%DistLang%,2
// zh-cn
if,%Var%,=,zh,then
  filecopy,%Install_win%\Fonts\simsun.ttc,%target_win%\Fonts
  filecopy,%Install_win%\Fonts\mingliu.ttc,%target_win%\Fonts\
  If,%DistLang%,=,zh-CN,then
    filecopy,%Install_win%\Fonts\msyh.ttc,%target_win%\Fonts\
 //   filecopy,%Install_win%\Fonts\msyhl.ttc,%target_win%\Fonts\
  end
  If,%DistLang%,=,zh-hk,then,filecopy,%Install_win%\Fonts\msjh.ttf,%target_win%\Fonts\
  //If,%DistLang%,=,zh-tw,then,filecopy,%Install_win%\Fonts\msjh.ttf,%target_win%\Fonts\
end
// ja-JP
If,%Var%,=,ja,Then
	FileCopy,%Install_win%\Fonts\meiryo.ttc,	%target_win%\Fonts
//	FileCopy,%Install_win%\Fonts\msgothic.ttc,	%target_win%\Fonts
//	FileCopy,%Install_win%\Fonts\msmincho.ttc,	%target_win%\Fonts
End
// ko-KR
If,%Var%,=,ko,Then
//	FileCopy,%Install_win%\Fonts\batang.ttc,	%target_win%\Fonts
	FileCopy,%Install_win%\Fonts\gulim.ttc,		%target_win%\Fonts
//	FileCopy,%Install_win%\Fonts\malgun.ttf,	%target_win%\Fonts
End

//If,%DistLang%,=,zh-tw,then
//	filecopy,%Install_win%\Fonts\msyh.ttc,%target_win%\Fonts
//	filecopy,%Install_win%\Fonts\simsun.ttc,%target_win%\Fonts
//end

Echo,%tEcho_10%

DirCopy,%boot_win%\winsxs\*_microsoft-windows-servicingstack*,%target_win%\winsxs\
DirCopy,%boot_win%\winsxs\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\

DirCopy,%boot_win%\winsxs\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\
DirCopy,%boot_win%\winsxs\*_microsoft.windows.common-controls*,%target_win%\winsxs\
DirCopy,%boot_win%\winsxs\*_microsoft.windows.gdiplus*,%target_win%\winsxs\
DirCopy,%boot_win%\winsxs\*_microsoft.windows.isolationautomation*,%target_win%\winsxs\
DirCopy,%boot_win%\winsxs\*_microsoft-windows-riched32*,%target_win%\winsxs\

DirCopy,%Install_Win%\WinSxS\*_microsoft.vc80.crt*,%Target_Win%\WinSxS\
DirCopy,%Install_Win%\WinSxS\*_microsoft.vc90.crt*,%Target_Win%\WinSxS\
if,%os%,=,Win81,then
	DirCopy,%Install_Win%\WinSxS\*_microsoft-windows-a..skmanager.resources*,%Target_Win%\WinSxS\
	DirCopy,%Install_Win%\WinSxS\*_microsoft-windows-p..al-securitytemplate*,%Target_Win%\WinSxS\
end

FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-servicingstack*,%target_win%\WinSxS\manifests\
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.0.0_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.0.0_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.common-controls*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.gdiplus*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft.windows.isolationautomation*,%target_win%\winsxs\manifests

FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.fusion*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.i..utomation.proxystub_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.m..gual_components_all_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.s...smart_card_library_*,%target_win%\winsxs\manifests
If,Not,%OS%%Arch%,=,Win8x64,then,FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.s..ation.badcomponents_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.s..rt_driver.resources_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.s..se.scsi_port_driver_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft.windows.systemcompatible_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-a..core-base.resources_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-blb-engine*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-blb-winpe_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-comctl32-v5.resources_31bf3856ad364e35_6.%WIM_MINOR%.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-comdlg32.resources_31bf3856ad364e35_6.%WIM_MINOR%.%WIM_BUILD%.16384_%DistLang%*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\WinSxS\manifests\*_microsoft-windows-comdlg32_31bf3856ad364e35_6.%WIM_MINOR%.%WIM_BUILD%.16384_none_*,%target_win%\winsxs\manifests
FileCopy,%boot_win%\winsxs\manifests\*_microsoft-windows-riched32*,%target_win%\winsxs\manifests

FileCopy,   %Boot_Win%\WinSxS\manifests\*_microsoft-windows-p..al-securitytemplate*,                                                %Target_Win%\WinSxS\manifests
FileCopy,   %Install_Win%\WinSxS\manifests\*_microsoft.vc80.crt*,%Target_Win%\WinSxS\manifests
FileCopy,   %Install_Win%\WinSxS\manifests\*_microsoft.vc90.crt*,%Target_Win%\WinSxS\manifests
FileCopy,   %Install_Win%\WinSxS\manifests\*_microsoft-windows-a..skmanager.resources*,                                             %Target_Win%\WinSxS\manifests
FileCopy,   %Install_Win%\WinSxS\manifests\*_policy.8.0.microsoft.vc80.crt*,                                                        %Target_Win%\WinSxS\manifests
FileCopy,   %Install_Win%\WinSxS\manifests\*_policy.9.0.microsoft.vc90.crt*,                                                        %Target_Win%\WinSxS\manifests

FileCopy,%Boot_sys%\wbem\xml\*.*,%target_sys%\wbem\xml\

// =================
Echo,%tEcho_11%

SetReqFile,%boot_sys%,%Distlang%,%FallBack%,%target_sys%
CopyFile,schema.dat
CopyFile,srms.dat
CopyFile,hhctrl.ocx,1
CopyFile,wshom.ocx,1
CopyFile,startnet.cmd
CopyFile,aclui.dll,1
CopyFile,activeds.dll,1
CopyFile,advapi32.dll,1
CopyFile,advpack.dll,1
If,%Arch%,=,x86,then,CopyFile,msscript.ocx,1

//FileCopy,%boot_sys%\*.bmp,%target_sys%
FileCopy,%boot_sys%\*.com,%target_sys%

If,ExistFile,%boot_sys%\api-ms-*.dll,then,FileCopy,%boot_sys%\api-ms-*.dll,%target_sys%
If,ExistFile,%boot_sys%\ext-ms-*.dll,then,FileCopy,%boot_sys%\ext-ms-*.dll,%target_sys%

SetReqFile,%boot_sys%,%Distlang%,%FallBack%,%target_sys%
CopyFile,apisetschema.dll
CopyFile,atl.dll,1
CopyFile,atmlib.dll
CopyFile,authui.dll,1
CopyFile,authz.dll
if,%os%,=,Win8,then,CopyFile,AuxiliaryDisplayClassInstaller.dll,1
CopyFile,basesrv.dll
CopyFile,bcdprov.dll
CopyFile,bcdsrv.dll
CopyFile,bcrypt.dll,1
CopyFile,bcryptprimitives.dll
CopyFile,blb_ps.dll
CopyFile,blbres.dll,1
CopyFile,BootMenuUX.dll
CopyFile,bootstr.dll,1
CopyFile,bootux.dll,1
CopyFile,BOOTVID.DLL
CopyFile,browcli.dll
CopyFile,browseui.dll
CopyFile,cabinet.dll
CopyFile,cdd.dll
CopyFile,certcli.dll,1
CopyFile,cfgmgr32.dll
CopyFile,chkwudrv.dll,1
CopyFile,ci.dll,1
CopyFile,clb.dll,1
CopyFile,clusapi.dll,1
CopyFile,cmdext.dll
CopyFile,cmipnpinstall.dll
CopyFile,cnvfat.dll
CopyFile,combase.dll,1
CopyFile,comcat.dll
CopyFile,comdlg32.dll,1
CopyFile,comres.dll,1
CopyFile,console.dll,1
CopyFile,credui.dll,1
CopyFile,crypt32.dll,1
CopyFile,cryptbase.dll
CopyFile,cryptdlg.dll,1
CopyFile,cryptdll.dll
CopyFile,cryptext.dll,1
CopyFile,cryptsp.dll
CopyFile,cryptsvc.dll,1
CopyFile,cryptui.dll,1
CopyFile,cryptxml.dll,1
CopyFile,csrsrv.dll,1
CopyFile,dbgeng.dll
CopyFile,dbghelp.dll
CopyFile,defragproxy.dll
CopyFile,defragsvc.dll,1
CopyFile,devobj.dll
CopyFile,devrtl.dll
CopyFile,dfscli.dll
CopyFile,dhcpcsvc.dll,1
CopyFile,dhcpcsvc6.dll,1
CopyFile,DismApi.dll,1
CopyFile,dispci.dll,1
CopyFile,dispex.dll
CopyFile,dnsapi.dll,1
CopyFile,dpapi.dll
CopyFile,dpapisrv.dll,1
CopyFile,drvstore.dll
CopyFile,dskquota.dll,1
CopyFile,dsparse.dll
CopyFile,dsrole.dll
CopyFile,dssenh.dll
CopyFile,dui70.dll,1
CopyFile,duser.dll,1
CopyFile,dwmapi.dll,1
CopyFile,dxgwdi.dll,1
CopyFile,esent.dll,1
CopyFile,eventcls.dll
CopyFile,fbwflib.dll
CopyFile,feclient.dll
CopyFile,FirewallAPI.dll,1
CopyFile,fltLib.dll,1
CopyFile,fmifs.dll
CopyFile,fms.dll,1
CopyFile,fontsub.dll
if,%os%,=,win8,then,CopyFile,framedyn.dll
CopyFile,framedynos.dll
CopyFile,fsutilext.dll
CopyFile,fveapi.dll,1
CopyFile,fvecerts.dll
CopyFile,FWPUCLNT.DLL,1
CopyFile,gdi32.dll
CopyFile,GdiPlus.dll
CopyFile,gpapi.dll,1
CopyFile,gpsvc.dll,1
CopyFile,hal.dll
If,%Arch%,=,x86,then
	CopyFile,HalExtIntcLpioDMA.dll
	CopyFile,HalExtIntcUartDMA.dll
	CopyFile,halmacpi.dll
end
CopyFile,hid.dll,1
CopyFile,hidserv.dll,1
CopyFile,iertutil.dll,1
CopyFile,ifmon.dll,1
CopyFile,ifsutil.dll
CopyFile,ifsutilx.dll
CopyFile,imagehlp.dll
CopyFile,imageres.dll,1
if,not,%os%%arch%,=,win81x64,then,CopyFile,imagesp1.dll,1
CopyFile,imapi.dll,1
CopyFile,imapi2.dll,1
CopyFile,imapi2fs.dll,1
CopyFile,imm32.dll
CopyFile,input.dll,1
CopyFile,IPHLPAPI.DLL,1
CopyFile,jscript.dll,1
CopyFile,jscript9.dll,1
CopyFile,jsproxy.dll
CopyFile,KBDUS.DLL
CopyFile,kd.dll
CopyFile,kdcom.dll
CopyFile,KdsCli.dll,1
CopyFile,kdusb.dll
CopyFile,kerberos.dll,1
CopyFile,kernel32.dll,1
CopyFile,KernelBase.dll,1
CopyFile,kmddsp.tsp,1
CopyFile,ktmw32.dll
CopyFile,l_intl.nls
CopyFile,linkinfo.dll
CopyFile,loadperf.dll,1
CopyFile,locale.nls
CopyFile,logoncli.dll
CopyFile,lpk.dll
CopyFile,lsasrv.dll,1
CopyFile,lsm.dll,1
CopyFile,luainstall.dll
CopyFile,lz32.dll
CopyFile,mfc42.dll,1
CopyFile,mfc42u.dll,1
CopyFile,montr_ci.dll,1
CopyFile,mpr.dll,1
CopyFile,mprapi.dll
CopyFile,msasn1.dll
CopyFile,msctf.dll,1
CopyFile,msftedit.dll,1
CopyFile,msiltcfg.dll
CopyFile,msimg32.dll
CopyFile,msls31.dll
CopyFile,msports.dll,1
CopyFile,msprivs.dll,1
CopyFile,mssign32.dll,1
CopyFile,msv1_0.dll,1
CopyFile,msvcirt.dll
CopyFile,msvcp60.dll
CopyFile,msvcrt.dll
If,%Arch%,=,x86,then,CopyFile,msvcrt40.dll
CopyFile,mswsock.dll,1
CopyFile,msxml3.dll
CopyFile,msxml3r.dll,1
CopyFile,msxml6.dll
CopyFile,msxml6r.dll,1
CopyFile,mtxdm.dll
CopyFile,nci.dll
CopyFile,ncobjapi.dll
CopyFile,ncrypt.dll,1

CopyFile,ninput.dll,1
CopyFile,net.exe
CopyFile,net1.exe
CopyFile,netapi32.dll
CopyFile,netjoin.dll,1
CopyFile,netmsg.dll,1
CopyFile,netprovisionsp.dll
CopyFile,NETSTAT.EXE,1
CopyFile,netutils.dll
CopyFile,newdev.dll,1
CopyFile,nlaapi.dll
CopyFile,nlasvc.dll,1
CopyFile,normaliz.dll
CopyFile,nrpsrv.dll
CopyFile,nsi.dll
CopyFile,nsisvc.dll,1
CopyFile,ntasn1.dll,1
CopyFile,ntdll.dll,1
CopyFile,ntdsapi.dll
CopyFile,ntlanman.dll,1
CopyFile,ntmarta.dll,1
CopyFile,ntshrui.dll,1
CopyFile,odbc32.dll
CopyFile,odbcint.dll,1
CopyFile,ole32.dll,1
CopyFile,oleacc.dll
CopyFile,oleaccrc.dll,1
CopyFile,oleaut32.dll
If,%Arch%,=,x86,then,CopyFile,olepro32.dll
CopyFile,osuninst.dll

CopyFile,pcwum.dll,1
CopyFile,pnpui.dll,1
CopyFile,powrprof.dll,1
//
CopyFile,procinst.dll,1
CopyFile,profapi.dll
CopyFile,propsys.dll,1
CopyFile,profsvc.dll,1
CopyFile,prvdmofcomp.dll
CopyFile,psmodulediscoveryprovider.dll,1
CopyFile,psmodulediscoveryprovider.mof,1
CopyFile,provthrd.dll
CopyFile,psapi.dll
CopyFile,PSHED.DLL,1

CopyFile,QUTIL.DLL,1

CopyFile,rasadhlp.dll
CopyFile,rasapi32.dll,1
CopyFile,rasman.dll
CopyFile,ReAgent.dll,1
CopyFile,regapi.dll
CopyFile,resutils.dll,1
CopyFile,riched20.dll
CopyFile,riched32.dll
CopyFile,rnr20.dll
CopyFile,RpcEpMap.dll,1
CopyFile,rpcrt4.dll,1
CopyFile,RpcRtRemote.dll
CopyFile,rpcss.dll
CopyFile,rsaenh.dll
CopyFile,rtutils.dll
CopyFile,sacsvr.dll,1
CopyFile,samcli.dll
CopyFile,samlib.dll
CopyFile,samsrv.dll,1
CopyFile,scecli.dll,1
CopyFile,scesrv.dll,1
CopyFile,scext.dll,1
CopyFile,schannel.dll,1
CopyFile,schedcli.dll
CopyFile,scrobj.dll,1
CopyFile,scrrun.dll,1
CopyFile,sdhcinst.dll
CopyFile,sechost.dll,1
CopyFile,secur32.dll
CopyFile,security.dll
CopyFile,SensApi.dll
CopyFile,setbcdlocale.dll
CopyFile,setupapi.dll,1
CopyFile,sfc.dll,1
CopyFile,sfc_os.dll
CopyFile,SHCore.dll,1
CopyFile,shell32.dll,1
CopyFile,shlwapi.dll,1
CopyFile,srclient.dll
CopyFile,stdole2.tlb
CopyFile,stdole32.tlb
CopyFile,slc.dll,1
CopyFile,SmiEngine.dll,1
CopyFile,snmpapi.dll
CopyFile,spfileq.dll
CopyFile,SPInf.dll
CopyFile,spp.dll,1
CopyFile,sppc.dll,1
CopyFile,srcore.dll,1
CopyFile,srhelper.dll
CopyFile,srvcli.dll
CopyFile,sspicli.dll
CopyFile,sspisrv.dll
CopyFile,SSShim.dll
CopyFile,Storprop.dll,1
CopyFile,streamci.dll
CopyFile,sxproxy.dll,1
CopyFile,sxs.dll,1
CopyFile,sxshared.dll
CopyFile,sxssrv.dll
CopyFile,sysclass.dll,1
CopyFile,sysntfy.dll
CopyFile,syssetup.dll

CopyFile,tapi32.dll,1
CopyFile,tdh.dll,1
CopyFile,tsddd.dll
CopyFile,tzres.dll,1

CopyFile,uexfat.dll
CopyFile,ufat.dll
CopyFile,ulib.dll,1
CopyFile,umpo.dll,1
CopyFile,umpnpmgr.dll,1
CopyFile,unattend.dll
CopyFile,untfs.dll
CopyFile,uReFS.dll
CopyFile,ureg.dll
CopyFile,urlmon.dll,1
CopyFile,user32.dll,1
CopyFile,userenv.dll,1
CopyFile,userinitext.dll,1
CopyFile,usp10.dll
CopyFile,utildll.dll,1
CopyFile,uudf.dll
CopyFile,UXInit.dll
CopyFile,uxtheme.dll,1

CopyFile,vbscript.dll,1
If,%Arch%,=,x86,then,CopyFile,vdmdbg.dll

CopyFile,vds_ps.dll
CopyFile,vdsbas.dll,1
CopyFile,vdsdyn.dll,1
CopyFile,vdsutil.dll,1
CopyFile,vdsvd.dll,1
CopyFile,version.dll
CopyFile,virtdisk.dll
CopyFile,vpnikeapi.dll
CopyFile,vssapi.dll
CopyFile,vsstrace.dll,1

CopyFile,w32time.dll,1
CopyFile,w32topl.dll
CopyFile,wbemcomn.dll
CopyFile,wdigest.dll
CopyFile,wdscore.dll
CopyFile,webio.dll,1
CopyFile,webservices.dll,1
CopyFile,wer.dll,1
CopyFile,werui.dll,1
CopyFile,wevtapi.dll,1
CopyFile,wevtsvc.dll,1
CopyFile,wimgapi.dll,1
CopyFile,win32k.sys,1
CopyFile,winbio.dll,1
CopyFile,winbrand.dll
CopyFile,WindowsCodecs.dll
CopyFile,winhttp.dll,1
CopyFile,wininet.dll,1
CopyFile,wininitext.dll
CopyFile,winmm.dll,1
CopyFile,winmmbase.dll,1
CopyFile,winnsi.dll
CopyFile,winspool.drv,1
CopyFile,winsrv.dll,1
CopyFile,winsta.dll
CopyFile,wintrust.dll
CopyFile,wkscli.dll
CopyFile,wkssvc.dll,1
CopyFile,Wldap32.dll,1
CopyFile,wmi.dll
CopyFile,WmiMgmt.msc
if,existfile,%boot_sys%\%DistLang%\WmiMgmt.msc,Then
  CopyFile,%DistLang%\WmiMgmt.msc
else
  CopyFile,en-us\WmiMgmt.msc
end
CopyFile,wmicmiplugin.dll
CopyFile,wmidcom.dll
CopyFile,wmitomi.dll,1

CopyFile,wmiprop.dll,1
CopyFile,wmsgapi.dll
CopyFile,wpeutil.dll,1
CopyFile,ws2_32.dll,1
CopyFile,ws2help.dll
CopyFile,wshcon.dll
CopyFile,wscript.exe
CopyFile,wship6.dll,1
CopyFile,WSHTCPIP.DLL,1
CopyFile,wsock32.dll,1
CopyFile,wtsapi32.dll

CopyFile,xmllite.dll

Echo,%tEcho_12%
SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%

CopyFile,dmview.ocx
CopyFile,sysmon.ocx,1
CopyFile,vmstorfltres.dll
CopyFile,batmeter.dll,1
CopyFile,appinfo.dll,1
CopyFile,clbcatq.dll
If,%Arch%,=,x86,then,CopyFile,crtdll.dll
CopyFile,devenum.dll,1
CopyFile,diskcopy.dll,1
CopyFile,dskquoui.dll,1
CopyFile,fsutil.exe,1
CopyFile,hdwwiz.cpl,1
CopyFile,hdwwiz.exe,1
CopyFile,hidphone.tsp,1
CopyFile,iernonce.dll,1
CopyFile,iologmsg.DLL,1
CopyFile,mlang.dll,1
CopyFile,mshtml.dll,1
CopyFile,ncsi.dll,1
CopyFile,objsel.dll,1
CopyFile,profsvcext.dll
CopyFile,provsvc.dll,1
CopyFile,stobject.dll,1
CopyFile,ubpm.dll,1
CopyFile,umpoext.dll,1

CopyFile,defrag.exe
CopyFile,dfrgui.exe
CopyFile,LogonUI.exe

if,%os%,=,Win81,then
	SetReqFile,%boot_sys%,%Distlang%,%FallBack%,%target_sys%
	CopyFile,adsldpc.dll,1
	CopyFile,advapi32res.dll,1
	CopyFile,bcd.dll
	CopyFile,certca.dll,1
	CopyFile,csystemeventsbrokerclient.dll
	CopyFile,d2d1.dll,1
	CopyFile,dab.dll,1
	CopyFile,dabapi.dll
	CopyFile,drvcfg.exe,1	
	CopyFile,EventAggregation.dll
	CopyFile,inetmib1.dll
	CopyFile,netcfgx.dll,1
	CopyFile,NetSetupApi.dll
	CopyFile,profext.dll,1
	//CopyFile,     psmodulediscoveryprovider.dll
	CopyFile,psmodulediscoveryprovider.mof
	CopyFile,ReInfo.dll
	CopyFile,smphost.dll,1
	CopyFile,sqmapi.dll
	CopyFile,systemeventsbrokerserver.dll,1
	CopyFile,verifier.dll
	CopyFile,websocket.dll
	CopyFile,wincorlib.dll
	CopyFile,windows.devices.humaninterfacedevice.dll
	CopyFile,winlogonext.dll
	CopyFile,WinSCard.dll,1
	CopyFile,wldp.dll,1
	CopyFile,wmiclnt.dll
	DirCopy,%Boot_Sys%\downlevel,%Target_Sys%\downlevel\

// new
//	CopyFile,cryptcatsvc.dll
//	CopyFile,autoconv.exe,1
//	CopyFile,framedyn.dll

	SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%
	CopyFile,apprepapi.dll
	CopyFile,cabview.dll,1
	CopyFile,cleanmgr.exe,1
	CopyFile,cscdll.dll
	CopyFile,deviceassociation.dll
	CopyFile,devicesetupmanager.dll,1
	CopyFile,hnetcfg.dll,1
	CopyFile,iernonce.dll
	CopyFile,infdefaultinstall.exe,1
	CopyFile,mtxex.dll
	CopyFile,profprov.dll
	CopyFile,runas.exe,1
	CopyFile,runonce.exe,1
	CopyFile,seclogon.dll,1
	CopyFile,sens.dll,1
	CopyFile,signdrv.dll
	CopyFile,storagecontexthandler.dll,1
	CopyFile,storagewmi_passthru.dll
	If,%Arch%,=,x86,Then, CopyFile,tsdiscon.exe,1
	CopyFile,umpowmi.dll
	CopyFile,ustprov.dll
	CopyFile,tabsvc.dll,1
	CopyFile,wevtfwd.dll,1
	CopyFile,winusb.dll
	CopyFile,wpd_ci.dll,1
	CopyFile,zipfldr.dll,1

	// patch - fbwf.sys
	If,not,ExistFile,%projecttemp%\fbwf-%Arch%.sys,Then
		pack,Decompress,%ScriptDir%\RegConfig\FbwfWin81.7z,%projecttemp%\,fbwf.sys-%Arch%.xdelta
		ShellExecute,Hide,%Tools%\%HostArch%\xdelta3-3.0.6.exe,-d -s #$q%Target_Sys%\Drivers\fbwf.sys#$q #$q%projecttemp%\fbwf.sys-%Arch%.xdelta#$q #$q%projecttemp%\fbwf-%Arch%.sys#$q
		If,Not,%ExitCode%,=,0,Then,Halt, fbwf.sys Fehler/error
	end
	FileCopy,%projecttemp%\fbwf-%Arch%.sys,%Target_Sys%\Drivers\fbwf.sys

	// new
	//echo,newwwwwwww
	//CopyFile,BrokerLib.dll,1
	//CopyFile,cscapi.dll
end


SetReqFile,%boot_sys%\migration,%Distlang%,%FallBack%,%target_sys%\migration
CopyFile,wmimigrationplugin.dll

SetReqFile,%boot_sys%,%Distlang%,%FallBack%,%target_sys%

//CopyFile,ARP.EXE
CopyFile,attrib.exe,1
CopyFile,autochk.exe,1
if,%os%,=,win8,then,CopyFile,autoconv.exe,1
CopyFile,bcdboot.exe,1
CopyFile,bcdedit.exe,1
CopyFile,bmrui.exe,1
CopyFile,bootcfg.exe,1
CopyFile,BootRec.exe,1
CopyFile,bootsect.exe,1
CopyFile,chkdsk.exe,1
CopyFile,chkntfs.exe,1
CopyFile,cmd.exe,1
CopyFile,conhost.exe,1
CopyFile,convert.exe
CopyFile,cscript.exe,1
CopyFile,csrss.exe,1

CopyFile,diskpart.exe,1
CopyFile,diskraid.exe,1
CopyFile,Dism.exe,1
CopyFile,dllhost.exe
CopyFile,dllhst3g.exe
CopyFile,drvinst.exe,1
CopyFile,drvload.exe,1
//
CopyFile,esentutl.exe
CopyFile,expand.exe,1
CopyFile,find.exe,1

CopyFile,fltMC.exe,1
CopyFile,ftp.exe,1
CopyFile,HOSTNAME.EXE,1
CopyFile,icacls.exe,1

CopyFile,lsass.exe

CopyFile,mcbuilder.exe
CopyFile,MdSched.exe,1
CopyFile,mountvol.exe,1

CopyFile,MuiUnattend.exe

CopyFile,ndadmin.exe,1
CopyFile,net.exe
CopyFile,net1.exe

CopyFile,NETSTAT.EXE
CopyFile,newdev.exe,1
CopyFile,notepad.exe,1
CopyFile,ntoskrnl.exe
CopyFile,OpenWith.exe,1
CopyFile,PING.EXE,1
CopyFile,PkgMgr.exe
CopyFile,poqexec.exe,1

CopyFile,recover.exe,1
CopyFile,reg.exe,1
CopyFile,regedt32.exe
CopyFile,Register-CimProvider.exe,1
CopyFile,regsvr32.exe,1

CopyFile,replace.exe,1
CopyFile,Robocopy.exe,1
CopyFile,ROUTE.EXE,1
CopyFile,rstrui.exe,1
CopyFile,rundll32.exe,1
CopyFile,sacsess.exe,1
CopyFile,services.exe,1

CopyFile,sfc.exe,1
CopyFile,smss.exe,1
CopyFile,subst.exe,1
CopyFile,svchost.exe,1
CopyFile,sxstrace.exe,1
CopyFile,sysreset.exe,1
CopyFile,takeown.exe,1
CopyFile,taskmgr.exe,1
CopyFile,TRACERT.EXE,1
CopyFile,ucsvc.exe

CopyFile,userinit.exe,1
CopyFile,vds.exe,1
CopyFile,vdsldr.exe
CopyFile,verifier.exe,1

CopyFile,wbadmin.exe,1
CopyFile,wbengine.exe,1
CopyFile,wdscapture.exe,1
CopyFile,wdsclient.exe,1
CopyFile,wdsmcast.exe,1

CopyFile,wermgr.exe
CopyFile,wevtutil.exe,1
CopyFile,wimserv.exe
CopyFile,wininit.exe,1
CopyFile,winload.exe,1
CopyFile,winlogon.exe,1
CopyFile,winpeshl.exe,1

CopyFile,wpeinit.exe
CopyFile,wpeutil.exe
CopyFile,wscript.exe,1
CopyFile,xcopy.exe

// common files...
Echo,%tEcho_13%

SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%
CopyFile,avicap32.dll,1
CopyFile,avifil32.dll,1
CopyFile,ddraw.dll,1
CopyFile,msacm32.dll,1
CopyFile,msacm32.drv,1
CopyFile,msvfw32.dll,1
CopyFile,oledlg.dll,1
CopyFile,quartz.dll,1
CopyFile,query.dll,1
CopyFile,shellstyle.dll
CopyFile,wdi.dll,1
if,%arch%,=,x86,then
	CopyFile,avifile.dll
	CopyFile,msvbvm60.dll
	CopyFile,ntvdm.exe
	CopyFile,wow32.dll	
end
SetReqFile,%boot_sys%,%Distlang%,%FallBack%,%target_sys%
CopyFile,asycfilt.dll
CopyFile,msvcp60.dll
CopyFile,msxml6.dll
CopyFile,msxml6r.dll
CopyFile,snmpapi.dll

// Driver Signing patch
if,%arch%,=,x64,then
	ShellExecute,Hide,%Tools%\gsar.exe,"-o -s:x44:x00:x49:x00:x53:x00:x41:x00:x42:x00:x4C:x00:x45:x00:x5F:x00:x49:x00:x4E:x00:x54:x00:x45:x00:x47:x00:x52:x00:x49:x00:x54:x00:x59:x00:x5F:x00:x43:x00:x48:x00:x45:x00:x43:x00:x4B:x00:x53:x00 -r:x58:x00:x49:x00:x53:x00:x41:x00:x42:x00:x4C:x00:x45:x00:x5F:x00:x49:x00:x4E:x00:x54:x00:x45:x00:x47:x00:x52:x00:x49:x00:x54:x00:x59:x00:x5F:x00:x43:x00:x48:x00:x45:x00:x43:x00:x4B:x00:x53:x00 #$q%Target_Sys%\winload.exe#$q"
	If,Not,%ExitCode%,=,0,then,Echo,"Update winload.exe failed, exit code : %ExitCode%"
	ShellExecute,Hide,%Tools%\PEChecksum.exe,"#$q%Target_Sys%\winload.exe#$q"
	If,Not,%ExitCode%,=,0,then,Echo,"Update the checksum failed, exit code : %ExitCode%"
	Filecopy,%Target_Sys%\winload.exe,%Target_Sys%\Boot\winload.exe
end


[Script-Pic]
0=4855,6280,ZLB64
1=eNqllVdUE4qyhoMgSJOiSNENSO899CKdhA0YehFQitJCpAc2RRFQQ3EbepcSkBIQCImEJl2IoAm990g3gBSRctln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