lundi 28 septembre 2015

"" Was unexpected at this time

I've pasted part of a script in below, where I am seeing problems with setting AJPPort. It is meant to pick up a setting further up in the script to use, which is a value of 8009. I want to have the option to change it if I want to, hence why I have this in the script. However at the moment it is giving me the error ="" was unexpected at this time. if NOT "!AJP!"="". I tried changing to if NOT "!AJP!"=="" but no luck. I've also got ENABLEDELAYEDEXPANSION set.

if "!InstallApache!"=="Y" (
    if "!HOLMESAuditMailbox!"=="" (
        set /p HOLMESAuditMailbox="Enter email address for alerting  : "
        echo HOLMESAuditMailbox=!HOLMESAuditMailbox!>> %SETTINGS_FILE%
)

if "!AJPHost!"=="" (
    set /p AJPHost="Enter Apache Proxy Destination Host    [localhost]: "
    if "!AJPHost!"=="" set AJPHost=localhost
    echo AJPHost=!AJPHost!>> %SETTINGS_FILE%
)

if "!AJPPort!"=="" (
if NOT "!AJP!"="" (
        AJPPort=!AJP!
    ) else (
        AJPPort=8009
    )
    set /p AJPPort="Enter Apache AJP Proxy Port    [!AJPPort!]: "
    echo AJPPort=!AJPPort!>> %SETTINGS_FILE%
)

)

Aucun commentaire:

Enregistrer un commentaire