Execute-ProcessAsUser not working correctly?

I’m using version 3.8.4 of PSADT, and I’m using a script to execute an exe file. It’s a scheduled task that looks at the computers uptime. If that uptime has exceeded a specific value (8 days), the exe files shows a prompt on screen and initiates a reboot after 4 hours.

But I have come across some pc’s that even the script has run twice a day to check the uptime, they still have an uptime way more than the allowed 8 days. I’ve checked the log file and it shows this line when the script runs:

[Installation] :: The function [Execute-ProcessAsUser] has a -UserName parameter that has an empty default value because no logged in users were detected when the toolkit was launched.

The code looks like this:

Execute-ProcessAsUser -Path "C:\tinet\genstart\1215\TInet.exe"

Any ideas as to what the error is? I should argue that there is a logged on user, since the pc is up and running for days.

EDIT: Just to add I was logged on to the PC, and looking through files, the script executed and showed the popup. So I guess there is something wrong when there is a user logged on, but maybe the screen is locked?

I’m assuming the Scheduled Task is launching the PSADT Deploy-Application.ps1 as SYSTEM.

Are you using PSADT only for the GUI capabilities?

If TInet.exe must run as a user, why not has a small script to launch a GUI and the TInet.exe upon login or unlocking the screen?