Posted By

k9flow on 03/29/10


Tagged

cool fun to create user on easy accounts use computer


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

oakdragon


Create Account


 / Published in: C++
 

Well its a very simple code

-k9flow -from p7

  1. #include <iostream>
  2. #include <string>
  3. #include <windows.h>
  4. #include <iostream>
  5. #include <fstream>
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. string task;
  11. string acc;
  12. string pass;
  13. string dele;
  14. string ran1;
  15. string yn;
  16. system("cls");
  17. system("title WARNING, YOU MUST BE USING ADMIN MODE TO RUN THIS PROGRAM!!!!\n");
  18. Sleep(1000);
  19. system("cls");
  20. system("title AccountP V2");
  21. system("color 4a");
  22. cout << "Command: ";
  23. cin >> task;
  24. if (task == "help") {
  25. system("cls");
  26. cout << "- These Are Commands You Can Excute Using V2 -\n";
  27. cout << "\n";
  28. cout << "help - View help info\n";
  29. cout << "create - Create an user account\n";
  30. cout << "delete - Delete an account\n";
  31. cout << "view - View all accounts on this computer\n";
  32. cout << "exit - Close program\n";
  33. cout << "\n";
  34. system("PAUSE");
  35. main();
  36. }
  37. if (task == "create") {
  38. system("cls");
  39. cout << "Account Name: ";
  40. cin >> acc;
  41. ofstream accname;
  42. accname.open ("acc.bat");
  43. accname << "net user /add " << acc;
  44. accname.close();
  45. cout << "\n";
  46. cout << "\n";
  47. ofstream accpass;
  48. accpass.open ("accp.bat");
  49. accpass << "net user " << acc << " *";
  50. accpass.close();
  51. system("C:\\accv2\\acc.bat");
  52. Sleep(500);
  53. system("C:\\accv2\\accp.bat");
  54. Sleep(500);
  55. system("cls");
  56. cout << "\n";
  57. cout << "\n";
  58. cout << "Account Created!\n";
  59. Sleep(1000);
  60. main();
  61. }
  62. if (task == "view") {
  63. system("cls");
  64. cout << "Accounts:::\n";
  65. cout << "\n";
  66. system("net user");
  67. system("PAUSE");
  68. main();
  69. }
  70. if (task == "delete") {
  71. system("cls");
  72. cout << "Current Accounts:::\n";
  73. cout << "\n";
  74. system("net user");
  75. cout << "\n";
  76. cout << "-- Type The Account Name 100% Correct Or It Won't Work -- \n";
  77. cout << "\n";
  78. cout << "Name: ";
  79. cin >> dele;
  80. ofstream del;
  81. del.open ("dela.bat");
  82. del << "net user /delete " << dele;
  83. del.close();
  84. system("cls");
  85. cout << "\n";
  86. cout << "\n";
  87. system("C:\\accv2\\dela.bat");
  88. cout << "\n";
  89. system("PAUSE");
  90. main();
  91. }
  92. if (task == "ran1") {
  93. system("cls");
  94. cout << "Are You Sure?\n";
  95. cout << " ( y or n )\n";
  96. cout << "Insert: ";
  97. cin >> yn;
  98. if (yn == "y") {
  99. system("exit");
  100. }
  101. if (yn == "n") {
  102. main();
  103. }
  104. return 0;
  105. }
  106. }

Report this snippet  

You need to login to post a comment.