让电脑密码自动更改并控制小朋友上网时间
2013-01-22 09:11
435 查看
小朋友在家上网无节制,所以写了这样一个东西,让小朋友用电脑之前需要做一道算术题才能获得密码,并且关机后再开机密码变更 。 程序本身比较粗糙,不过还挺好用。
适用系统: winXP/win7 win8未试过,想来也是能用的吧
ram 判断日期并更改密码
ram change password
msg * "请先等候10秒钟"
echo wscript.sleep 10000 > c:\sleep.vbs
c:\sleep.vbs
set yesno=%date%
for /f %%j in (c:\date.txt) do if not "%yesno:~,10%" == "%%j" goto normol
if exist c:\shutdown.txt goto once
:normol
del c:\shutdown.txt
del c:\date.txt
set aaaa=%date:~0,4%%date:~5,2%%date:~8,2%
set /a aaaa=(%aaaa% - ********) /%date:~8,2% /4
net user administrator %aaaa%
echo %aaaa% > c:\pwd.txt
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
echo %thnewt% > c:\login.time
ram add a schedule
shutdown -s -t 5400 -c "使用1个半小时将关机“
echo a > c:\shutdown.txt
echo %date% >c:\date.txt
goto end
:once
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
for /f %%i in (c:\login.time) do set /a panduan=%%i
set /a timec=%thnewt% - %panduan%
set /a remane=270 - %timec%
if 270 gtr %timec% (
msg * "被使用过后还未等待三小时,密码还未恢复 , 还剩余时间 %remane%分钟“
msg * "一分钟后电脑自动关机"
net user administrator ********
shutdown -s -t 60
) else (
goto normol
)
:end
if not exist %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat move limit.bat %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat
更改成at控制shutdown,xp中窗口无法隐藏
请输入内容
ram 判断日期并更改密码
ram change password
echo wscript.sleep 10000 > c:\sleep.vbs
c:\sleep.vbs
set yesno=%date%
for /f %%j in (c:\date.txt) do if not "%yesno:~,10%" == "%%j" goto normol
if exist c:\shutdown.txt goto once
:normol
del c:\shutdown.txt
del c:\date.txt
set aaaa=%date:~0,4%%date:~5,2%%date:~8,2%
set /a aaaa=(%aaaa% - 9999) /%date:~8,2% /4
net user administrator %aaaa%
echo %aaaa% > c:\pwd.txt
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
echo %thnewt% > c:\login.time
set /a shuttimeh=%thnewt% / 60
set /a shuttimem=%thnewt% %% 60
at %shuttimeh%:%shuttimem% shutdown -s -t 0 -f
echo a > c:\shutdown.txt
echo %date% >c:\date.txt
goto end
:once
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
for /f %%i in (c:\login.time) do set /a panduan=%%i
set /a timec=%thnewt% - %panduan%
set /a remane=270 - %timec%
if 270 gtr %timec% (
msg * "被使用过后还未等待三小时,密码还未恢复 , 还剩余时间 %remane%分钟“
msg * "一分钟后电脑自动关机"
net user administrator password
shutdown -s -t 60
) else (
goto normol
)
:end
if not exist %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat move
limit.bat %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat
适用系统: winXP/win7 win8未试过,想来也是能用的吧
ram 判断日期并更改密码
ram change password
msg * "请先等候10秒钟"
echo wscript.sleep 10000 > c:\sleep.vbs
c:\sleep.vbs
set yesno=%date%
for /f %%j in (c:\date.txt) do if not "%yesno:~,10%" == "%%j" goto normol
if exist c:\shutdown.txt goto once
:normol
del c:\shutdown.txt
del c:\date.txt
set aaaa=%date:~0,4%%date:~5,2%%date:~8,2%
set /a aaaa=(%aaaa% - ********) /%date:~8,2% /4
net user administrator %aaaa%
echo %aaaa% > c:\pwd.txt
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
echo %thnewt% > c:\login.time
ram add a schedule
shutdown -s -t 5400 -c "使用1个半小时将关机“
echo a > c:\shutdown.txt
echo %date% >c:\date.txt
goto end
:once
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
for /f %%i in (c:\login.time) do set /a panduan=%%i
set /a timec=%thnewt% - %panduan%
set /a remane=270 - %timec%
if 270 gtr %timec% (
msg * "被使用过后还未等待三小时,密码还未恢复 , 还剩余时间 %remane%分钟“
msg * "一分钟后电脑自动关机"
net user administrator ********
shutdown -s -t 60
) else (
goto normol
)
:end
if not exist %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat move limit.bat %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat
更改成at控制shutdown,xp中窗口无法隐藏
请输入内容
ram 判断日期并更改密码
ram change password
echo wscript.sleep 10000 > c:\sleep.vbs
c:\sleep.vbs
set yesno=%date%
for /f %%j in (c:\date.txt) do if not "%yesno:~,10%" == "%%j" goto normol
if exist c:\shutdown.txt goto once
:normol
del c:\shutdown.txt
del c:\date.txt
set aaaa=%date:~0,4%%date:~5,2%%date:~8,2%
set /a aaaa=(%aaaa% - 9999) /%date:~8,2% /4
net user administrator %aaaa%
echo %aaaa% > c:\pwd.txt
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
echo %thnewt% > c:\login.time
set /a shuttimeh=%thnewt% / 60
set /a shuttimem=%thnewt% %% 60
at %shuttimeh%:%shuttimem% shutdown -s -t 0 -f
echo a > c:\shutdown.txt
echo %date% >c:\date.txt
goto end
:once
set /a tih=%time:~,2%
set /a thm=%time:~3,2%
set /a thnewh=%tih%+3
set /a thnewt=%thnewh% * 60 + %thm%
for /f %%i in (c:\login.time) do set /a panduan=%%i
set /a timec=%thnewt% - %panduan%
set /a remane=270 - %timec%
if 270 gtr %timec% (
msg * "被使用过后还未等待三小时,密码还未恢复 , 还剩余时间 %remane%分钟“
msg * "一分钟后电脑自动关机"
net user administrator password
shutdown -s -t 60
) else (
goto normol
)
:end
if not exist %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat move
limit.bat %windir%\System32\GroupPolicy\Machine\Scripts\Startup\limit.bat
相关文章推荐
- win7设置控制孩子的上网时间不让他一直在玩电脑
- 如何对更改internet密码所需的缓存时间进行调整?
- RMAN兼容性、控制文件自动备份、保存时间、备份策略、备份脚本(二)
- 能否对更改internet密码所需的缓存时间进行调整?
- 能否对更改internet密码所需的缓存时间进行调整?
- minutes.at:控制你的上网时间
- 类似QQ电脑空闲5分钟后自动更改状态的实现
- 获取路由器内的ADSL上网账号和密码或者获取电脑内的ADSL上网账号和密码教程(by 星空武哥)
- RMAN兼容性、控制文件自动备份、保存时间、备份策略、备份脚本(二)
- Win7 Iphone4手机通过电脑上网设置 开机自动打开WIFI
- .net杂记 (调用EXE 获取路径 target VB DIV C# Split 页面之间传递值 更改session时间 EXCEL操作 控制电子邮件Mail input记录值的窍门)
- 修改红旗Linux,Windows菜单时间,删除Linux登录密码,设置Linux自动登录
- 电脑ip地址用批处理自动更改的实现方法。
- 密码更改导致应用程序池自动停止
- 自动记录电脑开关机时间
- Win8系统如何让家长更放心孩子使用电脑(合理控制时间)
- 获取ADSL上网帐号密码并自动保存到D盘
- 快速取消Win7电脑开机自动检测硬盘让开机时间变慢的五大技巧
- oracle更改自动收集统计信息时间
- 如何更改Linux自动锁屏时间