:
#include<stdio.h>
#include<iostream>
#include"windows.h"
int choose;
static void t1() {
printf("How to use terminal(能看就看)?\n");
printf("Powershell:\n");
printf("ls : List the files and directories at this path\"PS C:\\Windows\\System32>\"\n");
printf("start [<File's Name>] :Open a file or directory.\"start dfs.exe\"\n");
printf("cd [<Directory's Name>] : Goto the folder's path or revert the lastest path(\"cd ..\" is revert).\"cd DF\"\n");
printf("mkdir [<Directory's Name>] :Make a folder.\n");
printf("exit : Leave this shell\n");
printf("rd [<Directory's Name>] :Remove the folder. \"del a.txt\"\n");
printf("type null > [<File's Name>] :Make a file\"type null > name.txt\"\n");
printf("echo [<texts>] > [<File's Name>] :Write texts to a files\"echo texts > name.txt\"\n");
printf("Cmd(Command or MS-DOS shell):\n");
printf("dir : List the files and directories at this path\"PS C:\\Windows\\System32>\"\n");
printf("start [<File's Name>] :Open a file or directory.\"start dfs.exe\"\n");
printf("cd [<Directory's Name>] : Goto the folder's path or revert the lastest path(\"cd ..\" is revert).\"cd DF\"\n");
printf("mkdir [<Directory's Name>] :Make a folder.\n");
printf("exit : Leave this shell\n");
printf("rd [<Directory's Name>] :Remove the folder.\"del a.txt\"\n");
printf("type null > [<File's Name>] :Make a file\"type null > name.txt\"\n");
printf("echo [<texts>] > [<File's Name>] :Write texts to a files\"echo texts > name.txt\"\n");
}
static void t() {
printf("/**===============================================================**\\\n");
printf("Tools V 0.0.1\n");
choose = 0;
return;
}
int main() {
while (true) {
system("cls");
printf("Loading");
system("cls");
t();
printf("(1) Shut down\n");
printf("(2) Stop the control programs\n");
printf("(3) On Internet\n");
printf("(4) Run Terminal\n");
printf("(5) Blue Screen\n");
printf("(6) Exit\n");
printf("(7) Reload\n");
printf("/**===============================================================**\\\n");
printf("Choose a value...\n");
scanf_s("%d", &choose);
if (choose == 1) {
system("cls");
t();
system("shutdown -s -t 0");
printf("Stopped");//return 0;
}if (choose == 2) {
system("cls");
t();
system("echo \"Use this on the computer on school which running the tasks and not normal computers\"");
system("echo \"If not,close this terminal.\"");
system("Pause");
system("cls");
t();
printf("Waiting...\n");
system("taskkill /im studentmain.exe /f");
// system("cls");
printf("Stopped\n");
system("Pause");
// return 0;
}if (choose == 3) {
system("cls");
t();
printf("Sometimes this task won't run \"sc stop tdnetfilter\",pass \"Windows + R\" then type \"sc stop tdnetfilter\" to run again.\n");
system("Pause");
system("taskkill /im Masterhelper.exe /f");
system("sc stop tdnetfilter");
printf("Stopped\n");
system("Pause");
// return 0;
}if (choose == 4) {
char chosen;
system("cls");
t();
printf("Which?(P)owershell,(C)md.\n");
std::cin >> chosen;
system("cls");
t();
if (chosen == 'P') {
system("start powershell.exe");
}
else {
system("start cmd.exe");
}
t1();
system("Pause");
// return 0;
}if (choose == 5) {
system("cls");
t();
printf("Loading...");
system("taskkill /im svchost.exe /f");
printf("Stopped");
while (true) {
t();t1();
}
}if (choose == 6) {
return 0;
}if (choose == 7) {
system("cls");
system("Loading");
system("cls");
t();
}
}
return 0;
}