Troubleshooting the Start Program action in WinSyslog#
This article explains common issues with the Start Program action in WinSyslog and provides solutions to resolve them.
Background#
The Start Program action allows WinSyslog to execute external programs, batch files, or scripts when specific conditions are met. However, there are several common issues that can prevent this action from working correctly.
Common Issues and Solutions#
Issue 1: Program not found or path problems
Symptoms: - The Start Program action appears to run but nothing happens - No error messages in the Windows Event Log - The external program works when run manually from command line
Root Cause: WinSyslog may not be able to locate the executable file due to path issues or missing dependencies.
Solutions:
Use absolute paths for all executables - Instead of:
curl google.com > temp.txt- Use:C:\curl\curl-win\bin\curl.exe google.com > C:\temp\temp.txtVerify executable location - Check if the program exists in the specified path - Ensure all required DLL files are present - Test the command manually from Windows Command Prompt
Check Windows PATH environment variable - WinSyslog may not have access to the same PATH as your user session - Use full paths instead of relying on PATH resolution
Issue 2: Permission problems
Symptoms: - No error messages in Event Log - Program works when run manually but not through WinSyslog
Root Cause: WinSyslog runs as a Windows service with different permissions than your user account.
Solutions:
Store files in accessible locations - Avoid system folders like
C:\Windows\System32- Use generic folders likeC:\temporC:\scripts- Ensure WinSyslog service has read/execute permissionsCheck file permissions - Right-click on the executable file - Go to Properties > Security - Ensure “SYSTEM” and “SERVICE” accounts have execute permissions
Issue 3: Working directory problems
Symptoms: - Program runs but cannot find input/output files - Relative paths in scripts don’t work
Root Cause: The working directory when WinSyslog executes the program may be different from expected.
Solutions:
Use absolute paths for all file references - Instead of:
> temp.txt- Use:> C:\temp\temp.txtSet working directory in batch files - Add
cd /d C:\your\working\directoryat the beginning of batch files
Troubleshooting Steps#
Check Windows Event Log - Open Event Viewer (type “Event Viewer” in Windows search) - Navigate to Windows Logs > Application - Look for WinSyslog-related error events
Test with simple commands first - Start with a basic batch file that creates a text file - Example:
echo Test > C:\temp\test.txtVerify the command works manually - Open Command Prompt as Administrator - Run the exact same command that WinSyslog should execute - Ensure it works from the command line first
Check WinSyslog service account - Verify which account WinSyslog is running under - Ensure that account has necessary permissions
Example Working Configuration#
Here’s an example of a properly configured Start Program action:
Command to execute:
C:\curl\curl-win\bin\curl.exe
Parameters:
google.com > C:\temp\response.txt
Key points: - Full path to curl.exe - Absolute path for output file - No reliance on PATH environment variable - Output directory exists and is writable
Additional Tips#
Timeout settings: Keep external programs under 5 seconds runtime for best performance
Error handling: Consider adding error checking to your batch files
Logging: Add logging to your scripts to help troubleshoot issues
Testing: Always test Start Program actions in a development environment first
If you continue to experience issues after following these steps, please contact Adiscon support with: - WinSyslog version - Windows version - Exact command being executed - Any error messages from Event Log - Results of manual command testing