Scheduled Task runas:

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have Windows XP Tablet Edition, SP2. I'm logged on to a domain as one
user, but need to run the scheduled task as a different user. I have the
task set up to run a batch file. The first line of the batch file is
"taskkill GTViewer.exe /f," the next lines copy and unzip files, then the
last line starts GTViewer in maximized mode. The batch file runs
successfully when executed outside the task. It also runs successfully when
I open a command prompt as another user. When I schedule a task and set the
RunAs to DOMAIN\00000111 (and enter the password), the file runs but it
doesn't open GTViewer; I'm logged on as 99999999@DOMAIN. 00000111 is an
administrator on the PC. It shows the process GTViewer.exe running in Task
Manager, but the application window doesn't open. The task runs properly if
I run it as the same person who is logged on (that is, GTViewer opens in a
full window).

Any help or suggestions would be appreciated. I've not found this type of
problem documented anywhere.
 
LoriP said:
I have Windows XP Tablet Edition, SP2. I'm logged on to a domain as one
user, but need to run the scheduled task as a different user. I have the
task set up to run a batch file. The first line of the batch file is
"taskkill GTViewer.exe /f," the next lines copy and unzip files, then the
last line starts GTViewer in maximized mode. The batch file runs
successfully when executed outside the task. It also runs successfully
when
I open a command prompt as another user. When I schedule a task and set
the
RunAs to DOMAIN\00000111 (and enter the password), the file runs but it
doesn't open GTViewer; I'm logged on as 99999999@DOMAIN. 00000111 is an
administrator on the PC. It shows the process GTViewer.exe running in
Task
Manager, but the application window doesn't open. The task runs properly
if
I run it as the same person who is logged on (that is, GTViewer opens in a
full window).

Any help or suggestions would be appreciated. I've not found this type of
problem documented anywhere.

Scheduled tasks are meant to be run in the background, not
in the foreground. You can interact with them in the foreground
if you make them run under the same account as your foreground
logon account. If they run under a different account then any
interaction with the foreground session is prohibited. If it was
allowed then this would create an immediate security issue:
The foreground session could use/abuse the privileges of the
account used for the background session.
 
Thank you. I was assuming I couldn't do what I wanted since I tried
everything I could think of, but needed verification.
 
Back
Top