Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <conio.h>
- using namespace std;
- void main()
- {
- string remoteComp;
- cout << "Remote shutdown by Samko\n\nLista komputerów w sieci :\n";
- system("net view");
- cout << "Podaj nazwę komputera który chcesz wyłączyć (bez \\\\) :\n";
- cin >> remoteComp;
- string prototype = "shutdown /r /t 10 /m \\\\" + remoteComp;
- //system("cls");
- cout << ("Czy na pewno zrestartować komputer? (y/n) :");
- if (_getch() == 'y'){
- system(prototype.c_str());
- cout << "Komenda wysłana!\n";
- }else{
- cout << "Komenda anulowana!";
- }
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement