Prev: Language icon not on system tray
Next: n/g for Windows 7 - my search doesnt find one - is one out there?
From: Marcus on 12 May 2010 02:46 Hi I am trying to launch notepad.exe and if someone closes it, I will bring it back up (polling one time every minute). For this I am using schtasks When I run schtasks as the currently logged in user I have no problem at all. I am using the following command: schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT \notepad.exe\"" But I want to start this as system user. I therefore add the /ru system to the end of the command. The command now looks the following: schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT \notepad.exe\"" /ru system The problem is that even though this command will launch a notepad.exe (I see it in the process list), the notepad.exe application is not visible on screen, nor is it visible in the taskbar. Why is this, and how can I make it visible when running it as user "system"?
From: Pegasus [MVP] on 12 May 2010 05:11 "Marcus" <marcussilfver(a)gmail.com> wrote in message news:aa4e3e66-db72-42ca-bd07-370ef7c1cfe5(a)b18g2000yqb.googlegroups.com... > Hi > > I am trying to launch notepad.exe and if someone closes it, I will > bring it back up (polling one time every minute). > > For this I am using schtasks > > When I run schtasks as the currently logged in user I have no problem > at all. I am using the following command: > schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT > \notepad.exe\"" > > But I want to start this as system user. I therefore add the /ru > system to the end of the command. The command now looks the following: > schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT > \notepad.exe\"" /ru system > > The problem is that even though this command will launch a notepad.exe > (I see it in the process list), the notepad.exe application is not > visible on screen, nor is it visible in the taskbar. > > Why is this, and how can I make it visible when running it as user > "system"? This is by design: Tasks running under a different account must remain in the background. If they ran in the foreground then the user in the foreground session could exploit the user priviliges of the background session that are possibly higher than his own.
From: Marcus on 12 May 2010 08:57
On 12 Maj, 11:11, "Pegasus [MVP]" <n...(a)microsoft.com> wrote: > "Marcus" <marcussilf...(a)gmail.com> wrote in message > > news:aa4e3e66-db72-42ca-bd07-370ef7c1cfe5(a)b18g2000yqb.googlegroups.com... > > > > > > > Hi > > > I am trying to launch notepad.exe and if someone closes it, I will > > bring it back up (polling one time every minute). > > > For this I am using schtasks > > > When I run schtasks as the currently logged in user I have no problem > > at all. I am using the following command: > > schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT > > \notepad.exe\"" > > > But I want to start this as system user. I therefore add the /ru > > system to the end of the command. The command now looks the following: > > schtasks /create /sc minute /mo 1 /tn "notepad_task" /tr "\"C:\WINNT > > \notepad.exe\"" /ru system > > > The problem is that even though this command will launch a notepad.exe > > (I see it in the process list), the notepad.exe application is not > > visible on screen, nor is it visible in the taskbar. > > > Why is this, and how can I make it visible when running it as user > > "system"? > > This is by design: Tasks running under a different account must remain in > the background. If they ran in the foreground then the user in the > foreground session could exploit the user priviliges of the background > session that are possibly higher than his own.- Dölj citerad text - > > - Visa citerad text - Thanks for answering. now when I think about it, it is pretty obvious. If the application GUI was brought up by schtasks, and lets say someone started cmd.exe from schtasks then that person could do anything to the system. Thanks for the help! |