Disable F8 in tftp\englpe\..\winpe.wim

cd "C:\Users\engl\Desktop\tftp\englpe\x64" or cd "C:\Users\engl\Desktop\tftp\englpe\x86" depending on whether you need to update the winpe.wim for x86 or x64
mkdir c:\temp\englpe
dism /mount-wim /wimfile:"winpe.wim" /index:1 /mountdir:"c:\temp\englpe\"

edit ..\windows\system32\winpeshl.ini and remove ', /EnableF8' in line number 3:

commit the image using:

dism /unmount-wim /mountdir:"c:\temp\englpe"  /commit


Using OEMDefaultAssociations.xml in phase4

phase3-after.vbs:

Set FSO = CreateObject("Scripting.FileSystemObject")
status = FSO.CopyFile("C:\Ztoolkit\OEMDefaultAssociations.xml", "C:\Windows\System32\", True)

OEMDefaultAssociations.xml

<?xml version="1.0" encoding="UTF-8"?>
<DefaultAssociations>
  <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" />
</DefaultAssociations>

Export or Import Default Application Associations

 

 

 

Remove (Provisioned)Appx Packages

 

phase1-after.vbs:

Utils.Run "powershell.exe -ExecutionPolicy Bypass -Command ""Get-AppxPackage -AllUsers * | Remove-AppxPackage""", 0, False
Utils.Run "powershell.exe -ExecutionPolicy Bypass -Command ""Get-AppxProvisionedPackage -online  | Remove-AppxProvisionedPackage -online""", 0, False

 

phase1-after.ps1:

Get-AppxPackage -AllUsers * | Remove-AppxPackage
Get-AppxProvisionedPackage -online  | Remove-AppxProvisionedPackage -online

 

 

Appending netsetup.log to ztoolkit.log

In phase2 of an ENGL Imaging Toolkit's build process a device is joined to a Windows domain. %systemroot%\debug\netsetup.log is the log file where the join process is logged.

If you can't join a computer to an Active Directory domain, or if a computer can't communicate with any other computer in the network, the situation might be the result of join and authentication problems. TechNet article "Join and Authentication Issues" has more information about issues and how to troubleshoot these.

'netsetup.log' is the logfile which gives you more information. For troubleshooting purposes it might be convenient to have this information in ztoolkit.log as well. This little vbscript, to be run in phase2-after.vbs, appends the slmgr.log to ztoolkit.log:

AppendNetsetupLogfile()

Function AppendNetsetupLogfile

  on error resume next

  Set FSO = CreateObject("Scripting.FileSystemObject").OpenTextFile("c:\windows\debug\netsetup.log",1)
  strNetSetupLogging  = FSO.ReadAll()
  FSO.Close

  Status = Utils.AppendLog("phase2-after.vbs: " & strNetSetupLogging  )

  If Err.Number <> 0 then  
    'MsgBox "An error occured in routine AppendNetsetupLogfile()"
    Status = Utils.AppendLog("phase2-after.vbs: " & "AppendNetsetupLogfile()" & " an error occurred " & Err.Number)
  Else
    Status = Utils.AppendLog("phase2-after.vbs: " & "AppendNetsetupLogfile()" & " successfully")
  End If
 
End Function

Importing certificates during ENGL build process

If you need to import certificates during the ENGL Imaging Toolkit build process, you can use "certutil.exe" which is a Microsoft utility included by default with Windows 7, Windows 8, Windows Server 2008 and Windows Server 2012.

E.g. if you want to import the Oracle certificate which is needed to install the drivers for VirtualBox, you could use this vbscript code to include it in one of the phase scripts (.vbs):

'Import the Oracle Corporation Certificate in order to install VirtualBox 4.x
Utils.Run "certutil -addstore TrustedPublisher ""c:\ztoolkit\oracle corporation.cer""", 0, False

Just make sure to add the certificate itself as a custom file to your ENGL project. You can also import P12 certificates using certutil.exe:

'Import P12 certificates
Utils.Run("certutil -f -importPfx -p ""rovabu"" ""c:\ztoolkit\http_proxy_signing_ca.p12"""),1,True

When "to-be" installed applications in phase3 are depending on these certificates, it's recommended to use a phase1 of phase2 script.

 

More Articles ...