-#define NSSM_REGISTRY "SYSTEM\\CurrentControlSet\\Services\\%s\\Parameters"\r
-#define NSSM_REG_EXE "Application"\r
-#define NSSM_REG_FLAGS "AppParameters"\r
-#define NSSM_REG_DIR "AppDirectory"\r
-#define NSSM_REG_ENV "AppEnvironment"\r
-#define NSSM_REG_EXIT "AppExit"\r
-#define NSSM_REG_THROTTLE "AppThrottle"\r
-#define NSSM_REG_STOP_METHOD_SKIP "AppStopMethodSkip"\r
-#define NSSM_REG_KILL_CONSOLE_GRACE_PERIOD "AppStopMethodConsole"\r
-#define NSSM_REG_KILL_WINDOW_GRACE_PERIOD "AppStopMethodWindow"\r
-#define NSSM_REG_KILL_THREADS_GRACE_PERIOD "AppStopMethodThreads"\r
-#define NSSM_REG_STDIN "AppStdin"\r
-#define NSSM_REG_STDOUT "AppStdout"\r
-#define NSSM_REG_STDERR "AppStderr"\r
-#define NSSM_REG_STDIO_SHARING "ShareMode"\r
-#define NSSM_REG_STDIO_DISPOSITION "CreationDisposition"\r
-#define NSSM_REG_STDIO_FLAGS "FlagsAndAttributes"\r
+#define NSSM_REGISTRY _T("SYSTEM\\CurrentControlSet\\Services\\%s\\Parameters")\r
+#define NSSM_REG_EXE _T("Application")\r
+#define NSSM_REG_FLAGS _T("AppParameters")\r
+#define NSSM_REG_DIR _T("AppDirectory")\r
+#define NSSM_REG_ENV _T("AppEnvironment")\r
+#define NSSM_REG_ENV_EXTRA _T("AppEnvironmentExtra")\r
+#define NSSM_REG_EXIT _T("AppExit")\r
+#define NSSM_REG_THROTTLE _T("AppThrottle")\r
+#define NSSM_REG_STOP_METHOD_SKIP _T("AppStopMethodSkip")\r
+#define NSSM_REG_KILL_CONSOLE_GRACE_PERIOD _T("AppStopMethodConsole")\r
+#define NSSM_REG_KILL_WINDOW_GRACE_PERIOD _T("AppStopMethodWindow")\r
+#define NSSM_REG_KILL_THREADS_GRACE_PERIOD _T("AppStopMethodThreads")\r
+#define NSSM_REG_STDIN _T("AppStdin")\r
+#define NSSM_REG_STDOUT _T("AppStdout")\r
+#define NSSM_REG_STDERR _T("AppStderr")\r
+#define NSSM_REG_STDIO_SHARING _T("ShareMode")\r
+#define NSSM_REG_STDIO_DISPOSITION _T("CreationDisposition")\r
+#define NSSM_REG_STDIO_FLAGS _T("FlagsAndAttributes")\r
+#define NSSM_REG_ROTATE _T("AppRotateFiles")\r
+#define NSSM_REG_ROTATE_SECONDS _T("AppRotateSeconds")\r
+#define NSSM_REG_ROTATE_BYTES_LOW _T("AppRotateBytes")\r
+#define NSSM_REG_ROTATE_BYTES_HIGH _T("AppRotateBytesHigh")\r