nssm install DirectoryCleanerTmp C:\Users\Administrator\go\bin\directory-cleaner.exe nssm set DirectoryCleanerTmp AppParameters "-interval 20s" nssm set DirectoryCleanerTmp AppEnvironmentExtra ARCHIVE_THRESHOLD=12h DELETE_THRESHOLD=2d nssm set DirectoryCleanerTmp AppDirectory C:\tmp nssm set DirectoryCleanerTmp AppExit Default Restart nssm set DirectoryCleanerTmp AppStdout C:\tmp\cleaner.log nssm set DirectoryCleanerTmp AppStderr C:\tmp\cleaner.log nssm set DirectoryCleanerTmp DisplayName DirectoryCleanerTmp nssm set DirectoryCleanerTmp ObjectName LocalSystem nssm set DirectoryCleanerTmp Start SERVICE_AUTO_START nssm set DirectoryCleanerTmp Type SERVICE_WIN32_OWN_PROCESS