VB .Net 2003, .Net Framework 1.1, Windows XP Pro SP1
I've written a console application which I run as a scheduled task. How do
I return an exit status value (or string) from the application so that the
status is displayed in the Status column of the Scheduled Tasks window?
I've tried the following methods, and the console app definitely runs (as
shown by the Last Run Time in the Scheduled Tasks window), however the
Status column is blank.
Sub Main()
Dim ExitStatus As Integer = 10
Environment.ExitCode = ExitStatus
Environment.Exit(ExitStatus)
End Sub
Function Main() As Integer
Dim ExitStatus As Integer = 10
Return ExitStatus
End Function
Thanks for any help or info on this.