where are sccm logs file in Windows 7 deployment
On error Resume Next
Const ForWriting = 2
Dim fso, oVar, oTSEnv, strLogFile, strComputer, strWinPath
Dim osdarchitecture, systpath
dim logfolder,strfolder, OSDSTEP, OSDLogPath
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colOSItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem")
Set fso = CreateObject("scripting.filesystemobject")
Set oTSEnv = CreateObject("Microsoft.SMS.TSEnvironment")
osdarchitecture = oTSEnv("osdarchitecture")
OSDLogPath = oTSEnv("_SMSTSLogPath")
For Each objOSItem In colOSItems
strWinPath = objOSItem.WindowsDirectory
Next
if osdarchitecture="x64" then
systpath = "syswow64"
else
systpath = "System32"
end if
wherearelogfiles("x:\windows\temp")
wherearelogfiles("x:\smstslog")
wherearelogfiles("c:\_SMSTaskSequence\Logs\Smstslog")
wherearelogfiles("c:\windows\" & systpath & "\ccm\logs\Smstslog")
wherearelogfiles("c:\windows\" & systpath & "\ccm\logs")
OSDSTEP = oTSEnv("OSDSTEP")
if isnull(OSDSTEP)=true or OSDSTEP="" then
strLogFile = logfolder & "\CUSTOM_Variables_" & Replace(Replace(Date() & "-" & Time(), "/", "_"), ":", "_") & ".log"
else
strLogFile = logfolder & "\CUSTOM_Variables_" & OSDSTEP & Replace(Replace(Date() & "-" & Time(), "/", "_"), ":", "_") & ".log"
end if
Set objTextFile = fso.OpenTextFile(strLogFile, ForWriting, True)
For Each oVar In oTSEnv.GetVariables
'if instr(lcase(oVar),lcase(password))>0 then
'end if
objTextFile.WriteLine(oVar & ": " & oTSEnv(oVar))
Next
objTextFile.Close
function wherearelogfiles(strfolder)
if osdarchitecture="x64" then
systpath = "syswow64"
else
systpath = "System32"
end if
if isnull(OSDLogPath) or OSDLogPath="" then
If fso.FileExists(strfolder&"\smsts.log") = True Then
logfolder = strfolder
else
logfolder = "c:\windows\TEMP\SMSTSLOG"
end if
else
logfolder = OSDLogPath
end if
end function
/image%2F0881799%2F20140610%2Fob_a8c7fe_logo2.jpg)
Commenter cet article