Cmd command to create a system user and initialize a new user desktop

  
        
am Files\\HeidiSQL\\heidisql.exe >> MysqlTool.url

The contents of the file are as follows:

[InternetShortcut]URL=C:\\Program Files\\HeidiSQL\\heidisql.exeIconIndex=0IconFile= C:\\Program Files\\HeidiSQL\\heidisql.exe

Then put the created shortcut file “Mysql Tool” in the following directory (win2003) C:\\Documents and Settings\\Default User\\Desktop\\

Or create a shortcut directly

echo [InternetShortcut] >> "C:\\Documents and Settings\\Default User\\Desktop\\MysqlTool.url"echo URL=C:\\Program Files\\ HeidiSQL\\heidisql.exe >> "C:\\Documents and Settings\\Default User\\Desktop\\MysqlTool.url"echo IconIndex=0 >> "C:\\Documents and Settings\\Default User\\Desktop\\MysqlTool .url"echo IconFile=C:\\Program Files\\HeidiSQL\\heidisql.exe >> "C:\\Documents and Settings\\Default User\\Desktop\\MysqlTool.url"

Then write the create user script adduser.bat , the content is as follows

@echo offset /p username=Enter the added username: set /p isuserdel=If the user exists, delete the user Y/N:echo %username%net user %username% >nul 2>nulif "%errorlevel%" == " ;0" (echo exists the user if "%isuserdel%" == "Y" (net user %username% /delecho user"%username% has been deleted")) else (echo user does not exist, is working Create ....net user %username% 111111 /addnet localgroup "Remote Desktop Users" %username% /addecho User has been successfully created) echo Press any key to exit pause & exit 

---end---< Br>

Copyright © Windows knowledge All Rights Reserved