I use win7 Pro 32bit. I have a c:\record.bat file. This bat file run ffmpeg.exe with some parameters to capture desktop screen and save to video .mp4 files.
When I logon with Administrator account, it works well. The Task Manager show that ffmpeg.exe is running with Administrator Account. I can suddently kill ffmpeg process. This is so normal.
When I logon with an User account, I can also run it and works well. The Task Manager show that ffmpeg.exe is running with User Account. I can also kill it. This is so normal too.
Now, when still in User session, I want to run the record.bat file with Administrator privilege to let the User can not kill that process. So I make a test, I open CMD , then use runas command :
runas /user:administrator c:\record.bat
It prompt for Administrator password, I type the password and it works well. I can see the ffmpeg.exe process running with Administrator account.
But, now I also can kill that process !!! althought I am now a User and ffmpeg.exe process run under Administrator privilege. This is so strange, because on WinXP SP3, with the same test schema, User account can not kill that process (which runas under Administrator Account).
Can you show me howto fix this ? The target is I wish to run that batch file in User session to capture their screen but they can not kill that process. I have done this successful on winXP. But on Win7 this fails.
Hope you pro can help me.
Thanks.