[Installwim_Win8PE]
//++++++++++++++++++++++++
//----INSTALL.WIM\System32
//++++++++++++++++++++++++

// DATEIEN (abhängig vom Betriebssystem) / FILES (depending on OS)
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Windows 8/8.1
//--------------
FileCopy,%install_sys%\*.cpl,%target_sys%
FileCopy,%install_sys%\*.ocx,%target_sys%
FileCopy,%install_sys%\*.tsp,%target_sys%

GetDistLang,%DistTmp%,%install_sys%\*.cpl,%Distlang%:%FallBack%,1
Filecopy,%install_sys%\%DistTmp%\*.cpl.mui,%target_sys%\%DistTmp%

GetDistLang,%DistTmp%,%install_sys%\*.tsp,%Distlang%:%FallBack%,1
Filecopy,%install_sys%\%DistTmp%\*.tsp.mui,%target_sys%\%DistTmp%

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

SetReqFile,%Install_sys%,%Distlang%,%FallBack%,%target_sys%
CopyFile,appinfo.dll,1
CopyFile,avicap32.dll,1
CopyFile,avifil32.dll,1
CopyFile,batmeter.dll,1
CopyFile,clbcatq.dll
CopyFile,ddraw.dll,1
CopyFile,devenum.dll,1
CopyFile,diskcopy.dll,1
CopyFile,dskquoui.dll,1
CopyFile,efscore.dll,1
CopyFile,iernonce.dll,1
CopyFile,iologmsg.DLL,1
CopyFile,mlang.dll,1
CopyFile,msacm32.dll,1
CopyFile,mshtml.dll,1
CopyFile,msvfw32.dll,1
CopyFile,ncsi.dll,1
CopyFile,objsel.dll,1
CopyFile,oledlg.dll,1
CopyFile,profsvcext.dll
CopyFile,provsvc.dll,1
CopyFile,quartz.dll,1
CopyFile,query.dll,1
CopyFile,shellstyle.dll
CopyFile,stobject.dll,1
CopyFile,storagecontexthandler.dll,1
CopyFile,ubpm.dll,1
CopyFile,umpoext.dll,1
CopyFile,vmstorfltres.dll
CopyFile,wdi.dll,1
CopyFile,werconcpl.dll,1

//28.5.
CopyFile,d3d10.dll
CopyFile,d3d10_1.dll
CopyFile,d3d10_1core.dll
CopyFile,d3d10core.dll
CopyFile,d3d10level9.dll
CopyFile,d3d10warp.dll
CopyFile,d3d11.dll
CopyFile,dcomp.dll,1
CopyFile,dxgi.dll
CopyFile,dxva2.dll
CopyFile,twinapi.dll,1
CopyFile,WinTypes.dll,1


//CopyFile,msacm32.drv,1

CopyFile,defrag.exe,1
CopyFile,dfrgui.exe,2
CopyFile,fsutil.exe,1
CopyFile,hdwwiz.exe,1
CopyFile,LogonUI.exe,1

// Windows 8/8.1 (x86)
//--------------------
If,%Arch%,=,x86,Then
	CopyFile,avifile.dll
	CopyFile,crtdll.dll
	CopyFile,msvbvm60.dll
	CopyFile,wow32.dll
	
	CopyFile,ntvdm.exe
End

// Windows 8.1
//------------
If,%NT%,=,6.3,Then
	CopyFile,apprepapi.dll
	CopyFile,cabview.dll,1
	CopyFile,cscdll.dll
	CopyFile,deviceassociation.dll
	CopyFile,devicesetupmanager.dll,1
	CopyFile,hnetcfg.dll,1
	CopyFile,iernonce.dll
	CopyFile,mtxex.dll
	CopyFile,profprov.dll
	CopyFile,seclogon.dll,1
	CopyFile,sens.dll,1
	CopyFile,signdrv.dll
	CopyFile,storagewmi_passthru.dll
	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,2
	
	//28.5.
	CopyFile,kernel.appcore.dll
	CopyFile,twinapi.appcore.dll,1
	CopyFile,twinui.appcore.dll,2
	Copyfile,D3DCompiler_47.dll


	CopyFile,cleanmgr.exe,1
	CopyFile,infdefaultinstall.exe,1
	CopyFile,runas.exe,1
	CopyFile,runonce.exe,1
	CopyFile,SlideToShutdown.exe
	If,%Arch%,=,x86,Then,CopyFile,tsdiscon.exe,1
	
	// Patch für originale fbwf.sys (nur Windows 8.1) / Patch for original fbwf.sys (Windows 8.1 only)
	//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	If,%NT%,=,6.3,Then
		If,Not,ExistFile,%ProjectTemp%\RegConfig\fbwf-%Arch%.sys,Then
//			pack,Decompress,%ScriptDir%\RegConfig\Win8PE\FbwfWin81_delta.7z,%ProjectTemp%\RegConfig,fbwf.sys-%Arch%.xdelta
			pack,Decompress,%ProjectTemp%\RegConfig\FbwfWin81_delta.7z,%ProjectTemp%\RegConfig,fbwf.sys-%Arch%.xdelta
//			pack,Decompress,%Tools%\RegConfig\FbwfWin81_delta.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%\RegConfig\fbwf.sys-%Arch%.xdelta#$q #$q%ProjectTemp%\RegConfig\fbwf-%Arch%.sys#$q
			If,Not,%ExitCode%,=,0,Then
				Message,%tMsg_1%,Halt
			End
		End
		FileCopy,%ProjectTemp%\RegConfig\fbwf-%Arch%.sys,%Target_Sys%\Drivers\fbwf.sys
	End
End
