Windows Genuine Advantage Validation Tool
This article explains a simple way to check if you and your client are running the genuine windows software from Microsoft.
Introduction
With Visual Studio 2005 and express editions, you have a component called Windows Genuine Advantage Validation Tool. Currently, this tool is used with downloading of any Microsoft tools and software from the internet.
Next time, you install your .NET application, you can check that you are deploying it in a system, where genuine windows software is installed.
The name of the assembly is LegitCheckControlLib.dll, and you can find it in the references dialog in Visual Studio. To use this tool, goto Add References --> Components tab --> Select the Windows Genuine Advantage Validation tool.
To accomplish this, you can add a few lines of code in your setup project or the actual project to be deployed.
LegitCheckControlLib.LegitCheckClass lcc = new LegitCheckControlLib.LegitCheckClass();
if (lcc.LegitCheck().Equals("0"))
MessageBox.Show("You are running Genuine Windows Software! Proceed further..");
else
{
MessageBox.Show("You are running Pirated Windows Software! Deployment process aborted.");
Application.Exit();
}
Using this kind of check before deployment, would help you provide support and solutions to your clients better than as usual.
Conclusion
The above C# code should work in most of the Windows XP, 2003 systems. Try it in your system and get back to me, if you have any questions or suggestions.