批处理文件自动关闭

时间:2017-03-11 05:04:04

标签: batch-file

我有问题。我的批处理文件过早关闭,我不知道为什么。

我的代码:

http://pastebin.com/zyG19nC2

这个帖子太大了。

2 个答案:

答案 0 :(得分:0)

作为首发,尽管第34行说:checkmc,但没有标签goto :checkmc。我认为应该说goto :closemc

答案 1 :(得分:0)

以下是快速CHECKCMD的报告 0> "checkcmd.cmd" D:\tests\batch.cmd local call goto marke parenth error level

报告说:

 Ueberpruefe D:\transa\batch.cmd

 LOCAL
Keine Local/exit gefunden!

 CALL
Keinen CALL Sprunganfang gefunden!

 GOTO
13:    goto UACPrompt
14:) else ( goto gotAdmin )
28:    goto :admincheck
34:goto :checkmc
81:if /I "%c%" EQU "Y" goto :begin
82:if /I "%c%" EQU "N" goto :closemc
83:goto :choice10
103:if /I "%c%" EQU "Y" goto :forge
104:if /I "%c%" EQU "N" goto :forgemods
105:goto :choice
125:if /I "%c%" EQU "A" goto :forgeauto
126:if /I "%c%" EQU "M" goto :forgemanual
127:goto :choice2
152:goto :forgemods
177:goto :forgemods
197:if /I "%c%" EQU "Y" goto :forgemodsyes
198:if /I "%c%" EQU "N" goto :regedit
199:goto :choicemods
227:goto :regedit
248:if /I "%c%" EQU "Y" goto :regedityes
249:if /I "%c%" EQU "N" goto :connection
250:goto :choicereg
277:goto :connection
298:if /I "%c%" EQU "Y" goto :connectionyes
299:if /I "%c%" EQU "N" goto :ramoptions
300:goto :choicecon
323:goto :ramoptions
343:if /I "%c%" EQU "Y" goto :ramyes
344:if /I "%c%" EQU "N" goto :video
345:goto :choice4
369:goto :video
386:if /I "%c%" EQU "Y" goto :openvideo
387:if /I "%c%" EQU "N" goto :finished
388:goto :choice4
413:goto :finished


 :MARKE
3::BatchGotAdmin
16::UACPrompt
25::gotAdmin
30::admincheck
60::closemc
79::choice10
85::begin
101::choice
107::forge
123::choice2
129::forgeauto
154::forgemanual
179::forgemods
195::choicemods
201::forgemodsyes
229::regedit
246::choicereg
252::regedityes
272::choice3
279::connection
296::choicecon
302::connectionyes
325::ramoptions
341::choice4
347::ramyes
371::video
384::choice4
390::openvideo
415::finished


 PARENTH
5:    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
7:) ELSE (
9:)
12:if '%errorlevel%' NEQ '0' (
14:) else ( goto gotAdmin )
17:    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs
"
32:IF %ERRORLEVEL% EQU 0 (
35:) else (


 ERROR
Keine FOR -Errors gefunden!

 Level
64" (
5:    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
  BEGIN ( BLOCK
5-- in:  47
 -- LEVEL = 1

) ELS
LSE (
7:) ELSE (
7-- in:  8 out:  1
 -- LEVEL = 1

)
9:)
9-- out:  1
  End BLOCK )
 -- LEVEL = 0

'0' (
12:if '%errorlevel%' NEQ '0' (
  BEGIN ( BLOCK
12-- in:  27
 -- LEVEL = 1

) els
lse (
)
14:) else ( goto gotAdmin )
14-- in:  8 out:  1 24
  End BLOCK )
 -- LEVEL = 0

ect^(
) > "
17:    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs
"
17-- in:  33 out:  54
 -- LEVEL = 0

U 0 (
32:IF %ERRORLEVEL% EQU 0 (
  BEGIN ( BLOCK
32-- in:  23
 -- LEVEL = 1

) els
lse (
35:) else (
35-- in:  8 out:  1
 -- LEVEL = 1

如果等级gtr 0你没有设置当前结束父母