![]() |
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-09-25 05:22 |
47,813 topics / 349,918 posts / today 1 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » 请问这个带有选择项的批处理是怎么样实现的 请问这个带有选择项的批处理是怎么样实现的 请问这个带有选择项的批处理是怎么样实现的 What is the way to implement this batch processing with options? What is the way to implement this batch processing with options? What is the way to implement this batch processing with options? |
| Printable Version 4,192 / 35 |
| Floor1 qingyangecho | Posted 2006-11-02 08:50 |
| 初级用户 Posts 40 Credits 97 | |
|
CLSERVICE1
NET START VMNETUSERIF NET START VMNETBRIDGE GOTO MENU :SERVICE2 NET START HCMON NET START VMPARPORT GOTO MENU :SERVICE3 SC CREATE VMnetDHCP BINPATH= "%WINDIR%\SYSTEM32\VMNETDHCP.EXE" DISPLAYNAME= "VMware DHCP Service" DEPEND= VMnetuserif SC CREATE "VMware NAT Service" BINPATH= "%WINDIR%\SYSTEM32\VMNAT.EXE" DISPLAYNAME= "VMware NAT Service" DEPEND= VMnetuserif NET START VMnetDHCP NET START "VMware NAT Service" GOTO MENU :SERVICE4 SC CREATE VMAuthdService BINPATH= "%CD%\VMWARE-AUTHD.EXE" DISPLAYNAME= "VMware Authorization Service" DEPEND= vmx86 NET START VMAUTHDSERVICE GOTO MENU :SERVICE5 NET START VMNETUSERIF NET START VMNETBRIDGE SC CREATE VMnetDHCP BINPATH= "%WINDIR%\SYSTEM32\VMNETDHCP.EXE" DISPLAYNAME= "VMware DHCP Service" DEPEND= VMnetuserif SC CREATE "VMware NAT Service" BINPATH= "%WINDIR%\SYSTEM32\VMNAT.EXE" DISPLAYNAME= "VMware NAT Service" DEPEND= VMnetuserif NET START VMnetDHCP NET START "VMware NAT Service" NET START HCMON NET START VMPARPORT SC CREATE VMAuthdService BINPATH= "%CD%\VMWARE-AUTHD.EXE" DISPLAYNAME= "VMware Authorization Service" DEPEND= vmx86 NET START VMAUTHDSERVICE GOTO MENU :SERVICE6 DEVCON -R INSTALL %SYSTEMROOT%\INF\VMNETADAPTER.INF *VMnetAdapter1 DEVCON -R INSTALL %SYSTEMROOT%\INF\VMNETADAPTER.INF *VMnetAdapter8 GOTO MENU :END [ Last edited by namejm on 2006-11-2 at 09:37 AM ] |
|
| Floor2 lxmxn | Posted 2006-11-02 09:25 |
| 版主 Posts 4,938 Credits 11,386 | |
|
It mainly makes use of the characteristics of the choice command to be realized, but the xp system seems not to have this command by default. [ Last edited by lxmxn on 2006-11-2 at 09:27 AM ] |
|
| Floor3 kcdsw | Posted 2006-11-02 10:49 |
| 中级用户 Posts 179 Credits 404 | |
|
|
| Floor4 youxi01 | Posted 2006-11-02 10:51 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
In Windows 2000/XP, there is no `choice` command. To achieve the function described by the thread starter, you can use `set /P`
|
|
| Floor5 qingyangecho | Posted 2006-11-02 12:03 |
| 初级用户 Posts 40 Credits 97 | |
|
Strangely, adding this file can run in WINDOWS, but no matter whether choice.exe or choice.com is added, it cannot run in DOS.
|
|
| Floor6 lxmxn | Posted 2006-11-02 12:14 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Where did you put the chioce.exe? |
|
| Floor7 qingyangecho | Posted 2006-11-02 12:35 |
| 初级用户 Posts 40 Credits 97 | |
|
TO:lxmxn
Add to the virtual memory disk generated by the 98 startup disk, in the root directory of this disk along with the batch file. TO:kcdsw Thank you for writing this batch file, but it still didn't succeed. No matter which value is selected, it still executes the first one. |
|
| Floor8 youxi01 | Posted 2006-11-02 12:56 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
If you add a detection statement and then directly use a goto :service%in%, wouldn't that be much simpler?
|
|
| Floor9 lxmxn | Posted 2006-11-02 13:08 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Should it be added to the system folder? |
|
| Floor10 qingyangecho | Posted 2006-11-02 13:13 |
| 初级用户 Posts 40 Credits 97 | |
|
This I don't understand, I don't even know where the addition is.
|
|
| Floor11 qingyangecho | Posted 2006-11-02 13:16 |
| 初级用户 Posts 40 Credits 97 | |
Originally posted by lxmxn at 2006-11-2 01:08 PM: The system starts searching for the required files from the folder where it is located, and only goes to the system folder if it can't find them. DOS should be no exception. Also, I want to put this batch file on the boot disk, so there is no such thing as a system folder at all |
|
| Floor12 不得不爱 | Posted 2006-11-02 20:38 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Then your work path for adding this file in AUTOEXEC.BAT
|
|
| Floor13 fastslz | Posted 2006-11-02 21:24 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
AUTOEXEC.BAT, NET START I'm wondering whether this batch file is run under pure DOS or in XP?
|
|
| Floor14 qingyangecho | Posted 2006-11-02 22:04 |
| 初级用户 Posts 40 Credits 97 | |
|
Does choice not work in a VM and must be used on a physical machine?
|
|
| Floor15 fastslz | Posted 2006-11-02 22:13 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
CHOICE extracted from Win2003
http://www.cn-dos.net/forum/viewthread.php?tid=21689&fpage=1&highlight=choice What system is in the VM? Be sure to clarify whether it's a pure DOS batch or a CMD (XP) batch. There are essential differences between the two |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |