On 3/28/2013 10:57 PM, Alan Robertson wrote:
> On 03/28/2013 08:06 PM, Dave Quigley wrote:
>> On 3/28/2013 6:55 PM, Alan Robertson wrote:
>> A minor correction. C# is a compiled language. Its more like Java than
>> any of those other languages. In more recent versions of windows they
>> allow you to use it where sysadmins would have traditionally used
>> VBScript. Depending on how far back you want to support in windows
>> you're not guaranteed to have a .net framework deployed to the host.
>> You can always send a .net redistributable with the nano-probe install
>> but unless you're looking at 2k3 server sp2 and higher I believe it is
>> you can't be guaranteed that .NET is installed by default.
>
> That's a good correction.  I had the impression that it was interpreted,
> but if I were the Windows expert, I'd have written some of it by now ;-).
>
> What would you suggest?
>
>


I still like the idea of using C# personally but that's because i'm not 
a big python fan. One of the benefits of C# is that there should be 
Framework classes already in place to make use of the Windows Management 
Instrumentation(WMI) 
APIs(http://msdn.microsoft.com/en-us/library/bb404655.aspx).

I thought I remember someone saying that microsoft wanted to replace 
VBScript with C# as an admin scripting language but I'd can't seem to 
find out if that went anywhere. You could probably try to see if there 
are python bindings to the WMI dlls which would allow you to use python 
instead if you wanted too. The link is from 2003 but if the examples are 
VB.net then it should be the same classes for C# as well.


Here are some additional examples of using C# for WMI calls 
(http://www.c-sharpcorner.com/uploadfile/puranindia/windows-management-instrumentation-in-C-Sharp/).

_______________________________________________
Assimilation mailing list - Discovery-Driven Monitoring
[email protected]
http://lists.community.tummy.com/cgi-bin/mailman/listinfo/assimilation
http://assimmon.org/

Reply via email to