获得空白(黑色)与截图自动屏幕捕捉使用任务计划 [英] Getting blank (black) screenshot with automated screen capture using task scheduler

查看:472
本文介绍了获得空白(黑色)与截图自动屏幕捕捉使用任务计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解决软件漏洞中,我们认为一个应用程序可能无法启动每次调用的时间。为了验证这一点,我创建了一系列计划任务启动的应用程序,采取截图,然后关闭应用程序。这些任务都是通过.bat文件运行。

I am trying to troubleshoot a software bug in which we think an app may not be launching every time it is called. To test this, I created a series of scheduled tasks to launch the app, take a screenshot, and then close the app. These tasks are all run through .bat files.

一切正常,除了截图罚款。当作为计划任务运行,从屏幕捕获.JPG总是显示一个黑盒子。如果我正常执行.bat文件,截图看起来很好。

Everything works fine except for the screenshots. When run as a scheduled task, the .jpg from the screen capture always shows a black box. If I execute the .bat file normally, the screenshot looks fine.

我使用的NirCmd发送屏幕捕捉的命令,并将其保存到一个文件夹。我使用的命令如下:

I am using nircmd to send the screen capture command and save it to a folder. The command I am using is as follows:

nircmd.exe savescreenshot "C:\File Path\"~$currdate.MMddyyyy$-~$currtime.HHmmss$.jpg

我使用Windows 7。

I am using Windows 7.

推荐答案

创建的任务可能是在它自己的登录会话中运行,即使在运行相同的用户。

The task created is probably running in its own logon session, even if it is running as the same user.

请您计划任务运行作为当前登录的用户。

Make your scheduled task run as the currently logged on user.

基思·布朗写道href=\"http://www.microsoft.com/msj/0599/security/security0599.aspx\" rel=\"nofollow\">登录会话的SID <老,但仍然有效的相关详细交代了。相关部分是在中间,在http://www.microsoft.com/msj/0599/security/security0599.aspx

Keith Brown wrote an old but still valid detailled explaination of the logon session SID. The relevant part is at the middle, under "http://www.microsoft.com/msj/0599/security/security0599.aspx"

您也可以拨开周围的 EnumWinStaGui 的的存取权限。

You can also poke around the access rigths with EnumWinStaGui.

这篇关于获得空白(黑色)与截图自动屏幕捕捉使用任务计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