Sunday, October 4, 2009

Windows Management Instrumentation Win32 Classes Methods and Properties

I was looking for a quick reference for Windows Management Instrumentation, but I can't find a good one. Instead, I found a script that lists all the Win32 Classes of WMI. There are other classes aside from Win32, but that's the only one I needed.

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers but WMI also supplies management data to other parts of the operating system and products, for example System Center Operations Manager, formerly Microsoft Operations Manager (MOM), or Windows Remote Management (WinRM). For more details click here.

I am developing a library that will handle License and Registration for a program and I needed to get serial numbers of the devices such as the BIOS, CPU, and the mobo. There is already a .NET class for this floating around the Internet, but I am designing a counterpart for none-.NET applications. However I was wondering what classes does a device belongs to, and what exactly are their names. So I ran the script that I found and it generated this listing, click here. I hope this will be of use to anyone looking for the same thing.

Friday, September 11, 2009

And They Thought You're Browsing A Porn Site!

I am a regular torrent guy. Err, make that "addicted to torrent". I thirst for 'what's new' on the Internet, but haven't you noticed a certain web-based game being advertised almost everywhere? This ad is showing a woman's 'boob' and most often coupled with another image of a very beautiful lady with a very sexy cleavage that sticks on your browser even when you scroll.

It's quite annoying each time I browse sites with these kind of ads and disturbing when I'm at my office. What would anyone think if they saw me browsing decent sites with those ads? And it's the first thing that is noticable!

You could always disable the displaying of images by unchecking the 'Show Picture' option under the Media Node in the Advance Tab of the Internet Option, or unchecking the Load Pictures Automatically option in the Content Tab of the Firefox Options. But how about the flash objects? It still appears and the page is messy.



I want it clean, selective, and filtered, and blocked not only on that site, but everywhere I go where those ads appear. Fortunately I'm on Firefox, and they have an add-on that is earning its respect. It's called the AdBlock Plus, you can find it here. You can select which sites those ads come from. Watch the demo here, or you could do it manually...

Go to Tools and click on Add-ons:



At Adblock Plus add-on, click on Options:



Click on Add Filter:



And then type in the url of the ad you want to block:


Refresh the page, and the ads are gone, leaving all the rest and page is neat.


As per request by Paul Francis, to add subscription, on the upper right corner of your Firefox browser, click on the dropdown menu and select preferences:



In the Filter menu, select Add Filter Subscription:


Then from the list, choose a Subscription, and click on Subscribe button below:


A Subscription is a text file listing of sites that you may use to block it by the plugin:

Monday, August 31, 2009

Upgrading From Vista To Windows 7

Let me start off with a couple of questions which were also in my mind before upgrading to Windows 7. Why upgrade to Windows 7 this early? Will my existing programs run after the upgrade?

Why Upgrade?
Personally, why should I? I've been to a sales rally of Microsoft products and they introduced several advancements of Windows 7. Positively I'm impressed with those features, the new Taskbar, Gadgets, Aero Shake, Aero Snap, Aero Peak, HomeGroup, and the Jump Lists. To view all Windows 7 features go here. But my curiosity still thirst for more, so I googled, they say Windows 7 boots faster, and better memory management according to this video and while browsing, I came across a site, which I could no longer remember, with a slogan "all the good things of Vista and the speed of XP". Sounds promising, but to see is to believe. Why this early? There's no perfect software, it might have a handful of bugs at this point in time. Umm, maybe not that much, look at what Vista and XP had gone through - at least in my own opinion - and the fact that my Vista is getting slower everyday, I want to get out of it, now I have an option than downgrading to XP.

Will My Existing Programs Run After The Upgrade?
Since I'm a programmer, I'm more concerned with the development tools like SQL Server, Visual Studio, and third party development softwares installed in my laptop. Several things I've found on some forums were SQL Server and Visual Studio 2008 fails during installation, and for everything else, I only found just a handful of incompatibilities, but I can live through it. Anyways, I will mention later in this article the applications that I will find incompatible with Windows 7.

My First Steps
I started with downloading Microsofts' Windows 7 Upgrade Advisor from here to know if my laptop is capable of running Windows 7.

I wasn't able to catch a screenshot of my results.

It presented me three sections such as system requirements, the hardware devices, and the programs installed. Like the one below, it's just an example, it's not mine:



Basically, it will advise you what to do when it finds a program that might cause a problem, or a device that needs a driver update. Since Windows 7 supports a larger number of devices than Vista, the advisor will just recommend a Windows Update, no need to go to your device manufacturer's site.

As for my devices, well, I could say, "bada bing, bada boom!"

So what the heck am I waiting for?

On The Road To Upgrading
I've selected x86, of course, my unit is not 64-bit.



See the link Help Me Decide on the screenshot below?



Though I got enough room for the upgrade, I was wondering if the 16 GB space requirement for Windows 7 will add up to my consumed space, or half of it, since I'm upgrading only. So, I took a screenshot of my hard disk space...



and I'll find out later how compact will Windows 7 be.

Moving on...



You won't need these extras with Windows 7, they are already built in to the system, except for DreamScene, Microsoft Tinker, and Hold'Em Poker. I can't find the DreamScene folder in my system after the upgrade. However, in some forums, they said that DreamScene can be installed separately.

I never updated my SCSI/Raid Host Controllers and I never uninstalled the programs before the upgrade as advised above. However, I can still run SQL Server 2008, VS 2003, and Visual Studio 6, except for MS JVM which is already gone in my system. I uninstalled my Bluetooth Stack after the upgrade, because my Bluetooth was not functioning, but just right after removing it, Windows 7 automatically installed its drivers...



and I can transfer data over my Bluetooth perfectly.

The main upgrade process took 6 hours.



Including these Windows Updates that Windows Action Center advised me to perform:





Afterwards, I checked my drive space and surprisingly I gained about 12 GB more free space...



Initial Conclusion:
Well, it's been three days now, and I'm still exploring Windows 7. Here are some of my initial observations:

- It, indeed, boots a lot faster.
- Applications open up a lot faster as well as switching between games and the desktop.
- As compared to my memory consumption in Vista, where it eats up to about 80% of my memory even when Firefox is the only active application, now, it's only at about 50%.
- More to come...

Here are the applications that are still working after the upgrade:
- Adobe Dreamweaver CS3
- Adobe Photoshop CS3
- AVG 8.5
- Firefox
- JetAudio 7
- MS Office 2003
- MS SQL 2005
- MS SQL 2008
- MS VSS 2005
- Opera 9
- SnagIt 9
- Sony Acid Pro 7
- Sony Vegas Movie Studio Platinum 9
- SpongeBob SquarePants Diner Dash
- Super v2009 Build 35
- Yahoo Messenger 9
- uTorrent
- Winamp 5.531
- More to come...

Here are the applications that crashed:
- RedGate Software (crashes at loading)
- Daemon Tools Pro
- More to come...

That's it for now. So far, Windows 7 performed well. I love it, in fact, I even made two wallpapers for my laptop, and I want to share it with you: