【问题标题】:Allow a windows service to interact with desktop in Perl允许 Windows 服务与 Perl 中的桌面交互
【发布时间】:2015-02-05 21:49:01
【问题描述】:

我有一个 Windows 服务正在运行,它的部分操作是打开一个 Internet Explorer 窗口。这一切都很好,除了 Internet Explorer 窗口(从服务调用时)没有出现!可以看到启动成功了,在任务管理器里可以看到,但是好像窗口被隐藏了一样。

#!/usr/bin/perl

use Win32;

my $prog="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe";
my $arg="";

Win32::Spawn( $prog, $arg, $pid );

注意:我无法将该 Windows 服务作为“本地系统帐户”运行,该服务具有“允许服务与桌面交互”选项,我必须指定用户名,如附图中所附的其他原因,但我登录了进入同一账号的机器(aa\tour)。

有没有办法在前台看到 iexplore 窗口?谢谢。

【问题讨论】:

    标签: windows perl windows-services


    【解决方案1】:

    没有。您遇到了Session 0 Isolation,这是一项安全增强功能,可防止从 Windows 服务启动的应用程序出现在“常规”用户的桌面上。曾几何时(在 Windows Vista 之前)"Allow Service to Interact with desktop" 设置将使您的 IE 窗口显示在控制台会话中,但是现在隔离已经到位,这不再像人们期望的那样工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-24
      • 2010-10-07
      • 2013-11-19
      相关资源
      最近更新 更多