[main] Title=Wofadk.sys Driver Description=Wofadk from Windows 10 ADK (Recommend on WinPEs using as source versions before Windows 10) Selected=True Level=5 Author=Alacran/Taviruni from PEBakeryTeam Version=20200323 Date=2020-03-23 Interface=Interface1 [Interface1] pTextLabelMenu1="1",1,1,35,3,70,18,10,Bold pButtonMenu2="2",1,8,75,0,70,20,pButtonMenu2,0,True,_pButtonMenu2_,True pButtonMenu3="?",1,8,145,0,70,20,pButtonMenu3,0,True,_pButtonMenu3_,True pTextLabel2="This driver is not included in the script, select your WinNTSetup_x86 and/or x64 to copy x86 or x64 wofadk.sys ",1,1,46,47,424,45,10,Bold pBevel_B1=,1,12,10,110,506,40 pTextLabel_B1="PATH to WinNTSetup_x86",1,1,20,122,150,18,8,Bold pFileBox_B1=D:\Aplicaciones\WinNTSetup\WinNTSetup_x86.exe,1,13,174,119,230,20,file pButton_B1="ADD TO CACHE",1,8,413,119,96,20,B1.RUN,0,True,_B1.RUN_,True pBevel_B2=,1,12,10,165,506,40 pTextLabel_B2="PATH to WinNTSetup_x64",1,1,20,179,147,18,8,Bold pFileBox_B2=D:\Aplicaciones\WinNTSetup\WinNTSetup_x64.exe,1,13,174,175,230,20,file pButton_B2="ADD TO CACHE",1,8,412,175,96,20,B2.RUN,0,True,_B2.RUN_,True pCheckBoxInstall="Pre-Install Wofadk",1,3,51,276,180,18,True pTextLabel3="The driver will be copied to Windows\System32\drivers. And the respective service registered in the registry.",1,1,49,226,385,31,10,Bold [Interface2] pButtonMenu1="1",1,8,5,0,70,20,pButtonMenu1,0,True,_pButtonMenu1_,True pTextLabelMenu2="2",1,1,108,3,70,18,10,Bold pButtonMenu3="?",1,8,145,0,70,20,pButtonMenu3,0,True,_pButtonMenu3_,True pBevel1=,1,12,10,65,66,2 pTextLabel="Menu Entries",1,1,10,50,230,18,8,Bold pCheckBoxShortcutDesktop="Add to Desktop Menu",1,3,40,80,150,18,False pCheckBoxShortcutQuick="Add to Quicklaunch Menu",1,3,40,110,150,18,False pCheckBoxShortcutPrograms="Add to #$qStart#$q > ",1,3,40,140,99,18,False pCheckBoxShortcutLaunchBar="Add to LaunchBar Menu ",1,3,40,170,150,18,False pButtonShortcut1=?,1,8,10,80,18,18,pButtonShortcut1,0,True,_pButtonShortcut1_,True pButtonShortcut2=?,1,8,10,110,18,18,pButtonShortcut2,0,True,_pButtonShortcut2_,True pButtonShortcut3=?,1,8,10,140,18,18,pButtonShortcut3,0,True,_pButtonShortcut3_,True pButtonShortcut4=?,1,8,10,170,18,18,pButtonShortcut4,0,True,_pButtonShortcut4_,True pTextBox1=,1,0,140,140,150,21,Programs\Utilities [pButtonMenu1] IniWrite,%ScriptFile%,Main,Interface,Interface1 System,REFRESHINTERFACE [pButtonMenu2] IniWrite,%ScriptFile%,Main,Interface,Interface2 System,REFRESHINTERFACE [pButtonMenu3] message,"Click on the buttons to toggle between tabs 1 and 2. #$x#$xTab 2 contains menu options for use in the selected shell. Click on the ? button for information about the different options." [pButtonShortcut1] message,"WinXShell only#$x#$xSelect this option to add a program shortcut to the Desktop." [pButtonShortcut2] message,"WinXShell only#$x#$xSelect this option to add a program menu option to the Quicklaunch menu - similar in appearence to the 'Pin to Taskbar' option in Windows 7/8/10." [pButtonShortcut3] message,"Applies to WinXShell#$c BBLean and LaunchBar Shell(s)#$x#$xSelect this option to add a program menu option to the Start menu. Leave blank to add to the root of the menu#$c or manually type a path to place in a sub-menu (do not use spaces in the path). E.g. #$x#$s- FileManager#$x#$s- Programs#$x#$s- Programs\FileManager#$x#$xAnd looking at the examples above - #$x#$xLeave this option blank to add a menu entry to the root of the program menu (the 'Start' menu in WinXShell#$c the 'Start' menu in BBLean#$c or the root of the LaunchBar menu bar if LaunchBar is selected as Shell)#$x#$xEnter 'FileManager' to add a menu entry for this application to the 'Start' > 'FileManager' sub-menu (WinXShell and bblean) or the 'FileManager' sub-menu in LaunchBar.#$x#$xEnter 'Programs' to add a menu entry for this application to the 'Start' > 'Programs' sub-menu (WinXShell and bblean) or the 'Programs' sub-menu in LaunchBar.#$x#$xEnter 'Programs\FileManager' to add a menu entry for this application to the 'Start' > 'Programs' > 'FileManager' sub-menu (WinXShell and bblean) or the 'Programs' > 'FileManager' sub-menu in LaunchBar." [pButtonShortcut4] message,"This setting does not apply to any LaunchBar instance running as the WinPE Shell. This option only applies to a LaunchBar instance when the Applications' > 'LaunchBar' program script is selected in the build.#$x#$xIf the 'Applications' > 'LaunchBar' program script is selected than enable this option to add a program menu entry to the root of the LaunchBar menu bar. #$x#$xPlease note that if option '6] Programs in boot.wim' in the main project script is set as 'NO'#$c then LaunchBar and a number of other applications will not be available at boot. In this case a text based .ini file will be used for LaunchBar menu settings." [pButtonInstall] message,"Select this option to install ImDisk during the build process so that the service is already started when WinPE is booted." [B1.RUN] IniRead,%ScriptFile%,Main,Version,%script_Vers% If,Not,ExistFile,"%Programs%\Wofadk\%script_Vers%.txt",Begin If,ExistDir,"%Programs%\Wofadk",DirDelete,"%Programs%\Wofadk" End If,ExistFile,"%Programs%\Wofadk\x86\wofadk.sys",Message,"The cache already contains a copy of Wofadk x86. Exiting..." Else,Begin set,%WinNTSetup%,%pFileBox_B1% If,%WinNTSetup%,Equal,"",Begin Message,"ERROR - The filebox is empty. Change the path and retry. Exiting..." Exit,"ERROR - The filebox is empty. Change the path and retry. Exiting..." End If,Not,ExistFile,"%WinNTSetup%",Begin Message,"ERROR - The selected file does not exist. Change the path and retry. Exiting..." Exit,"ERROR - The selected file does not exist. Change the path and retry. Exiting..." End StrFormat,PATH,"%WinNTSetup%","%WinNTSetup.PATH%" StrFormat,FILENAME,"%WinNTSetup%","%WinNTSetup_x86.exe%" If,Not,%WinNTSetup_x86.exe%,Equal,WinNTSetup_x86.exe,Begin Message,"ERROR - Selected file is not WinNTSetup_x86.exe. Change the path and retry. Aborting..." Exit,"ERROR - Selected file is not WinNTSetup_x86.exe. Change the path and retry. Aborting..." End If,Not,ExistDir,"%Programs%\Wofadk\x86",DirMake,"%Programs%\Wofadk\x86" Echo,"Copying files to cache" FileCopy,"%WinNTSetup.PATH%\Tools\x86\DISM\wofadk.sys","%Programs%\Wofadk\x86\wofadk.sys" FileCreateBlank,%Programs%\Wofadk\%script_Vers%.txt If,Not,ExistFile,"%Programs%\Wofadk\x86\wofadk.sys",Begin Message,"There appears to have been an error copying Wofadk x86 to the cache. Exiting..." Exit,"There appears to have been an error copying Wofadk x86 to the cache. Exiting..." End Else,Message,"Wofadk x86 added to the following path -#$x#$x#$s#$s#$s#$q%Programs%\Wofadk\x86#$q" End [B2.RUN] IniRead,%ScriptFile%,Main,Version,%script_Vers% If,Not,ExistFile,"%Programs%\Wofadk\%script_Vers%.txt",Begin If,ExistDir,"%Programs%\Wofadk",DirDelete,"%Programs%\Wofadk" End If,ExistFile,"%Programs%\Wofadk\x64\wofadk.sys",Message,"The cache already contains a copy of Wofadk x64. Exiting..." Else,Begin set,%WinNTSetup%,%pFileBox_B2% If,%WinNTSetup%,Equal,"",Begin Message,"ERROR - The filebox is empty. Change the path and retry. Exiting..." Exit,"ERROR - The filebox is empty. Change the path and retry. Exiting..." End If,Not,ExistFile,"%WinNTSetup%",Begin Message,"ERROR - The selected file does not exist. Change the path and retry. Exiting..." Exit,"ERROR - The selected file does not exist. Change the path and retry. Exiting..." End StrFormat,PATH,"%WinNTSetup%","%WinNTSetup.PATH%" StrFormat,FILENAME,"%WinNTSetup%","%WinNTSetup_x64.exe%" If,Not,%WinNTSetup_x64.exe%,Equal,WinNTSetup_x64.exe,Begin Message,"ERROR - Selected file is not WinNTSetup_x64.exe. Change the path and retry. Aborting..." Exit,"ERROR - Selected file is not WinNTSetup_x64.exe. Change the path and retry. Aborting..." End If,Not,ExistDir,"%Programs%\Wofadk\x64",DirMake,"%Programs%\Wofadk\x64" Echo,"Copying files to cache" FileCopy,"%WinNTSetup.PATH%\Tools\x64\DISM\wofadk.sys","%Programs%\Wofadk\x64\wofadk.sys" FileCreateBlank,%Programs%\Wofadk\%script_Vers%.txt If,Not,ExistFile,"%Programs%\Wofadk\x64\wofadk.sys",Begin Message,"There appears to have been an error copying Wofadk x64 to the cache. Exiting..." Exit,"There appears to have been an error copying Wofadk x64 to the cache. Exiting..." End Else,Message,"Wofadk x64 added to the following path -#$x#$x#$s#$s#$s#$q%Programs%\Wofadk\x64#$q" End [process] If,%FullProjectRun%,Equal,NO,Run,"%ProjectDir%\Core\common.script",PostConfigRun AddInterface,%ScriptFile%,Interface1,"" AddInterface,%ScriptFile%,Interface2,"" Run,%ScriptFile%,EXTRACT Run,%ScriptFile%,CHECKS Run,%ScriptFile%,COMMON [EXTRACT] If,Not,ExistFile,"%Programs%\Wofadk\%wofadk.reg",Begin ExtractAllFiles,%ScriptFile%,Folder,"%Programs%\Wofadk" IniRead,%ScriptFile%,Main,Version,%script_Vers% FileCreateBlank,%Programs%\Wofadk\%script_Vers%.txt End [CHECKS] If,Not,ExistFile,"%Programs%\Wofadk\%ARCH%\wofadk.sys",Begin Message,Wofadk is missing - exiting script...,Error,5 Exit,Wofadk is missing - exiting script...,WARN End [COMMON] If,%pCheckBoxInstall%,Equal,True,Begin If,Not,ExistDir,"%TargetDir%\Windows\System32\drivers",DirMake,"%TargetDir%\Windows\System32\drivers" FileCopy,"%Programs%\Wofadk\%ARCH%\wofadk.sys","%TargetDir%\Windows\System32\drivers" Echo,"Mounting registry hives..." If,Not,ExistRegSection,HKLM,_WinPE_SYSTEM,RegHiveLoad,_WinPE_SYSTEM,"%Target_config%\system" ShellExecute,hide,regedit.exe,"/s #$q%Programs%\Wofadk\wofadk.reg#$q" Echo,"Unmounting registry hives..." RegHiveUnload,_WinPE_SYSTEM End IniWrite,"%OutputDir%\Project.Settings.ini",PROGRAMS,Wofadk,YES End [EncodedFolders] Folder [EncodedFile-Folder-wofadk.reg] lines=0 0=eJzNlEFv00AQhd8Zif9g5QRSQY2dxCoShyo0UEEpwhUVIihKG5da0CSKk5b8eeDbcWKvwWrLCWTZOzvz5s3szHh//jhVpqkmmulGuQK9V6ov6HIttdAazQHWjN2MfaAP2BdYM/ZT9l091S7PQz2w95Ne6TU+HzXSGx2rr33WkY5Y+9gO9RbrEE0R+R27kRLwiU6Qj7D1jdvFn+kb+hTZxWhjyy3+Nb7nSDmaU1AXsE/0VZ8th5ZeYDvTipMMYBiz5mifg7mxc0z0zBj9p/A8wLowTD2L273bG+8E/BjE8p7REnKc88zMJwU54DtGXqFJ78w62vCc2Blvx4Yldk3E9J5oV0mHdjNyzDep1d9xXLJ+1yPFegxLRz3tGMMO0nkpx1i2cgeuChN7mLCUq2+VRw7fgshz6lPMn4vfqk1AwAS5ucr0hFpmdG5pGQcwON9r27VKVjfpc5uRNZM51tXmVHXWLf6lTYPrWYEZUI96FDc1V9iL7uVlnoX/ITbXqZS5d12+rFUwtArGdLWqyJ4nR43V7PEPVnJV2cjDR15lu15XOh7P0HIM7J8OPcSe59nz9F1P77NHjZFir8896lrJ/ry0Pdk/4Vktv0IbUrXm2jTXrD5R//6uGsI/tXt2zFog/PvrAv3KJut3XNPU/4n5f085vCP3bRX27fSZ3YaT8twd4rq+7pZ/1d/d8e79BdCBABF4nOMqz09LTMnWK0pNZxgFIw/8YIPQQkzY5YM87l5jYAIAmPQHVCwTUEoBAAAAAgAAACYAAAASAgAAAAAAAAEAAAAAAAAAAAAAAA [Folder] wofadk.reg=604,806