Determine which operating system your program is running on with C#

Another tutorial from my developing for windows 7 series. How to check what OS the program is running on.

Layout of the form I'm using
OperatingSystem SystemInfo = Environment.OSVersion;
        public Form1()
            label2.Text = SystemInfo.VersionString;
            label1.Text = OSV();
        private string OSV()
            if (SystemInfo.Platform == System.PlatformID.Win32NT)
                if (SystemInfo.Version.Major == 5)
                    return "XP";
                else if (SystemInfo.Version.Major == 6)
                    if (SystemInfo.Version.Minor == 1)
                        return "Win 7";                    
                    return "Vista";
            return "";

My thoughts on the Micrsoft Exam 70-680.

After about two weeks of preparing, i passed the 70-680 exam. I have to say i didn’t know that Windows 7 was capable of doing some of the stuff I’ve read about!

Guss now i can call myself a “Microsoft Certified Professional” :).

For people who are looking for resources for the exam, here is a list of things i found useful:

AdvancedPostIt Devlopment Update (DevV0.06)

A lot of new things have been added to this protect from DevV0.05, the size of the project has nearly tripled in a week!

Here is the log for 0.06:

-The ‘image viewer’ Renamed to “AdvancedPostItImage”
-Zoom/pan implemented for the image viewer.
-Reworked logic for image viewer.
-Video Support…
-New App “VideoPlayerVLC” and “VideoPlayerWindows.xaml” for videos.
-Main Program Interface..”AdvancedPostItManager”.
-System tray icon implimented.. no functionality yet.
-Early version of a ‘playlist’ implemented.

Few things that i will do before the beta:

-Make the playlist fully funtional.
-Options menu.
-Anything else that i think will be good.

I’m going to take a break form developing this program at lest until the 20th of this month.


Security vulnerability? Antivirus and my keylogger…

Just out of curiosity i wanted to learn how to make a key-logger… In less than 2 hours I was able to make a program that detects keystrokes and emails them to me.

At first my antivirus did pick it up, but soon I found out that was because my program was trying to  write to a file that was already open. After a minute of re-programming i fixed that hole, and now the program can run easily without being picked up by my antivirus..

Then i thought it wasn’t catching it because i was the author of the program and my antivirus (AVG Free 2011) knows that, so it doesn’t catch it on my computer, but i proved that assumption wrong by successfully running it on my net-book which is using Windows 7 starter and Microsoft security essentials.

The program is about 11kb is size and take around 5-8mb of memory to run. Most people wouldn’t bother to check Task Manager to see what process are running, and therefore not even realize its running.

Example of the email i get:

“LButton LButton ShiftKey LShiftKey T H I S Space I S Space A N Space E X A M P L E Space O F Space A Space S Back F I L E Space T H A T Space I S Space S E N T Space T O Space M E Space V I A Space E M A I L OemPeriod OemPeriod OemPeriod Space I OemQuotes M Space S U R P R I S E D Space T H A T Space N O Space A N T I V I R U S Space P R O G R A M Space H A S Space D E T E D Back C T E D Space I T Space Y E Y Back T OemPeriod OemPeriod OemPeriod Space L O O K Space M Y Space P A S W O R D Space I S ShiftKey LShiftKey OemSemicolon Space M M M A J H F C U A B C G J K ShiftKey LShiftKey D2 D7 D7 D3 J LButton LButton LButton LButton RButton LButton”

So am I missing something? Because I really don’t understand how I was able to make such a program in less than 2 hours.