![]() |
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-02 01:26 |
48,037 topics / 350,122 posts / today 2 new / 48,250 members |
| DOS批处理 & 脚本技术(批处理室) » Question: How do I write this batch file |
| Printable Version 3,791 / 37 |
| Floor1 菜菜菜 | Posted 2003-03-29 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
My computer is used by several people, all newbies, and they all like to mess around, so the machine has one problem or another almost every day (for example, the registry gets modified, the homepage gets changed, the resolution and colors get changed, etc.). I want to write a batch command so that every time it boots up it can restore the state from the previous boot. I tried using Restore Wizard, but after using it the system became much slower. I've been to some Internet cafes, and they didn't have Restore Wizard installed, but every time they booted up their machines returned to the previous state. So how is that batch command written? Please, an expert give me some guidance.
I'm a newbie, so please write it in a bit more detail. Thanks! |
|
| Floor2 菜菜菜 | Posted 2003-03-29 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
Why is nobody answering me... Urgent...
Just stepped out for a bit.. Now the machine has to install the graphics card driver again... |
|
| Floor3 playboy2925 | Posted 2003-03-29 00:00 |
| 银牌会员 Posts 393 Credits 1,275 | |
|
scanreg /restore
This is for restoring the registry. |
|
| Floor4 菜菜菜 | Posted 2003-03-30 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
This command does work... but they don't know how to use the other few things (there are girls using it)... When I'm not around they can't use the computer. Can someone help me write a batch file like the ones used in Internet cafes... Urgent...
|
|
| Floor5 极品人渣 | Posted 2003-03-31 00:00 |
| 初级用户 Posts 11 Credits 123 | |
|
State your specific requirements, and someone on the forum will help you (be more specific).
The reason Restore Wizard is slow is that you didn't put the swap file and temporary files on an unprotected partition, or there is a lot of reading from drive C. After moving them to another drive, this problem can basically be solved. |
|
| Floor6 菜菜菜 | Posted 2003-04-01 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
The specific requirement is:
Every time it boots up... restore the main system files such as system.dat system.ini user.dat win.ini. |
|
| Floor7 MYS | Posted 2003-04-01 00:00 |
| 元老会员 Posts 1,637 Credits 5,170 From 广东佛山 | |
|
Most Internet cafes use hard disk protection cards; you can buy one too.
|
|
| Floor8 Lydong | Posted 2003-04-01 00:00 |
| 元老会员 Posts 407 Credits 1,468 From 广州 | |
|
Try the following method and see if it works:
1。Create a new folder c:\windows\sysbak 2。Back up the files system.dat system.ini user.dat win.ini into c:\windows\sysbak. 3。Add the following to CONFIG.SYS: device=c:\windows\himem.sys device=c:\windows\ifshlp.sys 4。Add the following to AUTOEXEC.BAT: ATTRIB -R -S -A -H C:\WINDOWS\SYSTEM.DAT ATTRIB -R -S -A -H C:\WINDOWS\SYSTEM.INI ATTRIB -R -S -A -H C:\WINDOWS\USER.DAT ATTRIB -R -S -A -H C:\WINDOWS\WIN.INI COPY /Y c:\windows\sysbak\*.* c:\windows\ |
|
| Floor9 菜菜菜 | Posted 2003-04-03 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
What the poster above said doesn't work.... What should I do...
I wrote one myself as follows: @ECHO off cd c:\windows attrib system.dat -h -r attrib user.dat -h -r del system.dat del user.dat del win.ini del system.ini cd system cd regdate copy . c:\windows But it still doesn't work. Can someone tell me what's wrong? Also, what's wrong with the one above? Urgent urgent urgent... Could some expert spare just a little time to help me? |
|
| Floor10 dick | Posted 2003-04-03 00:00 |
| 初级用户 Posts 1 Credits 102 | |
The following is quoted from 菜菜菜 at 2003-4-3 9:40:57: When writing batch files, try to use absolute paths as much as possible. Like what you wrote above, cd system cd regdate the directories can easily get mixed up, |
|
| Floor11 菜菜菜 | Posted 2003-04-04 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
Brother above, can you help me write it? Because I only started learning DOS not long ago. I don't understand how to write it. Thanks.
|
|
| Floor12 Wengier | Posted 2003-04-04 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
At most these only restore the WIN registry; it's impossible to restore other stuff. If you really want full system restoration, then go buy a restore card, and then just use the system protection program that comes with it.
|
|
| Floor13 菜菜菜 | Posted 2003-04-04 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
That would be fine too... how should it be written? Thanks in advance, moderator.
|
|
| Floor14 菜菜菜 | Posted 2003-04-04 00:00 |
| 初级用户 Posts 16 Credits 136 | |
|
We're all poor students. So if we can save even a little, we save it. Moderator, could you help me write one? As long as it can restore the registry, that's enough.
|
|
| Floor15 Wengier | Posted 2003-04-04 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
For that, of course you first need a hard disk restore card, so there is no need to write a batch file. Another method is to make a hard disk image, using software like Ghost, but full system recovery takes an especially long time, so it is not suitable for normal use and can only be used in some special situations (such as when WIN can't boot, etc.).
|
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |