Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for adsitest.hta

(view source code of adsitest.hta as plain text)

  1. <HTML>
  2. <HEAD>
  3. <TITLE>ADSI Test Tool</TITLE>
  4. <HTA:APPLICATION 
  5. 	ID="ADSITest"
  6. 	VERSION="0.20 Beta"
  7. 	APPLICATIONNAME="ADSI Test Tool"
  8. 	SYSMENU="yes"
  9. 	MAXIMIZEBUTTON="yes"
  10. 	MINIMIZEBUTTON="yes"
  11. 	BORDER="thin"
  12. 	INNERBORDER="no"
  13. 	SCROLL="auto"
  14. 	SINGLEINSTANCE="yes"
  15. 	WINDOWSTATE="maximize"
  16. >
  17. </HEAD>
  18.  
  19. <SCRIPT LANGUAGE="VBScript">
  1.  
  2. Option Explicit
  3.  
  4. Dim numVerMsgSize, strAppName, strAppVer, strFileNames
  5.  
  6. strAppName   = ADSITest.ApplicationName
  7. strAppVer    = ADSITest.Version
  8. strFileNames = LCase( ADSITest.ID )
  9.  
  10.  
  11. Sub CheckUpdate( )
  12. 	Dim lenLatestVer, strCurrentVer, strLatestVer
  13.  
  14. 	' Change cursor to hourglass while checking for update
  15. 	Document.Body.Style.Cursor = "wait"
  16.  
  17. 	strLatestVer  = TextFromHTML( "http://www.robvanderwoude.com/updates/" & strFileNames & ".txt" )
  18. 	lenLatestVer  = Len( strLatestVer )
  19. 	If lenLatestVer = 4 Then
  20. 		strCurrentVer = Split( strAppVer )(0)
  21. 		If strLatestVer < strCurrentVer Then
  22. 			Update.InnerHTML = "<P>You are using an invalid version (" & strCurrentVer _
  23. 			                 & ") of the " & strAppName _
  24. 			                 & ".<BR>The latest valid version is "    _
  25. 			                 & strLatestVer & " and it is available " _
  26. 			                 & "<A HREF=""http://www.robvanderwoude.com/" _
  27. 			                 & strFileNames & ".html"">" _
  28. 			                 & "<FONT COLOR=""Red"">here</FONT></A>.</P>"
  29. 			numVerMsgSize    = 85
  30. 		End If
  31. 		If strLatestVer > strCurrentVer Then
  32. 			Update.InnerHTML = "<P>You are using version " & strCurrentVer _
  33. 			                 & " of the " & strAppName _
  34. 			                 & ".<BR>An update to version " _
  35. 			                 & strLatestVer & " is available " _
  36. 			                 & "<A HREF=""http://www.robvanderwoude.com/" _
  37. 			                 & strFileNames & ".html"">" _
  38. 			                 & "<FONT COLOR=""Red"">here</FONT></A>.</P>"
  39. 			numVerMsgSize    = 85
  40. 		End If
  41. 	End If
  42.  
  43. 	' Change cursor back to default
  44. 	Document.Body.Style.Cursor = "default"
  45. End Sub
  46.  
  47.  
  48. Sub ClearQuery( )
  49. 	TestQueryInput.Value = ""
  50. End Sub
  51.  
  52.  
  53. Sub ClearResults( )
  54. 	QueryResultObject.Value           = ""
  55. 	QueryResultObjectMembers.Value    = ""
  56. 	QueryResultObjectProperties.Value = ""
  57. End Sub
  58.  
  59.  
  60. Sub GetComputerDomain( )
  61. 	Dim colItems, objItem, objSysInfo, objWMISvc
  62.  
  63. 	Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" )
  64.  
  65. 	Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem", , 48 )
  66.  
  67. 	For Each objItem in colItems
  68. 		If objItem.PartOfDomain Then
  69. 			' Use the Computer Domain for domain members . . .
  70. 			TestQueryInput.Value = "WinNT://" & objItem.Domain
  71. 		Else
  72. 			' . . . or the User Domain for non-domain members
  73. 			Set objSysInfo = CreateObject( "WinNTSystemInfo" )
  74. 			TestQueryInput.Value = "WinNT://" & objSysInfo.DomainName
  75. 			Set objSysInfo = Nothing
  76. 		End If
  77. 	Next
  78.  
  79. 	Set objWMISvc = Nothing
  80. End Sub
  81.  
  82.  
  83. Function GetMembers( strADSIObject )
  84. 	Dim objADSIItem, objADSIObject, strName, strTxt
  85.  
  86. 	On Error Resume Next
  87.  
  88. 	Set objADSIObject = GetObject( strADSIObject )
  89.  
  90. 	For Each objADSIItem in objADSIObject
  91. 		strName = objADSIItem.Name
  92. 		If Len( strName ) > 28 Then
  93. 			strName = Left( strName, 25 ) & "..."
  94. 		End If
  95. 		strTxt = strTxt & LeftPad( strName, 30, " " )
  96. 		Select Case objADSIItem.Class
  97. 			Case "Computer"
  98. 				strTxt = strTxt _
  99. 				       & LeftPad( objADSIItem.Class, 13, " " )
  100. 				strTxt = strTxt _
  101. 				       & "(" & objADSIItem.OperatingSystem & " " _
  102. 				       & objADSIItem.OperatingSystemVersion & ")"
  103. 			Case "Service"
  104. 				strTxt = strTxt _
  105. 				       & LeftPad( objADSIItem.Class, 13, " " ) _
  106. 				       & "(" & objADSIItem.Path & ")"
  107. 			Case "User"
  108. 				strTxt = strTxt _
  109. 				       & LeftPad( objADSIItem.Class, 13, " " ) _
  110. 				       & "(" & objADSIItem.Description & ")"
  111. 			Case Else
  112. 				strTxt = strTxt _
  113. 				       & objADSIItem.Class
  114. 		End Select
  115. 		strTxt = strTxt & vbCrLf
  116. 	Next
  117.  
  118. 	On Error Goto 0
  119.  
  120. 	GetMembers = strTxt
  121. End Function
  122.  
  123.  
  124. Function GetProperties( strADSIObject )
  125. 	'Example 15-8: Script to Walk Through the Property Cache for an Object and Display All Values 
  126.  
  127. 	'**********************************************************************
  128. 	'Force error checking within the code using the Err.Number property
  129. 	'method in approaches 2 and 3
  130. 	'**********************************************************************
  131.  
  132. 	On Error Resume Next
  133.  
  134. 	'**********************************************************************
  135. 	'Declare the constants and variables
  136. 	'**********************************************************************
  137.  
  138. 	Const ADSTYPE_INVALID                =  0
  139. 	Const ADSTYPE_DN_STRING              =  1
  140. 	Const ADSTYPE_CASE_EXACT_STRING      =  2
  141. 	Const ADSTYPE_CASE_IGNORE_STRING     =  3
  142. 	Const ADSTYPE_PRINTABLE_STRING       =  4
  143. 	Const ADSTYPE_NUMERIC_STRING         =  5
  144. 	Const ADSTYPE_BOOLEAN                =  6
  145. 	Const ADSTYPE_INTEGER                =  7
  146. 	Const ADSTYPE_OCTET_STRING           =  8
  147. 	Const ADSTYPE_UTC_TIME               =  9
  148. 	Const ADSTYPE_LARGE_INTEGER          = 10
  149. 	Const ADSTYPE_PROV_SPECIFIC          = 11
  150. 	Const ADSTYPE_OBJECT_CLASS           = 12
  151. 	Const ADSTYPE_CASEIGNORE_LIST        = 13
  152. 	Const ADSTYPE_OCTET_LIST             = 14
  153. 	Const ADSTYPE_PATH                   = 15
  154. 	Const ADSTYPE_POSTALADDRESS          = 16
  155. 	Const ADSTYPE_TIMESTAMP              = 17
  156. 	Const ADSTYPE_BACKLINK               = 18
  157. 	Const ADSTYPE_TYPEDNAME              = 19
  158. 	Const ADSTYPE_HOLD                   = 20
  159. 	Const ADSTYPE_NETADDRESS             = 21
  160. 	Const ADSTYPE_REPLICAPOINTER         = 22
  161. 	Const ADSTYPE_FAXNUMBER              = 23
  162. 	Const ADSTYPE_EMAIL                  = 24
  163. 	Const ADSTYPE_NT_SECURITY_DESCRIPTOR = 25
  164. 	Const ADSTYPE_UNKNOWN                = 26
  165.  
  166. 	Const ADS_PROPERTY_CLEAR  = 1
  167. 	Const ADS_PROPERTY_UPDATE = 2
  168. 	Const ADS_PROPERTY_APPEND = 3
  169. 	Const ADS_PROPERTY_DELETE = 4
  170.  
  171. 	Dim adsPropValue  'An individual property value within a loop
  172. 	Dim adsPropEntry  'An ADSI PropertyEntry object
  173. 	Dim adsObject     'The object whose property list we wish to investigate
  174. 	Dim txtStr        'A text string used to display results in one go
  175. 	Dim intPropCount  'The number of properties in 
  176. 	Dim intIndex      'The index used while looping through the property list
  177. 	Dim intCount      'Used to display property values in a numbered sequence
  178.  
  179.  
  180. 	Set adsObject = GetObject( strADSIObject )
  181. 	If Err Then
  182. 		GetProperties = "Error "  &  Err.Number  & vbCrLf _
  183. 		              & Err.Description & vbCrLf & vbCrLf
  184. 		On Error Goto 0
  185. 		Err.Clear
  186. 		Exit Function
  187. 	End If
  188. 	adsObject.GetInfo
  189.  
  190. 	'**********************************************************************
  191. 	'Write out the current property cache total to the string that is 
  192. 	'storing output
  193. 	'**********************************************************************
  194.  
  195. 	intPropCount = adsObject.PropertyCount
  196. 	txtStr       = "There are " & intPropCount & " values in the property cache." & vbCrLf
  197.  
  198. 	'**********************************************************************
  199. 	'The extra vbTabs used in the first loop are to space the results so 
  200. 	'that they are nicely formatted with the list of values in the second loop
  201. 	'**********************************************************************
  202.  
  203. 	For intIndex = 0 To ( intPropCount - 1 )
  204. 		Set adsPropEntry = adsObject.Item(intIndex)
  205. 		txtStr = txtStr & adsPropEntry.Name & vbCrLf
  206.  
  207. 		If (adsPropEntry.ADsType = ADSTYPE_INVALID) Then
  208. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "INVALID" & vbCrLf
  209. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_DN_STRING) Then
  210. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "DN_STRING" & vbCrLf
  211. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_CASE_EXACT_STRING) Then
  212. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "CASE_EXACT_STRING" & vbCrLf
  213. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_CASE_IGNORE_STRING) Then
  214. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "CASE_IGNORE_STRING" & vbCrLf
  215. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_PRINTABLE_STRING) Then
  216. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "PRINTABLE_STRING" & vbCrLf
  217. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_NUMERIC_STRING) Then
  218. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "NUMERIC_STRING" & vbCrLf
  219. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_BOOLEAN) Then
  220. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "BOOLEAN" & vbCrLf
  221. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_INTEGER) Then
  222. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "INTEGER" & vbCrLf
  223. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_OCTET_STRING) Then
  224. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "OCTET_STRING" & vbCrLf
  225. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_UTC_TIME) Then
  226. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "UTC_TIME" & vbCrLf
  227. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_LARGE_INTEGER) Then
  228. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "LARGE_INTEGER" & vbCrLf
  229. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_PROV_SPECIFIC) Then
  230. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "PROV_SPECIFIC" & vbCrLf
  231. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_OBJECT_CLASS) Then
  232. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "OBJECT_CLASS" & vbCrLf
  233. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_CASEIGNORE_LIST) Then
  234. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "CASEIGNORE_LIST" & vbCrLf
  235. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_OCTET_LIST) Then
  236. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "OCTET_LIST" & vbCrLf
  237. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_PATH) Then
  238. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "PATH" & vbCrLf
  239. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_POSTALADDRESS) Then
  240. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "POSTALADDRESS" & vbCrLf
  241. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_TIMESTAMP) Then
  242. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "TIMESTAMP" & vbCrLf
  243. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_BACKLINK) Then
  244. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "BACKLINK" & vbCrLf
  245. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_TYPEDNAME) Then
  246. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "TYPEDNAME" & vbCrLf
  247. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_HOLD) Then
  248. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "HOLD" & vbCrLf
  249. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_NETADDRESS) Then
  250. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "NETADDRESS" & vbCrLf
  251. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_REPLICAPOINTER) Then
  252. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "REPLICAPOINTER" & vbCrLf
  253. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_FAXNUMBER) Then
  254. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "FAXNUMBER" & vbCrLf
  255. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_EMAIL) Then
  256. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "EMAIL" & vbCrLf
  257. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_NT_SECURITY_DESCRIPTOR) Then
  258. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "NT_SECURITY_DESCRIPTOR" & vbCrLf
  259. 		ElseIf (adsPropEntry.ADsType = ADSTYPE_UNKNOWN) Then
  260. 			txtStr = txtStr & vbTab & "Type:" & vbTab & vbTab & "UNKNOWN" & vbCrLf
  261. 		End If
  262.  
  263. 		'**********************************************************************
  264. 		'Go through each property value in the property entry and use the AdsType
  265. 		'to print out the appropriate value, prefixed by a count (intCount), i.e.:
  266. 		'
  267. 		'  Value #1: Keith Cooper
  268. 		'  Value #2: Vicky Launders
  269. 		'  Value #3: Alistair Lowe-Norris
  270. 		'**********************************************************************
  271.  
  272. 		intCount = 1
  273.  
  274. 		For Each adsPropValue In adsPropEntry.Values  
  275. 			If (adsPropValue.ADsType = ADSTYPE_DN_STRING) Then
  276. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  277. 				       & vbTab & adsPropValue.DNString & vbCrLf
  278. 			ElseIf (adsPropValue.ADsType = ADSTYPE_CASE_EXACT_STRING) Then
  279. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  280. 				       & vbTab & adsPropValue.CaseExactString & vbCrLf
  281. 			ElseIf (adsPropValue.ADsType = ADSTYPE_CASE_IGNORE_STRING) Then
  282. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  283. 				       & vbTab & adsPropValue.CaseIgnoreString & vbCrLf
  284. 			ElseIf (adsPropValue.ADsType = ADSTYPE_PRINTABLE_STRING) Then
  285. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  286. 				       & vbTab & adsPropValue.PrintableString & vbCrLf
  287. 			ElseIf (adsPropValue.ADsType = ADSTYPE_NUMERIC_STRING) Then
  288. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  289. 				       & vbTab & adsPropValue.NumericString & vbCrLf
  290. 			ElseIf (adsPropValue.ADsType = ADSTYPE_BOOLEAN) Then
  291. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  292. 				       & vbTab & CStr( adsPropValue.Boolean ) & vbCrLf
  293. 			ElseIf (adsPropValue.ADsType = ADSTYPE_INTEGER) Then
  294. 				txtStr = txtStr & vbTab & "Value #" & intCount & ":" _
  295. 				       & vbTab & adsPropValue.Integer & vbCrLf
  296.  
  297. 			End If
  298.  
  299. 			intCount = intCount + 1
  300.  
  301. 		Next
  302. 	Next
  303.  
  304. 	On Error Goto 0
  305.  
  306. 	GetProperties = txtStr & vbCrLf
  307. End Function
  308.  
  309.  
  310. Function LeftPad( strText, intLen, chrPad )
  311. 	'LeftPad( "1234", 7, "x" ) = "1234xxx"
  312. 	'LeftPad( "1234", 3, "x" ) = "123"
  313. 	LeftPad = Left( strText & String( intLen, chrPad ), intLen )
  314. End Function
  315.  
  316.  
  317. Sub TestQuery( )
  318. 	' Most of this subroutine is based on a script by Don Jones
  319.  
  320. 	Dim objObject
  321.  
  322. 	If TestQueryInput.Value = "" Then
  323. 		Exit Sub
  324. 	End If
  325.  
  326. 	On Error Resume Next
  327.  
  328. 	QueryResultObject.Value = QueryResultObject.Value _
  329. 	                        & "Query:" & vbCrLf _
  330. 	                        & "  " & TestQueryInput.Value & vbCrLf & vbCrLf _
  331.  
  332. 	Set objObject = GetObject( TestQueryInput.Value )
  333. 	If Err Then
  334. 		QueryResultObject.Value = QueryResultObject.Value _
  335. 		                        & Err.Number & " " & Err.Description & vbCrLf _
  336. 		                        & "An error occurred - couldn't connect using " _
  337. 		                        & "the provider specified, or object doesn't exist" & vbCrLf & vbCrLf
  338. 		Select Case Err.Number
  339. 			Case -2147027843
  340. 				QueryResultObject.Value = QueryResultObject.Value & vbCrLf _
  341. 				                        & "Couldn't connect to server." & vbCrLf & vbCrLf
  342. 			Case -2147467259
  343. 				QueryResultObject.Value = QueryResultObject.Value & vbCrLf _
  344. 				                        & "Unknown provider." & vbCrLf & vbCrLf
  345. 			Case -2147022676, -2147023520
  346. 				QueryResultObject.Value = QueryResultObject.Value & vbCrLf _
  347. 				                        & "Server says object doesn't exist." & vbCrLf & vbCrLf
  348. 			Case -2147463168
  349. 				QueryResultObject.Value = QueryResultObject.Value & vbCrLf _
  350. 				                        & "Illegal query - did you use backslahes by mistake?" & vbCrLf & vbCrLf
  351. 		End Select
  352. 		Err.Clear
  353. 		On Error Goto 0
  354. 		Exit Sub
  355. 	End If
  356.  
  357. 	QueryResultObject.Value = QueryResultObject.Value _
  358. 	                        & "Object returned:" & vbCrLf
  359.  
  360. 	If Not IsObject( objObject )  Then
  361. 		QueryResultObject.Value = QueryResultObject.Value _
  362. 		                        & "No object was returned" & vbCrLf
  363. 	Else
  364. 		QueryResultObject.Value = QueryResultObject.Value _
  365. 	 	                        & "  Name  : " & objObject.Name & vbCrLf
  366. 		If Err Then
  367. 			QueryResultObject.Value = QueryResultObject.Value _
  368. 			                        & "  does not have a Name property" & vbCrLf
  369. 			Err.Clear
  370. 		End If
  371.  
  372. 		QueryResultObject.Value = QueryResultObject.Value _
  373. 		                        & "  Class : " & objObject.Class & vbCrLf & vbCrLf
  374. 		If Err <> 0 Then
  375. 			QueryResultObject.Value = QueryResultObject.Value _
  376. 			                        & "  does not have a Class property" & vbCrLf & vbCrLf
  377. 			Err.Clear
  378. 		End If
  379. 	End If
  380.  
  381. 	On Error Goto 0
  382.  
  383. 	QueryResultObjectMembers.Value    = GetMembers( TestQueryInput.Value )
  384. 	QueryResultObjectProperties.Value = GetProperties( TestQueryInput.Value )
  385. End Sub
  386.  
  387.  
  388. Function TextFromHTML( URL )
  389. 	' Basic routine borrowed from http://dev.remotenetworktechnology.com/wsh/rubegoldberg.htm
  390. 	' Improved wait-until-ready routine for HTAs by McKirahan on
  391. 	' http://support.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.scripting.scriptlets&tid=be461ec2-b444-440c-8155-ad0e8e839ca6&lang=en&cr=US&sloc=en-us&p=1
  392.  
  393. 	Dim objIE
  394.  
  395. 	TextFromHTML = ""
  396.  
  397. 	On Error Resume Next
  398.  
  399. 	Set objIE = CreateObject( "InternetExplorer.Application" )
  400.  
  401.  	objIE.Navigate URL
  402.  
  403. 	While objIE.Busy
  404. 	Wend
  405.  
  406. 	TextFromHTML = objIE.Document.Body.InnerText
  407.  
  408. 	objIE.Quit
  409. 	On Error Goto 0
  410. End Function
  411.  
  412.  
  413. Sub Window_Onload()
  414. 	AppName.InnerHTML    = strAppName
  415. 	AppVersion.InnerHTML = strAppVer
  416. 	GetComputerDomain( )
  417. 	CheckUpdate( )
  418. 	TestQueryButton.Focus( )
  419. End Sub
  1. </SCRIPT>
  2.  
  3. <BODY STYLE="font:12 pt arial; color:white; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#004000', EndColorStr='#007F00')">
  4.  
  5. <DIV ALIGN="Center">
  6.  
  7. <SPAN ID="Update">&nbsp;</SPAN>
  8.  
  9. <TABLE BORDER="0" CELLSPACING="4">
  10. <TR>
  11.     <TD COLSPAN="3" ALIGN="left">ADSI Query:</TD>
  12. </TR>
  13. <TR>
  14.     <TD COLSPAN="3"><INPUT TYPE="text" NAME="TestQueryInput" SIZE="120"></TD>
  15. </TR>
  16. <TR>
  17.     <TD ALIGN="left"><INPUT TYPE="button" ID="TestQueryButton" CLASS="button" VALUE="Test Query" NAME="TestQueryButton"  OnClick="TestQuery"></TD>
  18.     <TD ALIGN="center"><INPUT TYPE="button" ID="ClearQueryButton" CLASS="button" VALUE="Clear Query" NAME="ClearQueryButton"  OnClick="ClearQuery"></TD>
  19.     <TD ALIGN="right"><INPUT TYPE="button" ID="ClearResultsButton" CLASS="button" VALUE="Clear Results" NAME="ClearResultsButton"  OnClick="ClearResults"></TD>
  20. </TR>
  21. <TR><TD COLSPAN="3">&nbsp;</TD></TR>
  22. <TR>
  23.     <TD COLSPAN="3" ALIGN="left">Resulting Object:</TD>
  24. </TR>
  25. <TR>
  26.     <TD COLSPAN="3"><TEXTAREA NAME="QueryResultObject" ROWS="6" COLS="90"></TEXTAREA></TD>
  27. </TR>
  28. <TR><TD COLSPAN="3">&nbsp;</TD></TR>
  29. <TR>
  30.     <TD COLSPAN="3" ALIGN="left">Resulting Object's Properties:</TD>
  31. </TR>
  32. <TR>
  33.     <TD COLSPAN="3"><TEXTAREA NAME="QueryResultObjectProperties" ROWS="8" COLS="90"></TEXTAREA></TD>
  34. </TR>
  35. <TR><TD COLSPAN="3">&nbsp;</TD></TR>
  36. <TR>
  37.     <TD COLSPAN="3" ALIGN="left">Resulting Object's Members:</TD>
  38. </TR>
  39. <TR>
  40.     <TD COLSPAN="3"><TEXTAREA NAME="QueryResultObjectMembers" ROWS="8" COLS="90"></TEXTAREA></TD>
  41. </TR>
  42. </TABLE>
  43.  
  44. <P ALIGN="center"><SPAN ID="AppName">Application Name</SPAN>,&nbsp; Version <SPAN ID="AppVersion">0.00</SPAN><BR>
  45. <FONT SIZE="-1">HTA "wrapper" for several ADSI sample scripts from the book<BR>
  46. <a id="lnx1" name="evtst|a|0321501713" href="http://www.amazon.com/exec/obidos/redirect?link_code=as3&amp;path=ASIN/0321501713&amp;tag=robvanderwoudess&amp;camp=211189&amp;creative=373489">VBScript, WMI, and ADSI Unleashed: Using VBScript, WMI, and ADSI to Automate Windows Administration</a><img src="http://www.assoc-amazon.com/e/ir?t=robvanderwoudess&amp;l=as2&amp;o=1&amp;a=0321501713" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1">
  47. by Don Jones.<BR>
  48. HTA wrapper &copy; 2007, Rob van der Woude.<BR>
  49. <A HREF="http://www.robvanderwoude.com/" TARGET="_blank"><FONT COLOR="Red">http://www.robvanderwoude.com</FONT></A></FONT></P>
  50.  
  51. </DIV>
  52.  
  53. </BODY>
  54. </HTML>

page last modified: 2024-02-26; loaded in 0.0323 seconds