win7 Pro 32bitを使用しています。ac:\record.bat ファイルがあります。このバット ファイルは、いくつかのパラメータを指定して ffmpeg.exe を実行し、デスクトップ画面をキャプチャしてビデオ .mp4 ファイルに保存します。
管理者アカウントでログオンすると、うまく機能します。タスク マネージャーは、ffmpeg.exe が管理者アカウントで実行されていることを示しています。ffmpegプロセスを突然強制終了できます。これはとても正常です。
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.