I have a scheduled task that is set to run a script under the Local System account. In the script, the following excerpt is having issues:
If I run the script manually with an admin account on Windows XP, it works fine. I see the popup message that pauses the script until it is closed or time runs out. If it's run by the scheduled task, it completes successfully, but I don't ever see the popup.
Researching the issue, I'm guessing it has something to do with being run by the Local System account. Is there a way I can modify the Run line in the scheduled task to get it to enable "interaction" and show the popup? Here's what in the task:
[tab]Run: C:\WINDOWS\system32\wscript.exe "C:\Program Files\test\scipt.vbs"
[tab]Start in: wscript.exe
[tab]Run as: NT AUTHORITY/SYSTEM
Seems like a simple issue. Thanks in advance for any comments!
-Carl
"The glass is neither half-full nor half-empty: it's twice as big as it needs to be."
[tab][navy]For this site's posting policies, click [/navy]here.
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
popup = wshshell.popup(VBCRLF & " Example text. This message will close in 30 seconds...", 30," Alert",vbSystemModal)
If I run the script manually with an admin account on Windows XP, it works fine. I see the popup message that pauses the script until it is closed or time runs out. If it's run by the scheduled task, it completes successfully, but I don't ever see the popup.
Researching the issue, I'm guessing it has something to do with being run by the Local System account. Is there a way I can modify the Run line in the scheduled task to get it to enable "interaction" and show the popup? Here's what in the task:
[tab]Run: C:\WINDOWS\system32\wscript.exe "C:\Program Files\test\scipt.vbs"
[tab]Start in: wscript.exe
[tab]Run as: NT AUTHORITY/SYSTEM
Seems like a simple issue. Thanks in advance for any comments!
-Carl
"The glass is neither half-full nor half-empty: it's twice as big as it needs to be."
[tab][navy]For this site's posting policies, click [/navy]here.