LDMS 8.8 SP1.
What I am trying to do is to run the uninstallwinclient.exe in a Scheduled Task and have the status of the task report as Successful. I have tried using the uninstallwinclient.exe in an "Executable Distribution Package" and a "Batch File Distribution Package" but the Scheduled Task just hangs after the agent is removed from the target because the files are no longer there to report the status of the task back to the core.
I have tried using both IF "%ERRORLEVEL%"=="0" EXIT /B %ERRORLEVEL% and IF NOT "%ERRORLEVEL%"=="0" EXIT /B %ERRORLEVEL% but these don't work because they are waiting for the task to finish and by then it is too late, the files to report back are gone.
I am willing to assume that the uninstallwinclient.exe is going to work if it starts executing so I don't need to wait for it to finish to set the status of the task to Successful.
Does anyone have any creative ideas on how this could be achieved (if it is at all possible)?