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.

741 lines
19 KiB

  1. <?XML version="1.0" ?>
  2. <package>
  3. <job error="false" debug="false" logo="false">
  4. <resource id="postbuild process"><![CDATA[perl -x "%RAZZLETOOLPATH%\postbuildscripts\Pbuild.cmd" -l %LANG%]]></resource>
  5. <resource id="name check">\.err\.tmp$</resource>
  6. <resource id="file contents">
  7. <![CDATA[
  8. %FILENAME%
  9. %CONTENTS%
  10. ]]>
  11. </resource>
  12. <resource id="stop query">
  13. <![CDATA[
  14. SELECT * FROM __InstanceDeletionEvent
  15. WITHIN 1 WHERE targetinstance ISA "Win32_Process" AND
  16. targetinstance.name LIKE "PERL%"
  17. ]]>
  18. </resource>
  19. <resource id="event message">
  20. <![CDATA[
  21. <BR><BR>
  22. <FONT FACE="Arial" SIZE="+2">
  23. <I>Event:</I>
  24. </FONT>
  25. </P>
  26. <BLOCKQUOTE>
  27. <PRE>
  28. <FONT FACE="Arial" SIZE="+1">
  29. <STRONG>
  30. %DATA%
  31. </STRONG>
  32. </FONT>
  33. </PRE>
  34. </BLOCKQUOTE>
  35. ]]>
  36. </resource>
  37. <resource id="marker">%_NTROOT%\__bldnum__</resource>
  38. <resource id ="sourcename">
  39. %BUILD%
  40. %LANG%</resource>
  41. <resource id="Usage">
  42. %SELF% - a framework implementation for tapeline utility.
  43. %SELF% enters an infinite loop interrupted by
  44. asyncronuous notification(s) issued by the creation of
  45. temporary error file.
  46. Valid event corresponds to eventual
  47. failure of the postbuild.
  48. %SELF% ver. %VERSION% is executed in the same
  49. %RAZZLE% environment the build runs.
  50. </resource>
  51. <resource id="version">1.04</resource>
  52. <resource id="fieldlist">
  53. LastModified
  54. Name
  55. </resource>
  56. <resource id="event query">
  57. <![CDATA[
  58. SELECT * FROM __instancecreationevent
  59. WITHIN 1
  60. WHERE targetinstance ISA "cim_datafile" AND
  61. targetinstance.Drive = "%_NTDRIVE%" AND
  62. targetinstance.Path = "%TEMPPATH%\" AND
  63. targetinstance.FileSize <> 0 AND
  64. targetinstance.FileName LIKE "%.ERR" AND
  65. targetinstance.FileType = "TMP FILE"
  66. ]]>
  67. </resource>
  68. <resource id="privileges">
  69. SeRemoteShutdownPrivilege
  70. SeShutdownPrivilege
  71. SeSystemEnvironmentPrivilege
  72. SeSecurityPrivilege
  73. </resource>
  74. <script language="VBScript">
  75. <![CDATA[
  76. option explicit
  77. Public Function reQuoteObjArgs(objArgs)
  78. Dim sLabelVar, sFoundLabel, sArgsDictionary, sArg, oArgs, nArg
  79. Dim poQuotedCheckRegEx, poStringCheckRegEx, psQuotedCheckPt
  80. Dim sConcatArgs, aRepArgs, spBadQuotedPart, spGoodQuotedPart, apQuoted
  81. sConcatArgs = join(objArgs, " ")
  82. psQuotedCheckPt = "\'[^\']+\'"
  83. Set poQuotedCheckRegEx = New RegExp
  84. With poQuotedCheckRegEx
  85. .Global = True
  86. .IgnoreCase = True
  87. .Pattern = psQuotedCheckPt
  88. End with
  89. Set poStringCheckRegEx = New RegExp
  90. With poQuotedCheckRegEx
  91. .Global = True
  92. .IgnoreCase = True
  93. .Pattern = psQuotedCheckPt
  94. End with
  95. If True = poQuotedCheckRegEx.Test(sConcatArgs) Then
  96. Set apQuoted = poQuotedCheckRegEx.Execute(sConcatArgs)
  97. For each spBadQuotedPart in apQuoted
  98. spGoodQuotedPart = Replace(spBadQuotedPart," ", "0x20", 1, 1000)
  99. spGoodQuotedPart = Mid(spGoodQuotedPart,2, Len(spGoodQuotedPart) -2 )
  100. poStringCheckRegEx.Pattern = Replace(spBadQuotedPart, "\", "\\", 1 ,100)
  101. sConcatArgs = poStringCheckRegEx.Replace(sConcatArgs, spGoodQuotedPart)
  102. Next
  103. aRepArgs = Split(sConcatArgs, " ")
  104. oArgs = Array()
  105. Redim oArgs (ubound(aRepArgs) + 1)
  106. For nArg = 0 To ubound(aRepArgs)
  107. oArgs(nArg) = Replace(aRepArgs(nArg), "0x20", " ", 1, 100)
  108. Next
  109. reQuoteObjArgs = oArgs
  110. Else
  111. reQuoteObjArgs = objArgs
  112. End If
  113. End Function
  114. Public Sub GetParams(sFlags, sVarNames, objArgs)
  115. _
  116. Dim sLabelVar, sFoundLabel, sArgsDictionary
  117. Dim poKnownSwitchRegEx, psMaskKnownSwitch, nArg, mma, nma, nextlen, objargsnamed
  118. Dim aFlags, aVarNames ' Arrays to split the sFlags and sVarNames
  119. _
  120. Set poKnownSwitchRegEx = New RegExp
  121. Set sArgsDictionary = CreateObject("Scripting.Dictionary")
  122. _
  123. psMaskKnownSwitch = "[-/]\w+:?\b"
  124. poKnownSwitchRegEx.Global = True
  125. poKnownSwitchRegEx.IgnoreCase = True
  126. poKnownSwitchRegEx.Pattern = psMaskKnownSwitch
  127. _
  128. If 0 = ubound(objArgs) Then
  129. Exit Sub
  130. End If
  131. _
  132. For nArg = 0 to uBound(objArgs)
  133. If True = poKnownSwitchRegEx.Test(objArgs(nArg)) Then
  134. Set mmA = poKnownSwitchRegEx.Execute(objArgs(nArg))
  135. If mma.Count <> 1 Then
  136. WScript.echo "Bad RegExp Count"
  137. Err.Raise (1937)
  138. Else
  139. For each nma in mma
  140. NextLen = nma.FirstIndex + nma.Length
  141. sFoundLabel = CStr(Mid(objArgs(nArg), _
  142. 2 + nma.FirstIndex, _
  143. nma.Length - 1))
  144. If NextLen <> len(objArgs(nArg)) Then
  145. sLabelVar = CStr(Mid(objArgs(nArg),NextLen + 1 ))
  146. Else
  147. sLabelVar = CInt(True)
  148. End If
  149. sArgsDictionary.add sFoundLabel, sLabelVar
  150. Next
  151. End If
  152. End If
  153. Next
  154. aFlags = split(sFlags)
  155. aVarNames = split(sVarNames)
  156. If Ubound(aFlags) <> Ubound(aVarNames) Then
  157. Exit Sub
  158. End If
  159. Dim tnCnt
  160. For tnCnt = 0 to Ubound(aFlags)
  161. If sArgsDictionary.Exists(aFlags(tnCnt)) Then
  162. FeedVar sArgsDictionary(aFlags(tnCnt)), aVarNames(tnCnt)
  163. End If
  164. Next
  165. Set sArgsDictionary = Nothing
  166. Set poKnownSwitchRegEx = Nothing
  167. End Sub
  168. Private Sub FeedVar(sLabelVar, sLabel)
  169. If VarType(sLabelVar) <> vbString Then
  170. If VarType(sLabelVar) = VBBoolean Then
  171. Execute(sLabel & "= CBool(" & sLabelVar & ")")
  172. Else
  173. Execute(sLabel & "=" & sLabelVar)
  174. End If
  175. Else
  176. Execute(sLabel & "=" & """" & sLabelVar & """" )
  177. End If
  178. End Sub
  179. ]]>
  180. </script>
  181. <script language="VBScript">
  182. <![CDATA[
  183. Function ReadResource(sPresId)
  184. On Error resume next
  185. Dim WshShell
  186. Set WshShell = CreateObject("WScript.Shell")
  187. Dim sPRes, asRes, uRes, tsRes
  188. sPREs = GetResource(sPresId)
  189. If Err.number <> 0 Then
  190. Wscript.echo err.number & " " & err.description
  191. ' The Error description are not informative when failed getresource
  192. IF Err.number = 7 Then
  193. Wscript.echo chr(9) & "Null resource: " & _
  194. sPresId
  195. End If
  196. IF Err.number = 5 Then
  197. Wscript.echo chr(9) & "Undefined resource: " & _
  198. sPresId
  199. End If
  200. Wscript.quit
  201. End If
  202. asRes = Split(WshShell.ExpandEnvironmentStrings(sPRes), VBNEWLINE)
  203. Set ures = CreateObject("Scripting.Dictionary")
  204. For Each tsRes in asRes
  205. If 0 <> Len(tsRes) Then
  206. uRes(tsRes) = 1
  207. End If
  208. Next
  209. Dim tResource
  210. tResource = uRes.Keys
  211. If uBound(tResource) = 0 Then
  212. ReadResource = tResource(0)
  213. Else
  214. ReadResource = tResource
  215. End If
  216. Set WshShell = Nothing
  217. Set uRes = Nothing
  218. End Function
  219. sub showUsage
  220. Const VBEXPECTED = 5
  221. on error resume next
  222. Dim oGenRplaceVarNamXp
  223. Dim oExRplaceVarNamXp
  224. Dim aoRplaceMatches, oMatch, sMatch, sLabel, sResource
  225. Set oGenRplaceVarNamXp = new RegExp
  226. Set oExRplaceVarNamXp = new RegExp
  227. With oGenRplaceVarNamXp
  228. .Global = True
  229. .IgnoreCase = True
  230. .Pattern = "%\w+%"
  231. End With
  232. With oExRplaceVarNamXp
  233. .Global = True
  234. .IgnoreCase = True
  235. .Pattern = "%\w+%"
  236. End With
  237. Dim sLine,asTest
  238. asTest = ReadResource("Usage")
  239. For Each sLine in asTest
  240. sLine = Replace(sLine, "%SELF%", WScript.ScriptName,1,10)
  241. Set aoRplaceMatches = oGenRplaceVarNamXp.Execute(sLine)
  242. For Each oMatch in aoRplaceMatches
  243. sMatch = oMatch.value
  244. sMatch = UCase(Mid(sMatch, 2, Len(sMatch)-2))
  245. sLabel = LCase(sMatch)
  246. Err.clear
  247. sResource = GetResource(sLabel)
  248. If err = 0 Then
  249. sMatch = sResource
  250. ElseIf err = VBEXPECTED Then
  251. sMatch = "<" & sMatch & ">"
  252. Else
  253. Raise Err
  254. End If
  255. oExRplaceVarNamXp.Pattern = oMatch.value
  256. sLine = oExRplaceVarNamXp.Replace(sLine, sMatch)
  257. Next
  258. WScript.echo sLine
  259. Next
  260. WScript.Quit(0)
  261. End sub
  262. ]]>
  263. </script>
  264. <script language="VBScript">
  265. <![CDATA[
  266. Function ReadFlatFile(siFileName, niTrim)
  267. Dim oTempFileSys, sTempFileName, oTempShell, oTargetListFile, sGetFileName, oTextStream
  268. Dim sFileContents, sLineContents, oWhiteSpaceXp, sWhiteSpaceClass, odListContents
  269. Set oTempFileSys = CreateObject("Scripting.FilesystemObject")
  270. Set oTempShell = WScript.CreateObject("WScript.Shell")
  271. sTempFileName = oTempFileSys.GetAbsolutePathName(siFileName)
  272. sGetFileName = oTempFileSys.GetFileName(sTempFileName)
  273. on error resume next
  274. Set oTargetListFile = oTempFileSys.GetFile(sTempFileName)
  275. if isempty(oTargetListFile) then exit function
  276. on error goto 0
  277. Set oTextStream = oTargetListFile.OpenAsTextStream(1,-2)
  278. Set oWhiteSpaceXp = new RegExp
  279. sWhiteSpaceClass = "^\s*#"
  280. With oWhiteSpaceXp
  281. .Global = True
  282. .IgnoreCase = True
  283. .Pattern = sWhiteSpaceClass
  284. End With
  285. Do while oTextStream.AtEndOfStream <> True
  286. sLineContents = oTextStream.ReadLine
  287. If Not oWhiteSpaceXp.test(sLineContents) Then
  288. sFileContents = sFileContents & VBNEWLINE & sLineContents
  289. End If
  290. Loop
  291. Set oWhiteSpaceXp = Nothing
  292. Set odListContents = CreateObject("Scripting.Dictionary")
  293. Set oWhiteSpaceXp = new RegExp
  294. sWhiteSpaceClass = "\s"
  295. With oWhiteSpaceXp
  296. .Global = True
  297. .IgnoreCase = True
  298. .Pattern = sWhiteSpaceClass
  299. End With
  300. For Each sLineContents in split(sFileContents, VBNEWLINE)
  301. If niTrim Then
  302. If oWhiteSpaceXp.test(sLineContents) Then
  303. sLineContents = oWhiteSpaceXp.Replace( sLineContents, "" )
  304. End If
  305. End If
  306. on error resume next
  307. odListContents.add sLineContents , Nothing
  308. If err.number <> 0 Then
  309. err.Raise
  310. End If
  311. err.clear
  312. Next
  313. on error resume next
  314. odListContents.remove("")
  315. err.clear
  316. Set oTempFileSys = Nothing
  317. Set oTempShell = Nothing
  318. Set oTargetListFile = Nothing
  319. Set oTextStream = Nothing
  320. Set oWhiteSpaceXp = Nothing
  321. Set ReadFlatFile = Nothing
  322. ReadFlatFile = join(odListContents.keys, VBNEWLINE)
  323. End Function
  324. ]]>
  325. </script>
  326. <script language="VBScript">
  327. <![CDATA[
  328. Option Explicit
  329. ' On Error Resume Next
  330. Dim opBrowserApp, spDisplayText
  331. Dim ader, der, Debug, Echo, Help
  332. Dim asPrivileges, spPrivilege
  333. Dim opNetwork, spThisComputer,spThisUser
  334. Dim siLang, spLang
  335. Dim opWbemLoc, opService, poLIFO, poErrorEvent, pObjProp
  336. Dim spQuery, spSourceName, sLine, opQuery
  337. Dim apCopyArgs, nRawArg
  338. Dim opDataSink, opQuitSink
  339. Dim opFilesys, opShell, spEventQry, spStopQry
  340. Dim Wait
  341. apCopyArgs = Array()
  342. Redim apCopyArgs (Wscript.arguments.Count)
  343. For nRawArg = 0 to Wscript.arguments.Count - 1
  344. apCopyArgs(nRawArg) = Wscript.arguments(nRawArg)
  345. Next
  346. apCopyArgs = reQuoteObjArgs(apCopyArgs)
  347. Call GetParams("h d e w l: y:", _
  348. "Help Debug Echo Wait siLang siTargetComputer", _
  349. apCopyArgs)
  350. If siLang <> "" Then
  351. spLang = UCase(siLang)
  352. End If
  353. If Help <> "" Then
  354. ShowUsage
  355. End If
  356. spQuery = ""
  357. opQuery = ReadResource("event query")
  358. If VBString = VARtYPE(opQuery) Then
  359. spQuery = CSTR(opQuery)
  360. Else
  361. For Each sLine in opQuery
  362. spQuery = spQuery & " " & sLine
  363. Next
  364. End If
  365. Set opShell = WScript.CreateObject("WScript.Shell")
  366. spSourceName = CSTR(GetResource("sourcename"))
  367. Dim spMarker
  368. SpMarker = ReadFlatFile(opShell.ExpandEnvironmentStrings(CSTR(GetResource("marker"))),0)
  369. IF "" <> SpMarker Then
  370. spSourceName = Replace(spSourceName, "%BUILD%", spMarker,1,1 )
  371. End If
  372. If "" <> spLang Then
  373. spSourceName = Replace(spSourceName, "%LANG%", spLang, 1, 1)
  374. End If
  375. Set opWbemLoc = CreateObject("WbemScripting.SwbemLocator")
  376. opWbemLoc.Security_.ImpersonationLevel = 3
  377. asPrivileges = ReadResource("privileges")
  378. For Each spPrivilege in asPrivileges
  379. opWbemLoc.Security_.Privileges.AddAsString(spPrivilege)
  380. Next
  381. If Debug Then
  382. WSCript.echo "Waiting for a notification" & _
  383. VBNEWLINE & _
  384. spQuery
  385. End If
  386. Set opNetwork=Wscript.CreateObject("Wscript.network")
  387. spThisComputer=UCase(opNetwork.computername)
  388. spThisUser = opNetwork.UserName
  389. Set opService = opWbemLoc.connectserver
  390. Set opDataSink = WScript.CreateObject("WbemScripting.SWbemSink","MY_")
  391. If Wait Then
  392. Set opQuitSink = WScript.CreateObject("WbemScripting.SWbemSink","QI_")
  393. End If
  394. Set opFilesys = CreateObject("Scripting.FilesystemObject")
  395. Dim oRplaceVar, oRxExact, oMsglQuoPart, oMdblQuoPart
  396. Dim psEnvVarTemp, psEnvVarDrive
  397. psEnvVarTemp = ucase(opShell.ExpandEnvironmentStrings("%TEMP%"))
  398. If spLang <> "" Then
  399. psEnvVarTemp = psEnvVarTemp & "\" & uCase(spLang)
  400. End If
  401. psEnvVarDrive = ucase(opShell.ExpandEnvironmentStrings("%_NTDRIVE%"))
  402. psEnvVarTemp = replace (psEnvVarTemp, psEnvVarDrive, "")
  403. Set oRplaceVar = new RegExp
  404. With oRplaceVar
  405. .Global = True
  406. .IgnoreCase = True
  407. .Pattern = "\""[^\""]+\"""
  408. End With
  409. Set oRxExact = New RegExp
  410. With oRxExact
  411. .Global = True
  412. .IgnoreCase = True
  413. .Pattern = ""
  414. End with
  415. spEventQry = join(ReadResource("event query"), " ")
  416. spEventQry = Replace(spEventQry, "%TEMPPATH%", psEnvVarTemp)
  417. spStopQry = join(ReadResource("stop query"), " ")
  418. If oRplaceVar.Test(spEventQry) Then
  419. For Each oMsglQuoPart in oRplaceVar.Execute(spEventQry)
  420. oRxExact.Pattern = "\\"
  421. If oRxExact.Test(oMsglQuoPart) Then
  422. oMdblQuoPart = Replace(oMsglQuoPart, "\", "\\")
  423. oRxExact.Pattern = oMdblQuoPart
  424. spEventQry = oRxExact.Replace(spEventQry , oMdblQuoPart)
  425. End If
  426. Next
  427. End If
  428. oRxExact.Pattern = "\s+"
  429. spEventQry = oRxExact.Replace(spEventQry , " ")
  430. If Echo Then
  431. WSCript.echo spEventQry
  432. WScript.echo TypeName(opDataSink)
  433. WScript.echo TypeName(opService)
  434. End If
  435. opService.ExecNotificationQueryAsync opDataSink, spEventQry
  436. If Wait Then
  437. opService.ExecNotificationQueryAsync opQuitSink, spStopQry
  438. End If
  439. MsgBox "Waiting from " & _
  440. spSourceName & _
  441. " events . " & _
  442. VBCR & _
  443. "Click OK to stop", _
  444. 64, WScript.ScriptName
  445. Call ItsTmaT_ExtMe
  446. _
  447. Sub ItsTmaT_ExtMe
  448. _
  449. If isObject(opBrowserApp) Then
  450. opBrowserApp.quit
  451. Set opBrowserApp = Nothing
  452. End If
  453. opDataSink.Cancel()
  454. Set opDataSink = Nothing
  455. If Wait Then
  456. opQuitSink.Cancel()
  457. Set opQuitSink = Nothing
  458. End If
  459. WScript.quit(0)
  460. _
  461. End Sub
  462. _
  463. Sub QI_OnObjectReady(poErrorEvent, objAsyncContext)
  464. Dim sQapRx
  465. Set sQapRx = New RegExp
  466. With sQapRx
  467. .Pattern = gpPostBPrMsk(spLang)
  468. .IgnoreCase = True
  469. .Global = True
  470. End With
  471. on error resume next
  472. If TestField(poErrorEvent.targetinstance, "CommandLine") and _
  473. sQapRx.Test(poErrorEvent.targetinstance.Properties_("CommandLine")) _
  474. Then
  475. If Debug Then
  476. WSCript.echo "GOT __InstanceDeletionEvent:" & poErrorEvent.targetinstance.Properties_("CommandLine") & _
  477. poErrorEvent.targetinstance.Properties_("Status")
  478. End If
  479. Call ItsTmaT_ExtMe
  480. End If
  481. If Debug Then
  482. If err.number then
  483. WSCript.echo err.number, err.description
  484. End If
  485. End If
  486. Set sQapRx = Nothing
  487. End Sub
  488. Sub MY_OnObjectReady(poErrorEvent, objAsyncContext)
  489. ' This is the callback subroutine executed when the Win32_NTLogEvent event
  490. ' matching the selection criteria occurs
  491. Dim opNmChk
  492. Set opNmChk = New RegExp
  493. With opNmChk
  494. .Pattern = GetResource("name check")
  495. .Global = True
  496. .IgnoreCase = True
  497. End With
  498. Dim spDisplayMessage
  499. If TestField(poErrorEvent.targetinstance, "Name") and _
  500. opNmChk.Test(poErrorEvent.targetinstance.Properties_("Name")) _
  501. Then
  502. Dim asFieldList , npFldCnt, spFieldName
  503. asFieldList = ReadResource("fieldlist")
  504. sPDisplayMessage = ""
  505. Dim opDisRFx, opDisRVx, spDispLine
  506. spDispLine = "FIELD:" & chr(09) & chr(09) & "VALUE"
  507. Set opDisRFx = new RegExp
  508. Set opDisRVx = new RegExp
  509. With opDisRFx
  510. .Global = True
  511. .Pattern = "FIELD"
  512. End With
  513. With opDisRVx
  514. .Global = True
  515. .Pattern = "VALUE"
  516. End With
  517. _
  518. For npFldCnt = 0 to UBound(asFieldList)
  519. spFieldName = asFieldList(npFldCnt)
  520. Dim stLine, stVal
  521. stLine = opDisRFx.Replace(spDispLine, spFieldName)
  522. stVal = poErrorEvent.targetinstance.Properties_(spFieldName)
  523. stLine = opDisRVx.Replace(stLine, stVal)
  524. sPDisplayMessage = sPDisplayMessage & _
  525. stLine & _
  526. VBNEWLINE
  527. Next
  528. End If
  529. Dim spRepBlk
  530. spRepBlk = GetResource("file contents")
  531. Dim opRepStRx
  532. Dim opRepCtRx
  533. Set opRepStRx = New RegExp
  534. Set opRepCtRx = New RegExp
  535. With opRepStRx
  536. .Global = True
  537. .Pattern = "%FILENAME%"
  538. End with
  539. With opRepCtRx
  540. .Global = True
  541. .Pattern = "%CONTENTS%"
  542. End with
  543. Dim spFilNm
  544. spFilNm = poErrorEvent.targetinstance.Properties_( "Name")
  545. sPDisplayMessage = sPDisplayMessage & VBNEWLINE & _
  546. opRepCtRx.Replace(opRepStRx.Replace(spRepBlk, spFilNm), _
  547. ReadFlatFile(spFilNm, 0))
  548. If Echo Then
  549. WSCript.echo sPDisplayMessage
  550. End If
  551. Set opBrowserApp = ogBrowserApp(sPDisplayMessage, opBrowserApp)
  552. Set opNmChk = Nothing
  553. Set opRepCtRx = Nothing
  554. Set opRepStRx = Nothing
  555. End Sub
  556. Function ogBrowserApp(sMessageText, oiBrowserApp)
  557. If isEmpty(oiBrowserApp) or NOT isObject(oiBrowserApp) Then
  558. If Debug Then
  559. WSCript.echo "'Creating IE object"
  560. End If
  561. Set oiBrowserApp = CreateObject("InternetExplorer.Application")
  562. End If
  563. spDisplayText = spDisplayText & VBNEWLINE & _
  564. Replace(GetResource("event message"),"%DATA%", _
  565. sMessageText)
  566. oiBrowserApp.visible=False
  567. With oiBrowserApp
  568. .width=640
  569. .height=480
  570. .top=0
  571. .left=0
  572. .menubar=0
  573. .statusbar=0
  574. .resizable=0
  575. .toolbar=0
  576. .navigate ("About:blank")
  577. .document.title="Events: "
  578. .document.body.innerHTML=spDisplayText
  579. .visible=1
  580. End With
  581. Set ogBrowserApp = oiBrowserApp
  582. End Function
  583. Function TestField(ioHashed, isField)
  584. on error resume next
  585. Dim DummyResult
  586. TestField = True
  587. Set DummyResult = ioHashed.Properties_(isField)
  588. If err <> 0 Then
  589. TestField = False
  590. End If
  591. End Function
  592. _
  593. _
  594. Function gpPostBPrMsk(siLang)
  595. _
  596. Dim spTmLp
  597. spTmLp = GetResource("postbuild process")
  598. spTmLp = Replace(spTmLp, "%LANG%", siLang)
  599. spTmLp = Replace(spTmLp, "%RAZZLETOOLPATH%", _
  600. opShell.ExpandEnvironmentStrings("%RAZZLETOOLPATH%"),1,1)
  601. spTmLp = Replace(spTmLp, "\", "\\")
  602. spTmLp = Replace(spTmLp, "-", "\-")
  603. spTmLp = Replace(spTmLp, " ", "\s+")
  604. spTmLp = Replace(spTmLp, """", "\""")
  605. gpPostBPrMsk = spTmLp
  606. _
  607. End Function
  608. ]]>
  609. </script>
  610. </job>
  611. </package>