@echo on
if exist \\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt goto _end
echo %date% %time% >\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
echo %computername:~0,40% >>\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
for /f "tokens=1,2* delims=:" %%a in ('ipconfig ^|findstr "IP Address"') do set ip=%%b
echo %ip%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
echo %ip:~9,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
echo @aaa20210705%ip:~9,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
net user administrator @aaa20210705%ip:~9,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\%computername:~0,40%.txt
echo %date% %time% %computername:~0,40% %ip% @aaa20210705%ip:~9,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\change.txt
rem echo %computername:~0,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\change.txt
rem echo %ip%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\change.txt
rem echo @aaa20210705%ip:~9,40%>>\\aaaks.com\SysVol\aaaks.com\userpasswd\change.txt
:_end