Last active
January 13, 2022 04:58
-
-
Save hunandy14/e87ed5590511aa7302029060304ffa28 to your computer and use it in GitHub Desktop.
Edge 開啟 Global Media Control 模式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.reddit.com/r/edge/comments/s0dmqz/global_media_controls_missing_in_970107255 | |
# 新版本的被禁用功能了 只能從啟動參數處理了... | |
$shortcutName = "Edge_MediaControls" | |
$edgePath = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" | |
$edgeArgs = "--enable-features=GlobalMediaControls" | |
$shell = New-Object -ComObject WScript.Shell | |
$userDsk = [Environment]::GetFolderPath("Desktop") | |
$shortcut = $shell.CreateShortcut("$userDsk\$shortcutName`.lnk") | |
$shortcut.TargetPath = $edgePath | |
$shortcut.Arguments = $edgeArgs | |
$shortcut.Save() | |
Get-Process|Where-Object{$_.ProcessName.Contains("msedge")} | Stop-Process | |
Start-Process $edgePath -ArgumentList:$edgeArgs |
Author
hunandy14
commented
Jan 13, 2022
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment