全屏启动 Microsoft Edge

问题描述 投票:0回答:6

我正在修理几台用作数字标牌的计算机。因此,我需要一个脚本来在启动时全屏启动 Microsoft Edge。我在设置中设置为默认网站,但我不知道如何全屏启动应用程序,有什么想法吗?

windows-10 microsoft-edge
6个回答
8
投票

通过稍微更改https://superuser.com/questions/1090711/start-microsoft-edge-maximized-on-first-run上发布的脚本,我能够在启动时全屏显示Microsoft Edge应用程序。

start microsoft-edge:http://google.com
>> $wshell = New-Object -ComObject wscript.shell;
>> $wshell.AppActivate('Google - Microsoft Edge')
>> Sleep 2
>> $wshell.SendKeys('{F11}')

感谢 如何发送 CTRL 或 ALT + 任何其他键?我找到了 F11 的正确键并使脚本正常工作。


5
投票

Powershell 脚本示例:

start microsoft-edge:https://netflix.com/browse

$wshell = New-Object -ComObject wscript.shell;

$wshell.AppActivate('edge') 

while ($true)
{
    Sleep 2
    $wshell.SendKeys('{f11}')
    exit 
}

exit

4
投票

这是 Google 搜索中非常受欢迎的帖子,所以我想我应该将我的解决方案添加到这个问题中。 Windows 10 1809+ 包含新的 Kiosk 模式,管理员可以在其中指定要运行的用户帐户、要运行的应用程序和要运行的网站。这对于在指定时间关闭和打开的数字显示器非常有用。

完整说明在这里:

https://learn.microsoft.com/en-us/windows/configuration/kiosk-single-app

当前说明如下。请注意,上面的链接中的 PowerShell 脚本也可以执行此操作。


在电脑设置中设置分配的访问权限

  • 转到“开始”>“设置”>“帐户”>“其他用户”。
  • 选择设置信息亭 > 分配的访问权限,然后选择开始。
  • 输入新帐户的名称。
    • 注意:如果设备上已有任何本地标准用户帐户,“创建帐户”页面将提供选择现有帐户的选项。
  • 选择自助服务终端帐户登录时将运行的应用程序。只有可以在锁定屏幕上方运行的应用程序才会出现在可供选择的应用程序列表中。有关详细信息,请参阅选择分配访问权限的应用程序的指南。如果您选择 Microsoft Edge 作为展台应用程序,则需要配置以下选项:
    • Microsoft Edge 是否应全屏显示您的网站(数字签名)或使用某些可用的浏览器控件(公共浏览器)
    • 自助服务终端帐户登录时应显示哪个 URL
    • Microsoft Edge 在一段时间不活动后应重新启动(如果您选择作为公共浏览器运行)
  • 选择关闭。

要删除分配的访问权限,请选择“设置信息亭”页面上的帐户磁贴,然后选择“删除信息亭”。


0
投票

这个解决方案不再有效。问题是 Sendkeys 命令。 Windows 10 上的通用应用程序不支持它。根据此链接:https://answers.microsoft.com/en-us/edge/forum/all/always-on-full-screen-mode-in-ms -edge/0650c85e-fe80-451d-a65a-ea2687dd02e1 除非通过 GPO,否则无法在全屏模式下启动 Edge。


0
投票

上面的脚本确实有效,但您必须先遵循一个简短的过程,

将脚本放在启动文件夹中,(使用文件资源管理器并在地址栏中输入 shell:startup)。

手动运行脚本,当边缘以最小化模式打开时,将其最大化。

然后关闭边缘并再次运行脚本,这次它将以最大化模式打开。

重新启动并观看神奇的工作。


