![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 03:54 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » Want to compile a batch script that, at a certain time in XP, prevents access to the system? |
| Printable Version 2,353 / 13 |
| Floor1 anqing | Posted 2006-08-17 22:47 |
| 高级用户 Posts 413 Credits 859 | |
|
Want to compile a batch processing, at a certain time in xp, unable to enter the system?
Then, put it in the group policy, windows settings, scripts, startup inside? I don't know, can anyone help compile it.? |
|
| Floor2 chainliq | Posted 2006-08-18 01:48 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
The landlord has malicious intentions. Who does he want to harm?
|
|
| Floor3 wang6610 | Posted 2006-08-18 08:02 |
| 银牌会员 Posts 488 Credits 1,246 | |
Originally posted by chainliq at 2006-8-18 01:48 AM: Think more optimistically: Maybe trying to restrict children who are studying! |
|
| Floor4 namejm | Posted 2006-08-18 09:15 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
If you want to be unable to enter the system at a certain point in time (such as 12:30), you can use "at 12:30 shutdown -s"; but it feels meaningless like this;
If you want to be unable to enter the system during a certain time period (such as between 8:00 and 10:30), you can put the following script into the startup to start with the computer Later, when testing, a small problem was found, that is, the & after set should be closely followed by the previous sentence, and no space should be left, otherwise, it will cause judgment errors. [ Last edited by namejm on 2006-8-18 at 13:37 ] |
|
| Floor5 anqing | Posted 2006-08-18 10:28 |
| 高级用户 Posts 413 Credits 859 | |
|
Thanks to the friend in the previous post.
I'm a newbie. Could you explain the batch file above and note what each line does? |
|
| Floor6 electronixtar | Posted 2006-08-18 14:12 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
In Start/Run, enter
You can take a look at this
——Excerpted from "Command Line Reference" [ Last edited by electronixtar on 2006-8-18 at 14:22 ] |
|
| Floor7 namejm | Posted 2006-08-18 14:27 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Such a good command can be found, electronixtar is really powerful. Hey, I just can't settle down to read ntcmds.chm carefully, so I can only always struggle with those old - fashioned commands there - I really should read htcmds.chm carefully.
After a rough look at the help, I found that the net user command can only limit the whole - hour time, and it can't set times like 12:30, 13:15, which is a pity. [ Last edited by namejm on 2006 - 8 - 18 at 14:36 ] |
|
| Floor8 anqing | Posted 2006-08-18 19:48 |
| 高级用户 Posts 413 Credits 859 | |
Originally posted by electronixtar at 2006-8-18 14:12: Is this batch file placed in Start, Programs, Startup? If so, then the restricted user has already logged in |
|
| Floor9 electronixtar | Posted 2006-08-18 19:57 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Speechless~
|
|
| Floor10 anqing | Posted 2006-08-18 20:06 |
| 高级用户 Posts 413 Credits 859 | |
Originally posted by electronixtar at 2006-8-18 14:12: After executing the command `net user johnsw /time:M-F,8am-5pm`, does it need to rewrite the registry of the johnsw user? Is the way to解除 it like this: `net user johnsw /time:all`, or `net user johnsw /time |all` I think the format I mentioned above is definitely not correct, right? |
|
| Floor11 anqing | Posted 2006-08-18 20:30 |
| 高级用户 Posts 413 Credits 859 | |
Originally posted by electronixtar at 2006-8-18 19:57: I'm sorry, I'm a newbie. Does the net command should revert related registry? |
|
| Floor12 electronixtar | Posted 2006-08-18 23:50 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
net user /time directly associates with the account, takes effect immediately, heh, no need to set up auto-start items~~ The settings are saved as part of the user profile
[ Last edited by electronixtar on 2006-8-18 at 23:53 ] |
|
| Floor13 anqing | Posted 2006-08-19 09:54 |
| 高级用户 Posts 413 Credits 859 | |
|
Ah, I understand. The friend upstairs is really very clever! I admire it.
|
|
| Floor14 willsort | Posted 2006-08-22 03:50 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
───────────────── Moderation Record ───────────────── Performed by: Will Sort Operation: Move topic: From "DOS Troubleshooting & Problem Discussion (Q&A Room)" Description: According to the topic content classification, it is more suitable to be posted in this forum area Punishment: Deduct 6 points of reward points for posting this topic, deduct 2 points of penalty points for title violation ───────────────── Moderation Record ───────────────── |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |