Сделал я такой скриптик -
Даже GUI ваяем. Встал вопрос о ключах для командной строки.
У меня они организованны убого - по одному ключу (ну еще + 1 опцию) за раз обрабатывается.
Вот код:
Код:
Код: Выделить всё
Set Key1=%1
Set Key2=%2
.....
:CORE1
If "%Key1%" == "-full" Goto :full
If "%Key1%" == "-nomore" Goto :nomore
If "%Key1%" == "-kb" Goto :kbinstall
If "%Key1%" == "-p" Goto :pusb
If "%Key1%" == "-pd" Goto :pdisk
If "%Key1%" == "-pall" Goto :pall
If "%Key1%" == "-ms" Goto :ms
If "%Key1%" == "-unlockall" Goto :unlockall
If "%Key1%" == "-do" Goto :CORE_do
If "%Key1%" == "-l" Goto :CORE_l
If "%Key1%" == "-un" Goto :CORE_u
If "%Key1%" == "-help" Goto :Syntax
Goto :Syntax_Error
:CORE_do
If "%Key2%" == "" Goto :Syntax_Error
If "%Key2%" == "reg1" Goto :reg1
If "%Key2%" == "reg2" Goto :reg2
If "%Key2%" == "srvoff" Goto :srvoff
If "%Key2%" == "srvon" Goto :srvon
If "%Key2%" == "mountp" Goto :mountp
Goto :Syntax_Error
:CORE_l
Call :subinacl_DETECT
If "%Key2%" == "" Goto :Syntax_Error
If "%Key2%" == "reg1" Goto :lockreg1
If "%Key2%" == "reg2" Goto :lockreg2
If "%Key2%" == "usbadd" Goto :lockusbadd
If "%Key2%" == "usbuse" Goto :lockusbuse
If "%Key2%" == "usbwrite" Goto :lockusbwrite
If "%Key2%" == "mountp" Goto :lockmountp
Goto :Syntax_Error
:CORE_u
Call :subinacl_DETECT
If "%Key2%" == "" Goto :Syntax_Error
If "%Key2%" == "reg1" Goto :unreg1
If "%Key2%" == "reg2" Goto :unreg2
If "%Key2%" == "usbadd" Goto :unusbadd
If "%Key2%" == "usbuse" Goto :unusbuse
If "%Key2%" == "usbwrite" Goto :unusbwrite
If "%Key2%" == "mountp" Goto :unmountp
Goto :Syntax_Error
.....
:reg1
If Not "%Key3%"=="" Set NDTAR=%Key3%
....То есть, чтобы выполнить 2 команды надо 2 раза запустить скрипт
Код:
Код: Выделить всё
nmar -do reg1
nmar -do reg2А конечно охота сразу все указывать
Код:
Код: Выделить всё
nmar -do reg1 reg2 montpЯ сделал как мог, дабы не усложнять скрипт и себе жизнь. Но может кто подскажет чего ?


