diff --git a/src/ServiceMonitor/IISConfigUtil.cpp b/src/ServiceMonitor/IISConfigUtil.cpp index 7342147..19bb5f9 100644 --- a/src/ServiceMonitor/IISConfigUtil.cpp +++ b/src/ServiceMonitor/IISConfigUtil.cpp @@ -163,6 +163,11 @@ HRESULT IISConfigUtil::BuildAppCmdCommand(const vector>& Replace(strEnvName, L"\"", L"\"\"\""); Replace(strEnvValue, L"'", L"''"); Replace(strEnvValue, L"\"", L"\"\"\""); + + // + // Handle values with a % sign, appcmd interprets these as hex characters + // + Replace(strEnvValue, L"%", L"%25"); if ((pStrCmd.length() + strEnvName.length() + strEnvValue.length()) > APPCMD_MAX_SIZE) {