People
I am trying to call a batch script from a power shell file and the call works fine if executed manually.
Start-Process C:\USR\test.bat
However, I created a service in C # that can delete and write logs using the powershell script, but just ignores this step and nothing happens. Is it because this script is being called by the windows service?
if (Test-Path \\xxxsharepathfullper\FileWatcher\target\watcher.mon) { echo "File removed" >> C:\USR\logger.txt Start-Process C:\USR\test.bat Remove-Item \\xxxsharepathfullper\FileWatcher\target\watcher.mon } else { }
- The execution policy is not limited.
windows-services
xtechkid
source share