Created
February 6, 2025 01:10
-
-
Save eyasuyuki/bb36d0a84d37ba42376cb81b263f0815 to your computer and use it in GitHub Desktop.
Windows 11でタスクバーを上に表示させるJScript
This file contains 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
var WshShell = new ActiveXObject("WScript.Shell"); | |
var regPath = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3"; | |
var value = "00000000 00000000 03000000 00ffffff ffffffff ffffffff 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000"; | |
try { | |
// レジストリに新しい値を書き込む | |
WshShell.RegWrite(regPath, value, "REG_BINARY"); | |
// エクスプローラーを再起動 | |
WshShell.Run("taskkill /F /IM explorer.exe", 0, true); | |
WshShell.Run("explorer.exe", 0, false); | |
WScript.Echo("タスクバーを上部に移動しました。"); | |
} catch (e) { | |
WScript.Echo("エラー: " + e.message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment