When I add this comment in two lines of the code below, the code works.
Code: Select all
:iis_ok
ECHO ++++++++++++++++++++++++++++++++++++++++++++++++
ECHO 005 ROTINA: iis_ok =============================
if defined goto_ret (
ECHO 005+++ RETORNO
set "goto_ret="
set "iis_ok_perg=Stopped"
if %W3SVC% EQU Running if %SMTPSVC% EQU Running if %HTTPFilter% EQU Running (
ECHO 005+++ iisreset: %iis_ok_perg%
set iis_ok_perg=Started
rem )
ECHO 005+++ iisreset: %iis_ok_perg%
rem if %iis_ok_perg% EQU Started (
ECHO 005+++ ROTINA: bye
goto sair
) else (
ECHO 005+++ ROTINA: iis_stop
goto iis_stop
)
) else (
ECHO 005+++ ROTINA: iis_status
set "goto_origem=iis_ok"
goto iis_status
)
ECHO 005+++++++++ FAILED ! ! !
goto bye
When I remove the comments, does not work, and the error is displayed:
C:\>ECHO 005 ROTINA: iis_ok =============================
005 ROTINA: iis_ok =============================
Started was unexpected at this time.
C:\> if EQU Started (
C:\>
What is the error code?
Thanks