Log_RegisterWellKnownFiles
VB Scripting Library > OSD Scripting Library > Log functions (OSD)
Log_RegisterWellKnownFiles()
Section titled “Log_RegisterWellKnownFiles()”Registers all the standard files used in the OS Deployment process. These files are:
- “x:\Logs\OSDLoader.Log”
- “x:\Logs\OSDGUI.Log”
- “x:\DiskPart.txt”
- “x:\imginfo.xml”
- “x:\Program Files\Capainstaller\Client\Logs\Advanced\PreGuiScript_Advanced.Log”
- “x:\Program Files\Capainstaller\Client\Logs\Advanced\PreDiskPartScript_Advanced.Log”
- “x:\Program Files\Capainstaller\Client\Logs\Advanced\WinPEInventory_Advanced.Log”
- “x:\Program Files\Capainstaller\Client\Logs\Advanced\PreImageScript_Advanced.Log”
- “x:\Program Files\Capainstaller\Client\Logs\Advanced\PreBootScript_Advanced.Log”
- “C:\Windows\Panther\Unattend.xml”
- “C:\sysprep\Sysprep.inf”
- “C:\sysprep\I386$OEM$\CmdLines.txt”
The last three files are registered on the drive the image is deployed to, which is normally C:.
Arguments
Section titled “Arguments”No arguments provided.
Return Type
Section titled “Return Type”Boolean, TRUE if function completed successfully.
Remarks
Section titled “Remarks”Typically used in the PreBootScript.wsf
OSD_Initialize calls this function, so the well-known files are always registered. Calling it again in your own script does no harm.
Example
Section titled “Example”The following example will do the following:
- Set the global variable gsLogServerFolder to a log share on the OSD server.
- Add a custom logfile is registered for submit along with the well-known logfiles.
- Register the product key as an unwanted text string that should be excluded from all files.
- Submit the logfiles.
Private Function IncludeScript(sScriptFile) '...End Function
'Begin bStatus=True If bStatus Then bStatus=IncludeScript("customlib.cis") If bStatus Then bStatus=IncludeLibrary("Capalib.cin") If bStatus Then bStatus=IncludeLibrary("Osdlib.cin") If bStatus Then bStatus=Job_Start("WS","Script Name","1.0","ScriptName.log","INSTALL") If bStatus Then bStatus=OSD_Initialize()
gsLogServerFolder="\\" & gsBootServer & "\LogFiles" 'set the log folder root sProductKey = "11111-22222-33333-44444-55555" If bStatus Then bStatus=Sysprep_SetProductKey(sProductKey)
If bStatus Then bStatus=Log_RegisterExcludeValue("Product key",sProductKey) 'remove productkey value from logfiles If bStatus Then bStatus=Log_RegisterWellKnownFiles() If bStatus Then bStatus=Log_RegisterLogfile("X:\MyTestLog.log") 'register an aditional file to submit
If bStatus Then bStatus=Log_SubmitLogs() 'submit the logs
Job_End(bStatus)'End mainSee Also
Section titled “See Also”Scripting Guidelines, Log_RegisterExcludeValue, Log_RegisterLogfile, Log_RemoveLogs, Log_SubmitLogs Constants Package Property Variables