本帖最后由 lky216 于 2012-6-20 15:58 编辑
如下代码
1.选择菜单6,它会运行菜单6和菜单7,因为菜单6运行玩后,按任意键后,运行到菜单7。
2.而选择菜单7,后面没有了,也就是菜单7而已
求
1.怎么办的好方活才能选择菜单6,不运行菜单七(注:pause改为exit就不会了,还是都不加Pause好了。。)
2.另求,已经存在是否替换 怎么强制替换,谢谢!
代码简略如下:- @echo off&
- ::选择菜单
- set /p choice=请选择:
- if /i "%choice%"=="6" goto 6
- if /i "%choice%"=="7" goto 7
-
- ::菜单六------------------------------------------------------------------------------------------------------------------
- :6
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List" /v 19006:TCP /t REG_SZ /d 19006:TCP:*:Enabled:19006"
-
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List" /v D:\ZoneServerGroup\rungate\GateServer\ChinGateServer.exe /t REG_SZ /d D:\ZoneServerGroup\rungate\GateServer\ChinGateServer.exe:*:Enabled:ChinGateServer
- pause
-
- ::菜单七------------------------------------------------------------------------------------------------------------------
- :7
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List" /v 19006:TCP /t REG_SZ /d 19006:TCP:27.154.56.194/255.255.255.255:Enabled:19006"
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List" /v D:\ZoneServerGroup\rungate\GateServer\ChinGateServer.exe /t REG_SZ /d D:\ZoneServerGroup\rungate\GateServer\\ChinGateServer.exe:27.154.56.194/255.255.255.255:Enabled:ChinGateServer
- pause
复制代码
|