0

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?

3
Contributors
10
Replies
13
Views
10 Years
Discussion Span
Last Post by jan1024188
0

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

Edited by Nick Evan: n/a

0

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.

Edited by Nick Evan: n/a

0

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. :)

0

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?

0

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 );
}
0

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. ;)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.