0
投票
`<sus.xbox.edge+!>

<?xml version='1.0' encoding='utf-8'?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" IgnorableNamespaces="uap10">
  <Identity Name="Microsoft.MicrosoftEdge.Stable" ProcessorArchitecture="x64" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="117.0.2045.34" />
  <Properties>
    <DisplayName>Microsoft Edge</DisplayName>
    <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
    <Description>Reserved</Description>
    <Logo>VisualElements\StoreLogo.png</Logo>
  </Properties>
  <Resources>
    <Resource Language="en-us" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily MaxVersionTested="12.0.0.0" MinVersion="10.0.17701.0" Name="Windows.Core" />
    <TargetDeviceFamily MaxVersionTested="12.0.0.0" MinVersion="10.0.17701.0" Name="Windows.Holographic" />
    <TargetDeviceFamily MaxVersionTested="12.0.0.0" MinVersion="10.0.17701.0" Name="Windows.Xbox" />
    <PackageDependency MinVersion="14.0.25426.0" Name="Microsoft.VCLibs.140.00" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
  </Dependencies>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <rescap:Capability Name="packageManagement" />
    <uap4:CustomCapability Name="Microsoft.deployFullTrustOnHost_8wekyb3d8bbwe" />
  </Capabilities>
  <Applications>
    <Application EntryPoint="Windows.FullTrustApplication" Executable="msedge.exe" Id="MSEDGE" uap10:RuntimeBehavior="packagedClassicApp" uap10:TrustLevel="mediumIL">
      <uap:VisualElements BackgroundColor="transparent" Description="Microsoft Edge" DisplayName="Microsoft Edge" Square150x150Logo="VisualElements\Square150x150Logo.png" Square44x44Logo="VisualElements\Square44x44Logo.png">
        <uap:DefaultTile Square310x310Logo="VisualElements\Square310x310Logo.png" Square71x71Logo="VisualElements\Square71x71Logo.png" Wide310x150Logo="VisualElements\Wide310x150Logo.png">
          <uap:ShowNameOnTiles>
            <uap:ShowOn Tile="square150x150Logo" />
            <uap:ShowOn Tile="wide310x150Logo" />
            <uap:ShowOn Tile="square310x310Logo" />
          </uap:ShowNameOnTiles>
        </uap:DefaultTile>
        <uap:SplashScreen Image="VisualElements\Wide310x150Logo.scale-400.png" />      </uap:VisualElements>
      <Extensions>
        
        
        <Extension Category="windows.preInstalledConfigTask" EntryPoint="background_updater_wcos.PreInstallConfigTask" /><com:Extension Category="windows.comServer">
          <com:ComServer>
            <com:ExeServer Executable="notification_helper.exe">
              <com:Class Id="628ACE20-B77A-456F-A88D-547DB6CEEDD5" />
            </com:ExeServer>
          </com:ComServer>
        </com:Extension>
        <com:Extension Category="windows.comServer">
          <com:ComServer>
            <com:ExeServer Executable="background_updater.exe" LaunchAndActivationPermission="O:SYG:SYD:(A;;11;;;IU)(A;;11;;;S-1-15-2-543634040-274359014-2226501544-3561766748-3991453649-3543631192-522786984)S:P(ML;;NX;;;ME)">
              <com:Class Id="508E276B-96B3-46B4-A254-833BE08DB03B" />
            </com:ExeServer>
          </com:ComServer>
        </com:Extension>
        
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="htm">
            <uap:SupportedFileTypes>
              <uap:FileType>.htm</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="html">
            <uap:SupportedFileTypes>
              <uap:FileType>.html</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="pdf">
            <uap:SupportedFileTypes>
              <uap:FileType>.pdf</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\pdf.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="shtml">
            <uap:SupportedFileTypes>
              <uap:FileType>.shtml</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="svg">
            <uap:SupportedFileTypes>
              <uap:FileType>.svg</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="webp">
            <uap:SupportedFileTypes>
              <uap:FileType>.webp</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="xht">
            <uap:SupportedFileTypes>
              <uap:FileType>.xht</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        <uap3:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="xhtml">
            <uap:SupportedFileTypes>
              <uap:FileType>.xhtml</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="open" Parameters="-- &quot;%1&quot;">open</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap3:Extension>
        
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="ftp" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>ftp</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="http" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>http</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="https" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>https</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="irc" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>irc</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="mailto" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>mailto</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="microsoft-edge" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>microsoft-edge</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="mms" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>mms</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="news" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>news</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="nntp" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>nntp</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="sms" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>sms</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="smsto" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>smsto</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="tel" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>tel</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="urn" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>urn</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap3:Extension Category="windows.protocol">
          <uap3:Protocol Name="webcal" Parameters="-- &quot;%1&quot;">
            <uap:DisplayName>webcal</uap:DisplayName>
            <uap:Logo>VisualElements\htm.png</uap:Logo>
          </uap3:Protocol>
        </uap3:Extension>
        <uap5:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication" Executable="msedge.exe">
          <uap5:AppExecutionAlias>
            <uap5:ExecutionAlias Alias="EdgeStable.exe" />
          </uap5:AppExecutionAlias>
        </uap5:Extension>
      </Extensions>
    </Application>
  </Applications>
  <Extensions>
    <uap10:Extension Category="windows.hostRuntime" EntryPoint="Windows.FullTrustApplication" Executable="pwahelper.exe" uap10:RuntimeBehavior="packagedClassicApp" uap10:TrustLevel="mediumIL">
      <uap10:HostRuntime Id="PWA" />
    </uap10:Extension>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>background_updater_winrt.dll</Path>
        <ActivatableClass ActivatableClassId="background_updater_wcos.PreInstallConfigTask" ThreadingModel="MTA" />
      </InProcessServer>
    </Extension>
    <uap6:Extension Category="windows.loaderSearchPathOverride">
      <uap6:LoaderSearchPathOverride>
        <uap6:LoaderSearchPathEntry FolderPath="" />
      </uap6:LoaderSearchPathOverride>
    </uap6:Extension>
    <Extension Category="windows.publisherCacheFolders">
      <PublisherCacheFolders>
        <Folder Name="DefaultChannel" />
      </PublisherCacheFolders>
    </Extension>
  </Extensions>
</Package>
© www.soinside.com 2019 - 2024. All rights reserved.