Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

646 lines
23 KiB

  1. <%
  2. '-------------------------------------------------------------------------
  3. ' inc_logs.asp: common function for logs
  4. ' Copyright (c) Microsoft Corporation. All rights reserved.
  5. '-------------------------------------------------------------------------
  6. Const CONST_DIRECTORYPATH ="DirectoryPath"
  7. Const CONST_DIRPROPERTY ="DirProperty"
  8. Const CONST_FILENAME ="FileName"
  9. Const CONST_WMI_PROVIDER ="Provider"
  10. Const CONST_WMI_INSTANCEPATH ="InstancePath"
  11. Const CONST_WMI_INSTANCENAME ="InstanceName"
  12. Const CONST_WMI_QUERY ="Query"
  13. Const CONST_LOGS_TEMPDIR ="TempFiles"
  14. Const CONST_LOGS_LOGDIR ="LogFiles"
  15. Dim G_CONST_RETURN_URL
  16. G_CONST_RETURN_URL = "../tasks.asp"
  17. Call SA_MungeURL(G_CONST_RETURN_URL, "MultiTab", "TabsMaintenance")
  18. Call SA_MungeURL(G_CONST_RETURN_URL, "Container", "TabsMaintenanceLogs")
  19. Call SA_MungeURL(G_CONST_RETURN_URL, "Tab1", GetTab1())
  20. Call SA_MungeURL(G_CONST_RETURN_URL, "Tab2", GetTab2())
  21. '-------------------------------------------------------------------------
  22. ' Function name: GetPath
  23. ' Description: gets the directory path
  24. ' Input Variables: strKeyName
  25. ' Output Variables: None
  26. ' Return Values: String
  27. ' Global Variables: None
  28. '-------------------------------------------------------------------------
  29. Function GetPath(strKeyName)
  30. Err.Clear
  31. On Error Resume Next
  32. Dim strDirectoryPath
  33. Dim strWMIDirProperty
  34. Dim strFileName
  35. Dim strWMIProvider
  36. Dim strWMIInstancePath
  37. Dim strWMIInstanceName
  38. Dim strWMIQuery
  39. Dim strResult, strTemp
  40. ' In XPE, WebAdminLog and WebShareLog are at the same directory
  41. If CONST_OSNAME_XPE = GetServerOSName() Then
  42. if ucase(strKeyName) = ucase("TabsMaintenanceLogsWebShares") Then
  43. strKeyName = "TabsMaintenanceLogsWebAdministration"
  44. End If
  45. End If
  46. 'Getting the required values from the registry
  47. strDirectoryPath =GetLogValueFromRegistry(strKeyName,CONST_DIRECTORYPATH)
  48. strWMIDirProperty =GetLogValueFromRegistry(strKeyName,CONST_DIRPROPERTY)
  49. strFileName =GetLogValueFromRegistry(strKeyName,CONST_FILENAME)
  50. strWMIProvider =GetLogValueFromRegistry(strKeyName,CONST_WMI_PROVIDER)
  51. strWMIInstancePath =GetLogValueFromRegistry(strKeyName,CONST_WMI_INSTANCEPATH)
  52. strWMIInstanceName =GetLogValueFromRegistry(strKeyName,CONST_WMI_INSTANCENAME)
  53. strWMIQuery =GetLogValueFromRegistry(strKeyName,CONST_WMI_QUERY)
  54. If IsIISWMIProviderName(strWMIProvider) Then
  55. strWMIProvider = CONST_WMI_IIS_NAMESPACE
  56. End If
  57. 'For web admin log and web share log on sak2.1 the instance name is the currentwebsitename
  58. 'on sak2.2, the instance name is the website name running the admin/shares site (they are
  59. 'not fixed at W3SVC/1 and W3SVC/3 anymore as in 2.0)
  60. If CONST_OSNAME_XPE = GetServerOSName() Then
  61. ' On XPe, the instanceName should be the current website
  62. if ucase(strKeyName) = ucase("TabsMaintenanceLogsWebAdministration") Then
  63. strWMIInstanceName = GetCurrentWebsiteName()
  64. End If
  65. Else
  66. if ucase(strKeyName) = ucase("TabsMaintenanceLogsWebAdministration") Then
  67. strWMIInstanceName = GetCurrentWebsiteName()
  68. End If
  69. if ucase(strKeyName) = ucase("TabsMaintenanceLogsWebShares") Then
  70. strWMIInstanceName = GetSharesWebSiteID()
  71. End If
  72. End If
  73. If strDirectoryPath <> "" Then
  74. strResult=strDirectoryPath
  75. GetPath=strResult 'Handing over the dir path
  76. Exit Function
  77. ElseIf strWMIInstancePath <> "" Then 'Getting from WMI using instances
  78. ' If IIS 6.0 installed, and the provider is iis WMI provider
  79. ' we need to modify the path (WMI class) name
  80. If IsIIS60Installed() and IsIISWMIProviderName(strWMIProvider) Then
  81. strWMIInstancePath = GetIISWMIProviderClassName(strWMIInstancePath)
  82. End If
  83. 'Call to get the path from WMI
  84. strResult=GetDirPathFromInstance(strWMIProvider,strWMIInstancePath,strWMIInstanceName,strWMIDirProperty)
  85. ElseIf strWMIQuery <> "" Then 'Getting from WMI using query
  86. 'Call to get the path from WMI
  87. strResult=GetDirPathFromQuery(strWMIProvider ,strWMIQuery,strWMIDirProperty)
  88. Else ' null not found case
  89. strResult=""
  90. End IF
  91. 'Attaching the corresponding directory if exists
  92. If strWMIInstanceName <> "" Then
  93. strTemp=replace(strWMIInstanceName,"/" ,"")
  94. GetPath=strResult & "\" & strTemp
  95. Else
  96. GetPath=strResult
  97. End IF
  98. End Function
  99. '-------------------------------------------------------------------------
  100. ' Function name: GetLogValueFromRegistry
  101. ' Description: gets the Value from the registry
  102. ' Input Variables: strRegKeyPath, strRegKey
  103. ' Output Variables: None
  104. ' Return Values: String- The value retrieved from registry
  105. ' Global Variables: None
  106. '-------------------------------------------------------------------------
  107. Function GetLogValueFromRegistry(strRegKeyPath,strRegKey)
  108. Err.Clear
  109. On Error Resume Next
  110. Dim objRegistry
  111. Dim strReturnValue
  112. Dim CONST_REGISTRY_PATH
  113. CONST_REGISTRY_PATH ="SOFTWARE\Microsoft\ServerAppliance\ElementManager\WebElementDefinitions\" & strRegKeyPath
  114. 'Connecting to default namespace to carry out registry operations
  115. Set objRegistry = regConnection()
  116. 'getting the required reg key value
  117. strReturnValue=GetRegKeyValue(objRegistry,CONST_REGISTRY_PATH,strRegKey,CONST_STRING)
  118. GetLogValueFromRegistry=strReturnValue
  119. End Function
  120. '-------------------------------------------------------------------------
  121. ' Function name: GetDirPathFromQuery
  122. ' Description: gets the dir path
  123. ' Input Variables: strWMIProvider
  124. ' strWMIQuery
  125. ' strWMIDirProperty
  126. ' Output Variables: None
  127. ' Return Values: String
  128. ' Global Variables: None
  129. '-------------------------------------------------------------------------
  130. Function GetDirPathFromQuery(strWMIProvider ,strWMIQuery ,strWMIDirProperty)
  131. Err.Clear
  132. On Error Resume Next
  133. Dim objConnection 'WMI connection object
  134. Dim objLogs , objLog
  135. CONST CONST_INVALID_NAMESPACE=&H8004100E 'Invalid name space constant
  136. If strWMIProvider= "" Then
  137. GetDirPathFromQuery="" 'Assign null and exit in case of blank provider name
  138. Else
  139. Set objConnection = getWMIConnection(strWMIProvider) 'Connecting to the server
  140. 'Incase connection fails
  141. If Err.number <> 0 Then
  142. If ( Err.number=CONST_INVALID_NAMESPACE ) Then
  143. GetDirPathFromQuery="" 'Assign to null in case of error
  144. Else
  145. Call SA_ServeFailurepage(L_FAILEDTOGETWMICONNECTION_ERRORMESSAGE)
  146. End IF
  147. Exit Function
  148. End if
  149. ' If provider is IIS WMI Provider, GetIISWMIQuery is to get the query string
  150. ' working for the IIS provider installed on server
  151. If IsIISWMIProviderName(strWMIProvider) Then
  152. set objLogs = objConnection.ExecQuery(GetIISWMIQuery(strWMIQuery))
  153. else
  154. set objLogs = objConnection.ExecQuery(strWMIQuery)
  155. End If
  156. For each objLog in objLogs
  157. 'Call to get the dir path depending on WMIprop
  158. GetDirPathFromQuery=getDirPathFromProperty(objLog,strWMIDirProperty)
  159. Next 'For each objLog in objLogs
  160. End IF 'If strWMIProvider= "" Then
  161. End Function
  162. '-------------------------------------------------------------------------
  163. ' Function name: GetDirPathFromInstance
  164. ' Description: gets the dir path
  165. ' Input Variables: strWMIProvider
  166. ' strWMIQuery
  167. ' strWMIDirProperty
  168. ' Output Variables: None
  169. ' Return Values: String
  170. ' Global Variables: None
  171. '-------------------------------------------------------------------------
  172. Function GetDirPathFromInstance(strWMIProvider ,strWMIInstancePath ,strWMIInstanceName,strWMIDirProperty)
  173. Err.Clear
  174. On Error Resume Next
  175. Dim objConnection , objLog
  176. Dim strTotalWMIInstancePath
  177. 'Making the complete path to retreive from the WMI
  178. strTotalWMIInstancePath=strWMIInstancePath & ".Name=" & "'" & strWMIInstanceName & "'"
  179. Set objConnection = getWMIConnection(strWMIProvider) 'Connecting to the server
  180. 'Incase connection fails
  181. If Err.number <> 0 then
  182. Call SA_ServeFailurepage(L_FAILEDTOGETWMICONNECTION_ERRORMESSAGE)
  183. End if
  184. set objLog = objConnection.Get(strTotalWMIInstancePath)
  185. If Err.number <> 0 then
  186. Call SA_ServeFailurepage(L_FAILEDTOGETWMICONNECTION_ERRORMESSAGE)
  187. Exit Function
  188. End if
  189. 'Call to get the dir path depending on WMIprop
  190. GetDirPathFromInstance=getDirPathFromProperty(objLog,strWMIDirProperty)
  191. End function
  192. '---------------------------------------------------------------------
  193. ' Routine name: getFileNameFromPath
  194. ' Description: To get the name of the file
  195. ' Input Variables: file name along with its path
  196. ' Output Variables: None
  197. ' Return Values: The name of the file
  198. ' Global Variables: None
  199. 'Called to get the name of the file.
  200. '---------------------------------------------------------------------
  201. Function getFileNameFromPath(FileNameWithPath)
  202. On Error Resume Next
  203. Dim objFSO ' the File System Object
  204. Set objFSO = CreateObject("Scripting.FileSystemObject")
  205. 'get the name of the file
  206. getFileNameFromPath = objFSO.getFileName(FileNameWithPath)
  207. If Err.number <> 0 Then
  208. ' return empty string
  209. getFileNameFromPath = ""
  210. End If
  211. ' clean up
  212. Set objFSO = Nothing
  213. End Function
  214. '---------------------------------------------------------------------
  215. ' Routine name: getDirPathFromProperty
  216. ' Description: To get the path
  217. ' Input Variables: objLog
  218. ' WMI property
  219. ' Output Variables: None
  220. ' Return Values: Path
  221. ' Global Variables: None
  222. '---------------------------------------------------------------------
  223. Function getDirPathFromProperty(objLog ,strWMIProperty)
  224. On Error Resume Next
  225. Dim objFso
  226. Dim strTemp
  227. Dim strLogFileDir
  228. Dim strTempLogFile
  229. If Lcase(strWMIProperty) = Lcase("LogFileDirectory") Then
  230. strTemp=objLog.LogFileDirectory
  231. Set objFso = CreateObject("Scripting.FileSystemObject")
  232. If ucase(left(strTemp,8)) = ucase("%WinDir%") then
  233. strLogFileDir = objFso.GetSpecialFolder(0) & right(strTemp,len(strTemp)-8)
  234. ElseIF ucase(left(strTemp,13)) = ucase("%SystemDrive%") then
  235. strLogFileDir = objFso.GetSpecialFolder(0).Drive & right(strTemp,len(strTemp)-13)
  236. else
  237. strLogFileDir = strTemp
  238. end if
  239. getDirPathFromProperty=strLogFileDir
  240. Else 'Ucase(strWMIDirProperty)=Ucase("LogFile") Then
  241. strTempLogFile=objLog.LogFile
  242. getDirPathFromProperty=mid(strTempLogFile,1,Len(strTempLogFile)-(Len(getFileNameFromPath(strTempLogFile))+1))
  243. End If 'If strWMIDirProperty = "LogFileDirectory" Then
  244. 'clean up
  245. Set objFso = Nothing
  246. End Function
  247. '-------------------------------------------------------------------------
  248. ' Function name: GetTitle
  249. ' Description: gives the title of the page
  250. ' Input Variables: strTitle-query string variable ,"title"
  251. ' Output Variables: None
  252. ' Return Values: String-which holds the title of the page
  253. ' Global Variables: None
  254. '-------------------------------------------------------------------------
  255. Function GetTitle( strTitle )
  256. Err.Clear
  257. On Error Resume Next
  258. Dim objRegistry
  259. Dim strReturnValue
  260. Dim CONST_REGISTRY_PATH
  261. CONST_REGISTRY_PATH ="SOFTWARE\Microsoft\ServerAppliance\ElementManager\WebElementDefinitions\" & strTitle
  262. 'Connecting to default namespace to carry out registry operations
  263. Set objRegistry=regConnection()
  264. 'getting the required reg key value
  265. strReturnValue=GetRegKeyValue(objRegistry,CONST_REGISTRY_PATH,"CaptionRID",CONST_STRING)
  266. GetTitle = GetLocString("salogs.dll", strReturnValue, "")
  267. 'Release the object
  268. set objRegistry = nothing
  269. End Function
  270. '---------------------------------------------------------------------
  271. ' Function name: isFileExisting
  272. ' Description: To verify the existence of the file
  273. ' Input Variables: strFileToVerify-file name along with its path
  274. ' Output Variables: None
  275. ' Return Values: TRUE - if file exists , else FALSE
  276. ' Global Variables: None
  277. '---------------------------------------------------------------------
  278. Function isFileExisting(strFile)
  279. Err.Clear
  280. On Error Resume Next
  281. Dim objFSO
  282. Set objFSO = CreateObject("Scripting.FileSystemObject")
  283. ' If the file is existing, return true, else false
  284. If objFSO.FileExists(strFile) Then
  285. isFileExisting = True
  286. Else
  287. isFileExisting = False
  288. End If
  289. Set objFSO = Nothing
  290. End Function
  291. '---------------------------------------------------------------------
  292. ' Function name: GetLocalizationTitle
  293. ' Description: To get the Localized log title
  294. ' Input Variables: strLogTitle- LogTitle
  295. ' Output Variables: None
  296. ' Return Values: String - Localized Logtitle
  297. ' Global Variables: None
  298. '---------------------------------------------------------------------
  299. Function GetLocalizationTitle( strLogTitle )
  300. Dim strTitle
  301. Select Case Lcase(strLogTitle)
  302. Case Lcase("Application")
  303. strTitle = L_APPLICATION_TEXT
  304. Case Lcase("System")
  305. strTitle = L_SYSTEM_TEXT
  306. Case Lcase("Security")
  307. strTitle = L_SECURITY_TEXT
  308. Case Else
  309. strTitle =""
  310. End select
  311. GetLocalizationTitle=strTitle
  312. End Function
  313. private Function GetSharesWebSiteID( )
  314. On Error Resume Next
  315. Err.Clear
  316. Dim objHTTPService
  317. Dim strWMIpath
  318. Dim objSiteCollection
  319. Dim objSite
  320. Set objHTTPService = GetWMIConnection(CONST_WMI_IIS_NAMESPACE)
  321. 'XPE only has one website
  322. If CONST_OSNAME_XPE = GetServerOSName() Then
  323. 'WMI query
  324. strWMIpath = "Select * from " & GetIISWMIProviderClassName("IIs_WebServerSetting") & " where Name =" & chr(34) & GetCurrentWebsiteName() & chr(34)
  325. Else
  326. 'Switch for using IIS 6.0 WMI provider if it's installed
  327. strWMIpath = "select * from " & GetIISWMIProviderClassName("IIs_WebServerSetting") & " where servercomment =" & chr(34) & CONST_SITENAME_SHARES & chr(34)
  328. End If
  329. set objSiteCollection = objHTTPService.ExecQuery(strWMIpath)
  330. for each objSite in objSiteCollection
  331. GetSharesWebSiteID = objSite.Name
  332. Exit For
  333. Next
  334. Set objHTTPService = Nothing
  335. End Function
  336. '---------------------------------------------------------------------
  337. ' Function name: CreateAllowACE
  338. ' Description: Creates an ACE granting the specified account the
  339. ' requested access. The caller is responsible for
  340. ' catching any errors. The ACE will be marked as
  341. ' inheritable.
  342. ' Input Variables: oService: The WMI service object to use.
  343. ' oAccount: Win32_Account WMI object (or an object
  344. ' that inherits from Win32_Account).
  345. ' Represents the account to which the
  346. ' ACE applies.
  347. ' nAccessMask:The access mask for the newly created
  348. ' ACE.
  349. ' Output Variables: None
  350. ' Return Values: Object: The new Win32_ACE object.
  351. ' Global Variables: None
  352. '---------------------------------------------------------------------
  353. Private Function CreateAllowACE(oService, oAccount, nAccessMask)
  354. '
  355. ' Create the trustee
  356. '
  357. Dim oSID
  358. Set oSID = oService.Get("Win32_SID.SID='" & oAccount.SID & "'")
  359. Dim oTrustee
  360. Set oTrustee = oService.Get("Win32_Trustee").SpawnInstance_
  361. oTrustee.Domain = oAccount.Domain
  362. oTrustee.Name = oAccount.Name
  363. oTrustee.SID = oSID.BinaryRepresentation
  364. oTrustee.SIDString = oSID.SID
  365. oTrustee.SidLength = oSID.SidLength
  366. '
  367. ' Create the ACE
  368. '
  369. Dim oACE
  370. Set oACE = oService.Get("Win32_ACE").SpawnInstance_
  371. oACE.AccessMask = nAccessMask
  372. oACE.Aceflags = 3 ' Inheritable
  373. oACE.AceType = 0 ' Allow
  374. oACE.Trustee = oTrustee
  375. Set CreateAllowACE = oACE
  376. End Function
  377. '---------------------------------------------------------------------
  378. ' Function name: CreateLogsDirectory
  379. ' Description: Creates the specified directory with the correct
  380. ' ACLs for a log directory.
  381. ' Input Variables: oFSO - FileSystemObject for creating the
  382. ' directory.
  383. ' strPath - Path of the directory to create. The
  384. ' parent directory should already exist.
  385. ' An error occurs if the new directory
  386. ' already exists.
  387. ' Output Variables: None
  388. ' Return Values: Boolean - True/false to indicate success/failure.
  389. ' Global Variables: None
  390. '---------------------------------------------------------------------
  391. Private Function CreateLogsDirectory(oFSO, strPath)
  392. On Error Resume Next
  393. CreateLogsDirectory = False
  394. Const CONST_FULLCONTROL = &H1F01FF
  395. '
  396. ' Create the folder
  397. '
  398. Dim oFolder
  399. Set oFolder = oFSO.CreateFolder(strPath)
  400. If (IsNull(oFolder) Or IsEmpty(oFolder)) Then
  401. Exit Function
  402. End If
  403. '
  404. ' Get the local system account.
  405. '
  406. Dim oService
  407. Set oService = getWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  408. Dim strDomain
  409. strDomain = GetComputerName()
  410. Dim strSystemWMIPath
  411. strSystemWMIPath = "Win32_SystemAccount.Domain=""" & strDomain & _
  412. """,Name=""" & SA_GetAccount_System() & """"
  413. Dim oSystemAccount
  414. Set oSystemAccount = oService.Get(strSystemWMIPath)
  415. '
  416. ' Get the local administrators group account.
  417. '
  418. Dim strAdministratorsWMIPath
  419. strAdministratorsWMIPath = "Win32_Group.Domain=""" & strDomain & _
  420. """,Name=""" & SA_GetAccount_Administrators() & """"
  421. Dim oAdministratorsAccount
  422. Set oAdministratorsAccount = oService.Get(strAdministratorsWMIPath)
  423. '
  424. ' Update the DACL for the new directory.
  425. '
  426. Dim strFileDACLPath
  427. strFileDACLPath = "Win32_LogicalFileSecuritySetting.Path=""" & oFolder.Path & """"
  428. ' Replace single backslashes with double backslashes.
  429. Dim oRegExp
  430. Set oRegExp = New RegExp
  431. oRegExp.Pattern = "\\"
  432. oRegExp.Global = true
  433. strFileDACLPath = oRegExp.Replace(strFileDACLPath, "\\")
  434. Dim oFileSecurity
  435. Set oFileSecurity = oService.Get(strFileDACLPath)
  436. Dim oSecurityDescriptor
  437. If (0 = oFileSecurity.GetSecurityDescriptor(oSecurityDescriptor)) Then
  438. Dim nControlFlags
  439. nControlFlags = oSecurityDescriptor.Properties_.Item("ControlFlags")
  440. nControlFlags = nControlFlags Or 4 ' Set SE_DACL_PRESENT
  441. nControlFlags = nControlFlags And (Not 8) ' Clear SE_DACL_DEFAULTED
  442. oSecurityDescriptor.Properties_.Item("ControlFlags") = nControlFlags
  443. oSecurityDescriptor.Properties_.Item("DACL") = _
  444. Array(CreateAllowACE(oService, _
  445. oAdministratorsAccount, CONST_FULLCONTROL), _
  446. CreateAllowACE(oService, _
  447. oSystemAccount, CONST_FULLCONTROL))
  448. If (0 = oFileSecurity.SetSecurityDescriptor(oSecurityDescriptor)) Then
  449. CreateLogsDirectory = True
  450. End If
  451. End If
  452. If (Not CreateLogsDirectory Or 0 <> Err.number) Then
  453. '
  454. ' Updating the security descriptor failed. Delete the folder.
  455. '
  456. oFSO.DeleteFolder(oFolder.Path)
  457. End If
  458. End Function
  459. '---------------------------------------------------------------------
  460. ' Function name: GetLogsDirectoryPath
  461. ' Description: Returns the local path of the logs directory. The
  462. ' directory is created if it doesn't already exist.
  463. ' Sets the page error message on failure.
  464. ' Input Variables: oFSO - Optional FileSystemObject. If supplied,
  465. ' prevents extra instantiation of the
  466. ' object.
  467. ' Output Variables: None
  468. ' Return Values: String - The local path of the logs directory
  469. ' Global Variables: L_FILESYSTEMOBJECT_ERRORMESSAGE,
  470. ' L_LOGDOWNLOAD_ERRORMESSAGE
  471. '---------------------------------------------------------------------
  472. Public Function GetLogsDirectoryPath(oFSO)
  473. On Error Resume Next
  474. Dim oFolder
  475. GetLogsDirectoryPath = ""
  476. '
  477. ' See if the caller gave us a file system object. If not, create our own.
  478. '
  479. If IsNull(oFSO) Or IsEmpty(oFSO) Then
  480. Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
  481. If Err.number <> 0 then
  482. SA_SetErrMsg L_FILESYSTEMOBJECT_ERRORMESSAGE
  483. Exit Function
  484. End If
  485. End If
  486. '
  487. ' Construct the path, which is %VRoot%\TempFiles\LogFiles
  488. '
  489. Dim strLogPath : strLogPath = Server.MapPath(m_VirtualRoot)
  490. '
  491. ' Create the TempFiles directory if it doesn't exist.
  492. '
  493. strLogPath = strLogPath & "\" & CONST_LOGS_TEMPDIR
  494. If Not oFSO.FolderExists(strLogPath) Then
  495. Set oFolder = oFSO.CreateFolder(strLogPath)
  496. If (IsNull(oFolder) Or IsEmpty(oFolder)) Then
  497. SA_SetErrMsg L_LOGDOWNLOAD_ERRORMESSAGE
  498. Exit Function
  499. End If
  500. End If
  501. '
  502. ' Create the LogFiles directory if it doesn't exist.
  503. '
  504. strLogPath = strLogPath & "\" & CONST_LOGS_LOGDIR
  505. if Not oFSO.FolderExists(strLogPath) Then
  506. Set oFolder = oFSO.CreateFolder(strLogPath)
  507. If (IsNull(oFolder) Or IsEmpty(oFolder)) Then
  508. SA_SetErrMsg L_LOGDOWNLOAD_ERRORMESSAGE
  509. Exit Function
  510. End If
  511. End If
  512. GetLogsDirectoryPath = strLogPath
  513. End Function
  514. %>