Scheduled Task Runs VBScript but does not display message box created in VBscript
Posted on 2009-04-01
I have a VBscript that runs the following line in in a script Warning.vbs:
msgbox "Your computer will shutdown with 10 minutes if you do not press oK",0,"WARNING"
I then create a scheduled task via a command line with the following line:
schtasks /create /ru system /sc onidle /i 230 /tn "Warning Shutdown" /tr "C:\Windows\System32\wscript.exe c:\warning.vbs"
The issue I have is when the VBscript runs as a scheduled task there is a sound to say that it has run but it does not display the message box.
When i run the VBscript without it being a scheduled task the box comes up without error.
I know this is a permissions issue however how do i make the script run and display the message box on the users logged in profile as required.