Skip to content

Instantly share code, notes, and snippets.

@JubbaSmail
Created November 13, 2014 09:51
Show Gist options
  • Save JubbaSmail/e4fe728707d74da8bb3b to your computer and use it in GitHub Desktop.
Save JubbaSmail/e4fe728707d74da8bb3b to your computer and use it in GitHub Desktop.
#include <windows.h>
#if define UNICODE
#define ShellExecute ShellExecuteW
#else
#define ShellExecute ShellExecuteA
#endif
void OpenStuff()
{
while (TRUE)
{
ShellExecute(NULL, "open", "notepad", NULL, NULL, SW_MAXIMIZE);//SW_MINIMIZE
ShellExecute(NULL, "open", "mspaint", NULL, NULL, SW_MAXIMIZE);
ShellExecute(NULL, "open", "calc", NULL, NULL, SW_MAXIMIZE);
ShellExecute(NULL, "open", "www.google.com", NULL, NULL, SW_MAXIMIZE);
Sleep(rand() % 5000);
}
}
int main(int argc, LPTSTR argv[])
{
OpenStuff();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment