<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>b l o g &#187; vbscript</title>
	<atom:link href="http://www.cibengineering.com/blog/tag/vbscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cibengineering.com/blog</link>
	<description>Remote access engineering, citrix and terminal services</description>
	<lastBuildDate>Sun, 15 Aug 2010 01:32:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ica ping wmi vbscript alternative</title>
		<link>http://www.cibengineering.com/blog/ica-ping-wmi-vbscript-alternative/</link>
		<comments>http://www.cibengineering.com/blog/ica-ping-wmi-vbscript-alternative/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:06:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[XenApp]]></category>
		<category><![CDATA[ica ping]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.cibengineering.com/blog/?p=278</guid>
		<description><![CDATA[Here is a great way to use the wmi root\cimv2 repository, attach to Win32_PerfFormattedData_CitrixICA_ICASession and pull in some additional metrics in an effort to build from ica ping. 
On Error Resume Next

Const wbemFlagReturnImmediately = &#38;h10
Const wbemFlagForwardOnly = &#38;h20

arrComputers = Array("host")
For Each strComputer In arrComputers
   WScript.Echo
   WScript.Echo "=========================================="
   WScript.Echo "Computer: [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Consolas;">Here is a great way to use the wmi root\cimv2 repository, attach to Win32_PerfFormattedData_CitrixICA_ICASession and pull in some additional metrics in an effort to build from ica ping. <span id="more-278"></span></span></p>
<pre class="vb">On Error Resume Next

Const wbemFlagReturnImmediately = &amp;h10
Const wbemFlagForwardOnly = &amp;h20

arrComputers = Array("host")
For Each strComputer In arrComputers
   WScript.Echo
   WScript.Echo "=========================================="
   WScript.Echo "Computer: " &amp; strComputer
   WScript.Echo "=========================================="

   Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\CIMV2")
   Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PerfFormattedData_CitrixICA_ICASession", "WQL", _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)

   For Each objItem In colItems
      WScript.Echo "Caption: " &amp; objItem.Caption
      WScript.Echo "Description: " &amp; objItem.Description
      WScript.Echo "Frequency_Object: " &amp; objItem.Frequency_Object
      WScript.Echo "Frequency_PerfTime: " &amp; objItem.Frequency_PerfTime
      WScript.Echo "Frequency_Sys100NS: " &amp; objItem.Frequency_Sys100NS
      WScript.Echo "InputAudioBandwidth: " &amp; objItem.InputAudioBandwidth
      WScript.Echo "InputClipboardBandwidt: " &amp; objItem.InputClipboardBandwidt
      WScript.Echo "InputCOM1Bandwidth: " &amp; objItem.InputCOM1Bandwidth
      WScript.Echo "InputCOM2Bandwidth: " &amp; objItem.InputCOM2Bandwidth
      WScript.Echo "InputCOMBandwidth: " &amp; objItem.InputCOMBandwidth
      WScript.Echo "InputControlChannelBandwidth: " &amp; objItem.InputControlChannelBandwidth
      WScript.Echo "InputDriveBandwidth: " &amp; objItem.InputDriveBandwidth
      WScript.Echo "InputFontDataBandwidth: " &amp; objItem.InputFontDataBandwidth
      WScript.Echo "InputLicensingBandwidth: " &amp; objItem.InputLicensingBandwidth
      WScript.Echo "InputLPT1Bandwidth: " &amp; objItem.InputLPT1Bandwidth
      WScript.Echo "InputLPT2Bandwidth: " &amp; objItem.InputLPT2Bandwidth
      WScript.Echo "InputManagementBandwidth: " &amp; objItem.InputManagementBandwidth
      WScript.Echo "InputPNBandwidth: " &amp; objItem.InputPNBandwidth
      WScript.Echo "InputPrinterBandwidth: " &amp; objItem.InputPrinterBandwidth
      WScript.Echo "InputSeamlessBandwidth: " &amp; objItem.InputSeamlessBandwidth
      WScript.Echo "InputSessionBandwidth: " &amp; objItem.InputSessionBandwidth
      WScript.Echo "InputSessionCompression: " &amp; objItem.InputSessionCompression
      WScript.Echo "InputSessionLineSpeed: " &amp; objItem.InputSessionLineSpeed
      WScript.Echo "InputSpeedScreenDataChannelBandwidth: " &amp; objItem.InputSpeedScreenDataChannelBandwidth
      WScript.Echo "InputTextEchoBandwidth: " &amp; objItem.InputTextEchoBandwidth
      WScript.Echo "InputThinWireBandwidth: " &amp; objItem.InputThinWireBandwidth
      WScript.Echo "InputVideoFrameBandwidth: " &amp; objItem.InputVideoFrameBandwidth
      WScript.Echo "LatencyLastRecorded: " &amp; objItem.LatencyLastRecorded
      WScript.Echo "LatencySessionAverage: " &amp; objItem.LatencySessionAverage
      WScript.Echo "LatencySessionDeviation: " &amp; objItem.LatencySessionDeviation
      WScript.Echo "Name: " &amp; objItem.Name
      WScript.Echo "OutputAudioBandwidth: " &amp; objItem.OutputAudioBandwidth
      WScript.Echo "OutputClipboardBandwidth: " &amp; objItem.OutputClipboardBandwidth
      WScript.Echo "OutputCOM1Bandwidth: " &amp; objItem.OutputCOM1Bandwidth
      WScript.Echo "OutputCOM2Bandwidth: " &amp; objItem.OutputCOM2Bandwidth
      WScript.Echo "OutputCOMBandwidth: " &amp; objItem.OutputCOMBandwidth
      WScript.Echo "OutputControlChannelBandwidth: " &amp; objItem.OutputControlChannelBandwidth
      WScript.Echo "OutputDriveBandwidth: " &amp; objItem.OutputDriveBandwidth
      WScript.Echo "OutputFontDataBandwidth: " &amp; objItem.OutputFontDataBandwidth
      WScript.Echo "OutputLicensingBandwidth: " &amp; objItem.OutputLicensingBandwidth
      WScript.Echo "OutputLPT1Bandwidth: " &amp; objItem.OutputLPT1Bandwidth
      WScript.Echo "OutputLPT2Bandwidth: " &amp; objItem.OutputLPT2Bandwidth
      WScript.Echo "OutputManagementBandwidth: " &amp; objItem.OutputManagementBandwidth
      WScript.Echo "OutputPNBandwidth: " &amp; objItem.OutputPNBandwidth
      WScript.Echo "OutputPrinterBandwidth: " &amp; objItem.OutputPrinterBandwidth
      WScript.Echo "OutputSeamlessBandwidth: " &amp; objItem.OutputSeamlessBandwidth
      WScript.Echo "OutputSessionBandwidth: " &amp; objItem.OutputSessionBandwidth
      WScript.Echo "OutputSessionCompression: " &amp; objItem.OutputSessionCompression
      WScript.Echo "OutputSessionLineSpeed: " &amp; objItem.OutputSessionLineSpeed
      WScript.Echo "OutputSpeedScreenDataChannelBandwidth: " &amp; objItem.OutputSpeedScreenDataChannelBandwidth
      WScript.Echo "OutputTextEchoBandwidth: " &amp; objItem.OutputTextEchoBandwidth
      WScript.Echo "OutputThinWireBandwidth: " &amp; objItem.OutputThinWireBandwidth
      WScript.Echo "OutputVideoFrameBandwidth: " &amp; objItem.OutputVideoFrameBandwidth
      WScript.Echo "Timestamp_Object: " &amp; objItem.Timestamp_Object
      WScript.Echo "Timestamp_PerfTime: " &amp; objItem.Timestamp_PerfTime
      WScript.Echo "Timestamp_Sys100NS: " &amp; objItem.Timestamp_Sys100NS
      WScript.Echo
   Next
Next</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cibengineering.com/blog/ica-ping-wmi-vbscript-alternative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>check host if laptop</title>
		<link>http://www.cibengineering.com/blog/vbscript-check_for_laptop/</link>
		<comments>http://www.cibengineering.com/blog/vbscript-check_for_laptop/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 18:33:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Workstation]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.cibengineering.com/blog/?p=94</guid>
		<description><![CDATA[Scenario:
We have a script which needs to be deployed to hosts across the domain footprint which needs to install a small application upon meeting certain criteria.  This seems to be a relatively easy task and can be easily accomplished in several ways. (example) One would be inclined to write a vbscript, use wmi, and enumerate [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Scenario:</span></strong></p>
<p>We have a script which needs to be deployed to hosts across the domain footprint which needs to install a small application upon meeting certain criteria.  This seems to be a relatively easy task and can be easily accomplished in several ways. (example) One would be inclined to write a vbscript, use wmi, and enumerate some type of computer/vendor/model attribute prior to the install. To perhaps save some time, here is what we did and below is the criteria we used to make the decision through automation.<span id="more-94"></span></p>
<p><strong><span style="text-decoration: underline;">Criteria:</span></strong></p>
<ol>
<li>The remote host must be online at the time the script is run.</li>
<li>To return the neccessary value (laptop found) the host must be online and have some type of battery as a power source.  In this scenario, we are going to rely on win32_battery to provide us with the necessary results.</li>
<li>Upon detection, install symantec scrip to allow users to update their definitions.</li>
<li>Here is the functon we used to determine whether or not the remote host is a laptop w/ a battery.</li>
</ol>
<pre class="vb">Function IsLaptop( myComputer )
    On Error Resume Next
    Set objWMIService = GetObject( "winmgmts://" &amp; myComputer &amp; "/root/cimv2" )
    Set colItems = objWMIService.ExecQuery( "Select * from Win32_Battery", , 48 )
    IsLaptop = False
    For Each objItem in colItems
        IsLaptop = True
    Next
    If Err Then Err.Clear
    On Error Goto 0
End Function</pre>
<p><span style="text-decoration: underline;">Accessing the above Function:</span></p>
<p>Here is one way you can call upon the code(function) and return the results for later use.</p>
<pre class="vb">If IsLaptop( "." ) Then
    WScript.Echo "Laptop"
Else
    WScript.Echo "Desktop or server"
End If</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cibengineering.com/blog/vbscript-check_for_laptop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
