中国DOS联盟论坛

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 06:23
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS启动盘 & LOGO技术 (启动盘室) » [Help] How to add a boot menu to execute my this batch file
Printable Version  5,596 / 22
Floor1 feelam Posted 2007-08-15 17:09
初级用户 Posts 17 Credits 38


The above is the diagram of my system installation. Because the system I installed is really chilling, but there's really no way, it's not what I wanted.

The DOS system on drive C was installed using the command format c: /s /q.

The following is my code. The specific functions of the system recovery code haven't been added yet. Currently, the most critical thing is how to add a boot menu so that I can execute my batch file in DOS, and then call ghost.exe on drive C to restore the system. (I have already backed up the entire system)

Originally, I could do it after modifying virtual boot disks and so on, but I don't know why it can't boot on some computers. Think about it, now my drive C is already DOS, can I directly call



[ Last edited by feelam on 2007-8-15 at 05:28 PM ]
Floor2 lianjiang2004 Posted 2007-08-15 18:06
金牌会员 Posts 1,884 Credits 3,946
What a complete collection of MS systems.
Floor3 lianjiang2004 Posted 2007-08-15 18:09
金牌会员 Posts 1,884 Credits 3,946
I didn't understand the relationship between the opening picture and the following batch processing. It seems that the batch processing is all about restoring from 1:2 to 1:1.
Floor4 feelam Posted 2007-08-15 20:30
初级用户 Posts 17 Credits 38
Originally posted by lianjiang2004 at 2007-8-15 06:09 PM:
I don't understand the relationship between the initial diagram and the following batch processing. Looking at the batch processing, it's all restoring from 1:2 to 1:1.



Then it means you didn't even read what I said. Hehe

I said that I haven't added the function code to restore the system yet

Now the most important thing is to trouble you to see how to add this to the boot menu to execute instead of working on the code :cool:
Floor5 lianjiang2004 Posted 2007-08-15 21:37
金牌会员 Posts 1,884 Credits 3,946
Since it's not finished, there's no need to list a long batch script to distract attention, heh. Just making the requirements clear is enough. If C:\ has DOS as you said, then just add the batch script to autoexec.bat directly or call it with it. To be honest, for your usage environment, since the description is unclear, it's still not very clear.
Floor6 feelam Posted 2007-08-15 22:20
初级用户 Posts 17 Credits 38
Originally posted by lianjiang2004 at 2007-8-15 09:37 PM:
Since it's not finished, there's no need to list a long batch script, which distracts attention, heh.
Just make the requirements clear enough.
If there is DOS in C:\ as you said, then just add the batch script...


Hehe. First of all, thank you.
Is it just to directly add in autoexec.bat
@echo off
*.bat my Bat file name

Is that all?

PS: My environment is really difficult to figure out if I haven't really been in contact.
Originally I used someone else's virtual DOS boot disk modifications, and it could be called. But today I tried it, and some machines can use it while some can't. I can't figure out why. I thought: In DOS, usually a temporary drive is allocated, maybe it conflicts with so many of my drive letters.

[ Last edited by feelam on 2007-8-15 at 10:24 PM ]
Floor7 feelam Posted 2007-08-15 22:27
初级用户 Posts 17 Credits 38
Actually, the functions I want to implement are:
1. My system has been installed as shown in the figure / the ones behind can be temporarily ignored. It is to install another language version in the same partition after installing the first round of the system
2. All systems have respectively backed up the corresponding GHO files in DST=1:15
3. Now I just want to make a menu and add it to the boot menu of the system
4. Then according to what has been specified in the code (for example, the code I provided above), after selection, it can directly restore the specified GHO file in the code to the partition
Floor8 feelam Posted 2007-08-15 22:30
初级用户 Posts 17 Credits 38
Attach my demonstration code in CMD mode. Probably you will be clearer about what I mean.

Attachments
Finish.rar (1.37 KiB)
Floor9 lianjiang2004 Posted 2007-08-16 06:52
金牌会员 Posts 1,884 Credits 3,946
Can this be understood as: The first partition, that is, the DOS partition, already exists and will not be affected by other systems installed later. The 15th partition is also existing and stores the system backup files. There is one point that is unclear, how do you install other systems? Can all these systems work? Which are primary partitions? Which are logical partitions? Obviously, the partition where the system is located requires a primary partition. Of course, you can also install another system on one system, but then these two systems will not be independent and will affect each other. For batch processing operation, yes, as you said, just add in autoexec.bat: @echo off a.bat. There may also be possible solutions, such as adding the batch processing to the boot img, having CD-ROM boot, and performing restoration. Or choose to install grub4dos into the boot options/mbr, etc.
Floor10 feelam Posted 2007-08-16 09:05
初级用户 Posts 17 Credits 38
Yes, the first partition is already a DOS partition.

First round: 1_Dos → 2_Win2k_Eng → 3_Xp_Eng32 → 4_Xp_Chs32 → 5_Xp_Cht32 → 6_XpMce_Eng → 7_Vista_u_Eng32 → 8_Vista_u_Chs32 → 9_Vista_u_Cht32 → 10_Vista_hp_Chs32 → 11_Vista_u_Chs64 → 12_Vista_hp_Chs64 → Backup "1-12"

Second round: 2_Win2k_Chs → 3_Xp_Eng64 → 6_XpMce_Chs → 7_Vista_h_Eng32 → 8_Vista_h_Chs32 → 9_Vista_h_Cht32 → 10_Vista_hp_Cht32 → 11_Vista_u_Cht64 → 12_Vista_hp_Cht64 → Backup "2, 3, 6, 7, 8, 9, 10, 11, 12" → Restore 1_Dos (because installing VISTA will write to the MBR)

Third round: 2_Win2k_Cht → 10_Vista_hp_Eng → 11_Vista_u_Eng64 → 12_Vista_hp_Eng64 → Backup "2, 10, 11, 12" → Restore 1_Dos (because installing VISTA will write to the MBR)
Floor11 lianjiang2004 Posted 2007-08-16 09:41
金牌会员 Posts 1,884 Credits 3,946
Could it be that you work at Microsoft? You need so many systems.

It's really magnificent!!!

[ Last edited by lianjiang2004 on 2007-8-16 at 09:43 AM ]
Floor12 feelam Posted 2007-08-16 09:57
初级用户 Posts 17 Credits 38
Hehe, trouble the expert can help me solve this problem as soon as possible. I need to use it on Saturday. :(
I'm also trying hard to search through posts
Floor13 lianjiang2004 Posted 2007-08-16 10:15
金牌会员 Posts 1,884 Credits 3,946
For batch processing operation, yes, as you said, just add in autoexec.bat
@echo off
a.bat
------------------------------
The problem is, I suspect whether these systems can be installed as you wish, he he.
Floor14 feelam Posted 2007-08-16 11:10
初级用户 Posts 17 Credits 38
...The system has already been installed... All can run...

The key is that after adding it to autoexec.bat, it still can't run.
bat command

[ Last edited by feelam on 2007-8-16 at 11:13 AM ]
Floor15 lianjiang2004 Posted 2007-08-16 11:27
金牌会员 Posts 1,884 Credits 3,946
Remove the echo off and see which line has an error.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023