I have a script that initiates and monitors two io.filesystemwatchers that process data automatically. It works flawlessly in ISE and as a batch file, but when I tried to run it as a task and as a service it doesn't appear to function at all. I tried installing it using NSSM with the arguments -ExecutionPolicy Bypass -NoProfile, and later added -NoLogo -NonInteractive when the previous set did not work. I tried checking local system account and allow service to interact with desktop. I tried to check this account and set tie it to the local admin account but it yields a 1069 logon error.
What else can I do and what should I try?