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.

640 lines
22 KiB

  1. <?XML version="1.0" ?>
  2. <package>
  3. <job error="false" bpDebug="false" logo="false">
  4. <object id="opShell2"
  5. name="Shell Object"
  6. classid="clsid:13709620-C279-11CE-A49E-444553540000"/>
  7. <runtime>
  8. <named name="op" helpstring="operation"
  9. required="true" type="string"/>
  10. <named name="file" helpstring="file to copy [FILE]"
  11. required="true" type="string"/>
  12. <named name="path"
  13. helpstring="path, special folder name or registry key [REGISTRY/FILE]"
  14. required="true" type="string"/>
  15. <named name="hive" helpstring="registry hive [REGISTRY]"
  16. required="false" type="string"/>
  17. <named name="value" helpstring="registry value [REGISTRY]"
  18. required="false" type="string"/>
  19. <named name="user" helpstring="user name [AUTOLOGON]"
  20. required="false" type="string"/>
  21. <named name="domain" helpstring="user domain [AUTOLOGON]"
  22. required="false" type="string"/>
  23. <named name="password" helpstring="user password [AUTOLOGON]"
  24. required="false" type="string"/>
  25. <named name="debug" helpstring="print debug output"
  26. required="false" type="simple"/>
  27. <named name="reboot" helpstring="reboot, esp. remotely"
  28. required="false" type="simple"/>
  29. <named name="shuffle" helpstring="shuffle the boot options"
  30. required="false" type="simple"/>
  31. <description>
  32. <![CDATA[
  33. The script provides VBSCRIPT handling for the
  34. * Reboot win32_operatingsystem invocation:
  35. cscript.exe opshellfolder.wsf /op:reboot /op:shuffle /boot:XXX
  36. * Special Folder file operations:
  37. cscript.exe opshellfolder.wsf /op:copyfileto /path:Desktop /file:XXX
  38. cscript.exe opshellfolder.wsf /op:delfile /path:startup /file:XXX
  39. cscript.exe opshellfolder.wsf /op:mapfolder /path:"C:\Documents and Settings\WINBUILD.001\Start Menu\Programs\Administrative Tools"
  40. The first two are useful to manipulate files. The last one can be used
  41. to identify the current directory.
  42. * Registry operations
  43. cscript.exe opshellfolder.wsf /op:testkey /path:"XXX\YYY\ZZZ" /hive:HKLM
  44. cscript.exe opshellfolder.wsf /op:setkEy /path:"XXX\YYY\ZZZ" /hive:HKLM
  45. cscript.exe opshellfolder.wsf /op:clearkey /path:"XXX\YYY\ZZZ" /hive:HKLM
  46. cscript.exe opshellfolder.wsf /op:setvalue /path:"XXX\YYY\ZZZ" /hive:HKLM
  47. * Administrator operations: AUTOLOGON
  48. cscript.exe opshellfolder.wsf /op:autologon /user:"UUU" /pass:"PPP" /domain:"DDD"
  49. cscript.exe opshellfolder.wsf /op:add2grp /group:"GGG" /user:"UUU" /pass:"PPP" /domain:"DDD"
  50. cscript.exe opshellfolder.wsf /op:clean
  51. This operation is actually a shortcut for the following Registry ops:
  52. HKLM,%WINLOGON%,DefaultDomainName
  53. HKLM,%WINLOGON%,DefaultUserName
  54. HKLM,%WINLOGON%,DefaultPassword
  55. HKLM,%WINLOGON%,AutoAdminLogon
  56. HKLM,%WINLOGON%,ForceAutoLogon
  57. HKLM,%WINLOGON%,PasswordExpiryWarning
  58. * Dialog/IO operations: POPUP/INPUT
  59. *
  60. ]]>
  61. </description>
  62. </runtime>
  63. <resource id="autologon registry path">HKLM\SOFTWARE\Microsoft\WINDOWS NT\CurrentVersion\Winlogon</resource>
  64. <resource id="autologon fields">
  65. DefaultUserName
  66. DefaultPassword
  67. DefaultDomainName
  68. AutoAdminLogon
  69. ForceAutoLogon
  70. </resource>
  71. <resource id="special folder names">
  72. AllUsersDesktop
  73. AllUsersStartMenu
  74. AllUsersPrograms
  75. AllUsersStartup
  76. Desktop
  77. Favorites
  78. Fonts
  79. MyDocuments
  80. NetHood
  81. PrintHood
  82. Programs
  83. Recent
  84. SendTo
  85. StartMenu
  86. Startup
  87. Templates
  88. </resource>
  89. <resource id="op">
  90. filesystemop
  91. registryop
  92. adminop
  93. bootop
  94. </resource>
  95. <resource id="bootop">
  96. Reboot
  97. Shuffle
  98. </resource>
  99. <resource id="filesystemop">
  100. CopyFileTo
  101. Delfile
  102. MapFolder
  103. </resource>
  104. <resource id="registryop">
  105. ClearKey
  106. SetKey
  107. QueryValue
  108. DeleteValue
  109. SetValue
  110. TestKey
  111. </resource>
  112. <resource id="adminop">
  113. add2grp
  114. clean
  115. autologon
  116. cpl
  117. </resource>
  118. <script language="VBScript">
  119. <![CDATA[
  120. Option Explicit
  121. '' One of three Tristate values used to indicate
  122. '' the format of the opened file.
  123. Const TristateFalse = 0 '' Opens the file as ASCII.
  124. Const TristateTrue = - 1 '' Opens the file as Unicode.
  125. Const TristateUseDefault = - 2 '' Opens the file using the system default.
  126. Const QUOTE = """"
  127. Const ForReading = 1
  128. Const ForWriting = 2
  129. Const ForAppending = 8
  130. Dim siOp, siPath, siFile, siValue, spRootHive, spExpdIPath, sAnsw, npRet
  131. Dim opShell, opFileSys
  132. Dim aspOps, dpOps, spOp, sDebug
  133. Dim asOpTypes, sOpType, npCnt
  134. If WScript.Arguments.Named.Exists("debug") Then
  135. sDebug = "1"
  136. End If
  137. asOpTypes = ReadResource("op")
  138. Set dpOps = CreateObject("Scripting.Dictionary")
  139. For Each sOpType in asOpTypes
  140. aspOps = ReadResource(sOpType)
  141. For Each spOp in aspOps
  142. dpOps.add UCase(spOp), uCase(sOpType)
  143. Next
  144. Next
  145. _
  146. siOp = UCase(WScript.Arguments.Named("op"))
  147. If (WScript.Arguments.Count = 0) Or _
  148. isEmpty(siOp) Or _
  149. (Not dpOps.Exists(siOp)) Then
  150. WScript.Arguments.ShowUsage
  151. If sDebug then
  152. WScript.echo "Unrecognized operation: " & _
  153. QUOTE & siOp & QUOTE
  154. _
  155. For each spOp in dpOps.keys
  156. WSCript.echo spOp & chr(09) & "=>" & chr(09) & dpOps(spOp)
  157. Next
  158. End If
  159. _
  160. WScript.quit(172)
  161. End If
  162. Set opBrowser = WScript.CreateObject("Shell.Application")
  163. Set opFileSys = CreateObject("Scripting.FilesystemObject")
  164. Set opShell = WScript.CreateObject("WScript.Shell")
  165. Dim spKey
  166. Dim opArgTRestRx
  167. Set opArgTRestRx = CreateObject("VBScript.Regexp")
  168. _
  169. If 0 = strComp(dpOps(siOp),"registryop", VBTextCompare) Then
  170. _
  171. siPath = sURLDecoded(WSCript.Arguments.Named("path"))
  172. spRootHive = UCase(WScript.Arguments.Named("hive"))
  173. _
  174. With opargTRestRx
  175. .ignoreCase = True
  176. .Pattern = "\bHKLM\b|\bHKCU\b"
  177. End With
  178. If Not opargTRestRx.Test(spRootHive) Then
  179. WSCript.echo "Invalid Registry Hive for", siOp, ":", _
  180. QUOTE & spRootHive & QUOTE
  181. WSCript.quit(112)
  182. End If
  183. _
  184. If 0 = strComp(siOp,"QueryValue", VBTextCompare) Then
  185. sAnsw = opShell.RegRead(spRootHive & "\" & siPath)
  186. WScript.echo sAnsw
  187. End If
  188. If 0 = strComp(siOp,"DeleteValue", VBTextCompare) Then
  189. on error resume next
  190. opShell.RegDelete spRootHive & "\" & siPath
  191. on error goto 0
  192. End If
  193. _
  194. If 0 = strComp(siOp,"TestKey", VBTextCompare) Then
  195. on error resume next
  196. err.clear
  197. sAnsw = opShell.RegRead(spRootHive & "\" & siPath & "\")
  198. sAnsw = True
  199. If err <> 0 Then
  200. sansw = False
  201. If sDebug Then
  202. WSCript.echo err.number , err.description
  203. End If
  204. End If
  205. WSCript.echo sAnsw
  206. end If
  207. _
  208. _
  209. If 0 = strComp(siOp,"SetKey", VBTextCompare) Then
  210. If Len(siPath) <> InStrRev(siPath, "\") Then
  211. siPath = siPath & "\" 'Keys ending in "\" operate on the key itself
  212. End If
  213. opShell.RegWrite spRootHive & "\" & siPath, "", "REG_SZ"
  214. End If
  215. _
  216. If 0 = strComp(siOp,"SetValue", VBTextCompare) Then
  217. siValue = WScript.Arguments.Named("value")
  218. opShell.RegWrite spRootHive & "\" & siPath, siValue, "REG_SZ"
  219. End If
  220. _
  221. If 0 = strComp(siOp,"ClearKey", VBTextCompare) Then
  222. If Len(siPath) <> InStrRev(siPath, "\") Then
  223. siPath = siPath & "\" 'Keys ending in "\" operate on the key itself
  224. End If
  225. opShell.RegDelete spRootHive & "\" & siPath
  226. End If
  227. _
  228. End If
  229. _
  230. If 0 = strComp(dpOps(siOp),"filesystemop", VBTextCompare) Then
  231. _
  232. siPath = uCase(sURLDecoded(WSCript.Arguments.Named("path")))
  233. siFile = WScript.Arguments.Named("file")
  234. _
  235. Dim asPeNmzs, ndNrdX
  236. Dim opeNaRx, opoNtRX, stePxRs
  237. _
  238. asPeNmzs = ReadResource("special folder names")
  239. set opeNaRx = CreateObject("VBScript.Regexp")
  240. set opoNtRX = CreateObject("VBScript.Regexp")
  241. opeNaRx.pattern = " +$"
  242. opoNtRX.pattern = "FOLDER"
  243. stePxRs = "\b" & opoNtRX.pattern & "\b"
  244. For ndNrdX = 0 to uBound(asPeNmzs)
  245. asPeNmzs(ndNrdX) = opoNtRX.replace(stePxRs,opeNaRx.replace(asPeNmzs(ndNrdX), ""))
  246. Next
  247. Set opeNaRx = Nothing
  248. Set opoNtRX = Nothing
  249. _
  250. With opargTRestRx
  251. .ignoreCase = True
  252. .Pattern = "\b\w\:\\[ \w]+(\\[ \w]+)?\b" & "|" & join(asPeNmzs, "|")
  253. End With
  254. _
  255. If Not opargTRestRx.Test(siPath) Then
  256. WSCript.echo "Invalid Special Folder for", siOp, ":", _
  257. QUOTE & siPath & QUOTE
  258. WSCript.quit(112)
  259. End If
  260. _
  261. Dim spPath
  262. spPath = opShell.SpecialFolders.Item(UCase(siPath))
  263. IF "" <> spPath Then
  264. siPath = spPath
  265. End If
  266. On error resume next
  267. _
  268. If 0 = strComp(siOp, "CopyFileTo", VBTextCompare) Then
  269. opFileSys.CopyFile siFile, _
  270. opFileSys.BuildPath(siPath, opFileSys.GetFileName(siFile)), _
  271. True
  272. End If
  273. _
  274. If 0 = strComp(siOp, "MapFolder", VBTextCompare) Then
  275. Dim opFolderD, opBrowser, pnSpecFolderCont, psShortPath, sCursiPathRx
  276. If Len(siPath) <> InStrRev(siPath, "\") Then
  277. spPath = siPath
  278. Else
  279. spPath = Mid(siPath,1,-1+Len(siPath))
  280. End If
  281. spPath = replace(spPath,"\","\\", 1, 100)
  282. Set sCursiPathRx = CreateObject("VBScript.Regexp")
  283. With sCursiPathRx
  284. .ignoreCase = True
  285. .Global = True
  286. .Pattern = "^" & spPath & "$"
  287. End With
  288. _
  289. Set opFolderD = CreateObject("Scripting.Dictionary")
  290. Dim spStartupFolder, bpNFo
  291. bpNFo = False
  292. asPeNmzs = ReadResource("special folder names")
  293. set opeNaRx = CreateObject("VBScript.Regexp")
  294. opeNaRx.pattern = " +$"
  295. For ndNrdX = 0 to uBound(asPeNmzs)
  296. spStartupFolder = asPeNmzs(ndNrdX)
  297. spPath = opShell.SpecialFolders(opeNaRx.replace(spStartupFolder,""))
  298. If sCursiPathRx.Test(spPath) Then
  299. WScript.echo _
  300. spStartupFolder
  301. bpNFo = True
  302. End If
  303. Next
  304. If Not bpNFo Then
  305. For pnSpecFolderCont = &H001 To &H038 Step 1
  306. Set psShortPath = opBrowser.NameSpace(pnSpecFolderCont)
  307. If CStr(TypeName(psShortPath)) <> "Nothing" Then
  308. If "" <> psShortPath Then
  309. spPath = ParsedFullName(psShortPath )
  310. If sCursiPathRx.Test(spPath) then
  311. If cbpDebug Then
  312. WScript.echo _
  313. "&H00" &_
  314. Hex(pnSpecFolderCont) & _
  315. " " & _
  316. psShortPath & _
  317. " " & _
  318. ParsedFullName(psShortPath)
  319. Else
  320. WScript.echo _
  321. psShortPath
  322. End If
  323. End If
  324. End If
  325. End If
  326. Set psShortPath = Nothing
  327. Next
  328. End If
  329. End If
  330. _
  331. If 0 = strComp(siOp, "Delfile", VBTextCompare) Then
  332. opFileSys.DeleteFile _
  333. opFileSys.BuildPath(siPath, opFileSys.GetFileName(siFile)), _
  334. True
  335. End If
  336. End If
  337. _
  338. If 0 = strComp(dpOps(siOp),"adminop", VBTextCompare) Then
  339. _
  340. Dim opDefault : Set opDefault = CreateObject("WinNTSystemInfo")
  341. Dim spReGptDr : spReGptDr = CStr(GetResource("autologon registry path"))
  342. Dim apMagKys : apMagKys = ReadResource("autologon fields")
  343. Dim opMaKyLs : Set opMaKyLs = CreateObject("Scripting.Dictionary")
  344. Dim spDomainUser: Dim spDomainName: Dim spLocalGroup: Dim spPassword
  345. _
  346. If 0 = strComp(siOp, "AutoLogon", VBTextCompare) Then
  347. _
  348. spDomainUser = sURLDecoded(WSCript.Arguments.Named("user"))
  349. spDomainName = sURLDecoded(WSCript.Arguments.Named("domain"))
  350. spPassword = sURLDecoded(WSCript.Arguments.Named("password"))
  351. _
  352. For npCnt = 0 to UBound(apMagKys)
  353. opMaKyLs.add apMagKys(npCnt), ""
  354. '' create keys but leave them undefined
  355. Next
  356. _
  357. opMaKyLs("DefaultUserName") = spDomainUser
  358. If "" <> spDomainName Then
  359. opMaKyLs("DefaultDomainName") = spDomainName
  360. End If
  361. If "" <> spPassword Then
  362. opMaKyLs("DefaultPassword") = sURLDecoded(spPassword)
  363. End If
  364. opMaKyLs("AutoAdminLogon") = "1"
  365. opMaKyLs("ForceAutoLogon") = "1"
  366. _
  367. For Each spKey in opMaKyLs.Keys
  368. If "" <> opMaKyLs(spKey) Then
  369. opShell.RegWrite spReGptDr & "\" & spKey, opMaKyLs(spKey) ,"REG_SZ"
  370. If sDebug Then
  371. WScript.Echo spKey , "=", opShell.RegRead(spReGptDr & "\" & spKey)
  372. End If
  373. End If
  374. Next
  375. opShell.RegWrite spReGptDr & "\" & "passwordexpirywarning", 0, "REG_DWORD"
  376. If sDebug Then
  377. WScript.Echo "passwordexpirywarning=" & _
  378. opShell.RegRead(spReGptDr & "\" & "passwordexpirywarning")
  379. End If
  380. End If
  381. If 0 = strComp(siOp, "cpl", VBTextCompare) Then
  382. Dim spCplName: spCplName = WSCript.Arguments.Named("file")
  383. Dim spComment: spComment = WSCript.Arguments.Named("comment")
  384. opBrowser.MinimizeAll
  385. call opShell.PopUp(spComment, 30, spComment, 1 + 16)
  386. WSCript.Sleep 5
  387. opBrowser.ControlPanelItem(spCplName)
  388. opBrowser.UndoMinimizeALL
  389. _
  390. End If
  391. If 0 = strComp(siOp, "Clean", VBTextCompare) Then
  392. _
  393. opMaKyLs("ForceAutoLogon") = "0"
  394. opMaKyLs("AutoAdminLogon") = "0"
  395. opMaKyLs("DefaultDomainName") = opDefault.ComputerName
  396. opMaKyLs("DefaultUserName") = "ADMINISTRATOR"
  397. _
  398. For Each spKey in opMaKyLs.Keys
  399. on error resume next
  400. err.clear
  401. _
  402. If "" = opMaKyLs(spKey) Then
  403. opShell.RegWrite spReGptDr & "\" & spKey, opMaKyLs(spKey) ,"REG_SZ"
  404. opShell.RegDelete spReGptDr & "\" & spKey
  405. Else
  406. opShell.RegWrite spReGptDr & "\" & spKey, opMaKyLs(spKey) ,"REG_SZ"
  407. If sDebug Then
  408. WScript.Echo spKey , "=", opShell.RegRead(spReGptDr & "\" & spKey)
  409. End If
  410. End If
  411. _
  412. Next
  413. _
  414. End If
  415. If 0 = strComp(siOp, "add2grp", VBTextCompare) Then
  416. spDomainUser = sURLDecoded(WSCript.Arguments.Named("user"))
  417. spDomainName = sURLDecoded(WSCript.Arguments.Named("domain"))
  418. spLocalGroup = sURLDecoded(WSCript.Arguments.Named("group"))
  419. WSCript.echo spLocalGroup
  420. Call AddUser(opDefault.ComputerName, spDomainName, spLocalGroup, spDomainUser)
  421. End If
  422. Set opMaKyLs = Nothing
  423. Set opDefault = Nothing
  424. End If
  425. Set opeNaRx = Nothing
  426. Set opFolderD = Nothing
  427. Set opBrowser = Nothing
  428. Set opFileSys = Nothing
  429. Set opShell = Nothing
  430. Set dpOps = Nothing
  431. WScript.quit(0)
  432. Function ReadResource(sPresId)
  433. _
  434. On Error resume next
  435. Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
  436. Dim sPRes, asRes, uRes, tsRes: sPREs = GetResource(sPresId)
  437. _
  438. If Err.number <> 0 Then
  439. Wscript.echo err.number & " " & err.description
  440. ' The Error description are not informative when failed getresource
  441. IF Err.number = 7 Then
  442. Wscript.echo chr(9) & "Null resource: " & _
  443. sPresId
  444. End If
  445. IF Err.number = 5 Then
  446. Wscript.echo chr(9) & "Undefined resource: " & _
  447. sPresId
  448. End If
  449. Wscript.quit
  450. End If
  451. _
  452. asRes = Split(WshShell.ExpandEnvironmentStrings(sPRes), VBNEWLINE)
  453. Set ures = CreateObject("Scripting.Dictionary")
  454. For Each tsRes in asRes
  455. If 0 <> Len(tsRes) Then
  456. uRes(tsRes) = 1
  457. End If
  458. Next
  459. Dim tResource: tResource = uRes.Keys
  460. If uBound(tResource) = 0 Then
  461. ReadResource = tResource(0)
  462. Else
  463. ReadResource = tResource
  464. End If
  465. _
  466. Set WshShell = Nothing
  467. Set uRes = Nothing
  468. _
  469. End Function
  470. Function ParsedFullName (ByVal SelectedF)
  471. On Error Resume next
  472. Dim poPArentOfSelectedF, poFolderItm, lsFieldA, psSelectedFInfo, uBGotValid, psObjType
  473. If InStr(1, TypeName(SelectedF), "Folder") = 0 Then Exit Function
  474. Set poPArentOfSelectedF = SelectedF.ParentFolder
  475. lsFieldA = CStr(SelectedF.Title)
  476. Set poFolderItm = poPArentOfSelectedF.ParseName(lsFieldA) ' FolderItem in Parent Folder
  477. psSelectedFInfo=poPArentOfSelectedF.GetDetailsOf(poFolderItm, 2)
  478. If InStr(1,psSelectedFInfo,"File Folder") = 0 Then
  479. uBGotValid = False
  480. Else
  481. psObjType = CStr(TypeName(poFolderItm))
  482. If psObjType="Nothing" Then
  483. If cbpDebug = 1 Then WScript.echo "got invalid type " & psObjType
  484. uBGotValid = False
  485. ElseIf InStr(1,psObjType,"FolderItem") = 0 Then
  486. If cbpDebug = 1 Then WScript.echo "got unexpected type " & psObjType
  487. uBGotValid = False
  488. Else
  489. If cbpDebug = 1 Then WScript.echo "got " & psObjType
  490. uBGotValid = True
  491. End If
  492. End If
  493. If uBGotValid = True Then
  494. ParsedFullName = poFolderItm.Path
  495. End If
  496. End Function
  497. Public Function sURLDecoded (sTestPassInputv)
  498. _
  499. Dim oHexBackDict, sOutPut, npCnt
  500. Set oHexBackDict = CreateObject("Scripting.Dictionary")
  501. _
  502. For npCnt = 32 To 64
  503. sOutPut = "%" & Hex(npCnt)
  504. oHexBackDict.Add sOutPut, Chr(npCnt)
  505. Next
  506. _
  507. For Each sOutPut in oHexBackDict.Keys
  508. sTestPassInputv = Replace(sTestPassInputv, sOutPut, oHexBackDict(sOutPut), 1, 1000)
  509. Next
  510. _
  511. sURLDecoded = sTestPassInputv
  512. _
  513. End Function
  514. Private Sub AddUser (sLocalComputer, sDomain, sLocalGroup, sDomainUser)
  515. sDEBUG = True
  516. Dim objGroup
  517. ''on error resume next
  518. ''err.clear
  519. _
  520. set objGroup = GetObject("WinNT://" & sLocalComputer & "/" & sLocalGroup)
  521. objGroup.Add "WinNT://" & sDomain & "/" & sDomainUser
  522. _
  523. If err.number <> 0 Then
  524. If True = sDebug then
  525. WScript.Echo "Unable to add " & _
  526. sDomainUser & _
  527. " to group " & _
  528. sLocalGroup & _
  529. VBNEWLINE & _
  530. Err.number & _
  531. VBNEWLINE & _
  532. err.Description
  533. End If
  534. _
  535. Const cMode ="WQL"
  536. Const lsWMIMoniker = "winmgmts:{impersonationLevel=impersonate}"
  537. _
  538. sPGroupComponentTemplate = _
  539. "Win32_Group.Domain=\""" & _
  540. Ucase(sLocalComputer) & _
  541. "\"",Name=\"""& _
  542. sLocalGroup & _
  543. "\"""
  544. _
  545. sPWMIQueryString="SELECT * FROM Win32_GroupUser " &_
  546. "WHERE GroupComponent=""" & sPGroupComponentTemplate & """"
  547. _
  548. Set atPResWMIObjS = GetObject(lsWMIMoniker)._
  549. ExecQuery(sPWMIQueryString, _
  550. cMode)
  551. _
  552. sPPartComponentTemplate="Win32_UserAccount.Domain=\""" & _
  553. UCase(sDomain) & _
  554. "\"",Name=\""" & _
  555. UCase(sDomainUser) & _
  556. "\"""
  557. _
  558. For Each tPResWMIObjS In atPResWMIObjS
  559. Set oPPartComponentRegEx = CreateObject("VBScript.Regexp")
  560. With oPPartComponentRegEx
  561. .Global = True
  562. .IgnoreCase = True
  563. .Pattern = sPPartComponentTemplate
  564. End With
  565. _
  566. Set aDummy = oPPartComponentRegEx.Execute(tPResWMIObjS.PartComponent)
  567. _
  568. If aDummy.Count <> 0 Then
  569. If sDebug = True Then
  570. WScript.echo """" & _
  571. sPWMIQueryString & _
  572. """" & _
  573. VBNEWLINE & _
  574. tPResWMIObjS.PartComponent
  575. End If
  576. End If
  577. Next
  578. Else
  579. If True = sDebug Then
  580. Wscript.Echo "Added" , _
  581. sDomain &"\"& sDomainUser , _
  582. "to group" , _
  583. sLocalGroup
  584. End If
  585. End if
  586. End Sub
  587. ]]>
  588. </script>
  589. </job>
  590. </package>