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:


Function AppendNetsetupLogfile

  on error resume next

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

  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)
    Status = Utils.AppendLog("phase2-after.vbs: " & "AppendNetsetupLogfile()" & " successfully")
  End If
End Function

Add comment