hi

I am new to C++ and I want to vrite some kind of "virus" for windows. The problem is, I dont want that command line opens when program runs. Its actualy unfinished loop, which beeps all the time.

Now i want to know how to make "hidden" program. I dont care if is listed in processes, but cmd musnt appear on the screen...any ideas?

hi

I am new to C++ and I want to vrite some kind of "virus" for windows.

We should help you write a virus? Wait.. let me think about it....

No...Sorry

Well its not a virus....it a stupid joke

If you want a stupid joke I suggest recording 3 hours off irritating noises and setting this .wav as the windows-startupsound.
It's makes sound and is a stupid joke.

hi

Hi! :)

Now i want to know how to make "hidden" program. I dont care if is listed in processes, but cmd musnt appear on the screen...any ideas?

You need to create a windows application instead of a console application and just don't show a window. Easy greasy if you know how to make a windows application. :)

ok thank you very much for help...Ill find other forums

Hi! :)

You need to create a windows application instead of a console application and just don't show a window. Easy greasy if you know how to make a windows application. :)

ummmm..how to make windows application? what extention does windows app. have?

ummmm..how to make windows application? what extention does windows app. have?

The only real difference is the starting point. Win32 programs use WinMain() as the starting point, and that keeps a console from being created. The source extension is still .cpp and the executable extension is still .exe.

#include <windows.h>

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
  MessageBox( NULL, "I'm a background program!", "Boo!", 0 );
}

thank you Ravalon,


umm...where Could I put that? I want that program starts when windows starts...

umm...where Could I put that? I want that program starts when windows starts...

That's the whole program. Just replace the MessageBox function with whatever logic you want. Maybe something like this.

#include <stdio.h>
#include <windows.h>

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
  while ( 1 )
    putchar( '\a' );
  return 0;
}

Once you build it you can put it in the startup folder and windows will run it automatically when the user logs in. If you put it in the all users startup folder, it will run when anyone logs in. That's a lot easier than trying to do it programmatically. ;)