Windows 10 で実際に最小化されたプログラムを起動するにはどうすればよいでしょうか?

Windows 10 で実際に最小化されたプログラムを起動するにはどうすればよいでしょうか?

起動時に読み込まれるが最小化されるプログラム (例: Thunderbird) を作成しようとした手順:

  1. ショートカットは次の場所に配置されています: C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  2. ショートカットのプロパティで「最小化」をチェックしました

Windows を再起動すると、起動しますが、最大化されています。最小化することはできません。MacOS では非表示に設定できましたが。

答え1

あなたの方法は私には正しく機能しないようです。次のバッチ (.bat) ファイルを添付して、ユーザーのログオン時に実行されるスケジュールされたタスクを作成できます。

start /min "" "C:\Program Files\Mozilla\Thunderbird.exe"

次に、appdata パスを介して起動時に Thunderbird プログラムが実行されないように無効にします。

コードのその他のオプション:

これを.ps1として保存します

@echo off
start thunderbird
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('*Mozilla Thunderbird')
Sleep 2
$wshell.SendKeys('(%(" "(n)))')

**Thunderbird が開いたときに、セットアップの電子メール ボックスが存在しない (クライアントが構成されている) こと、およびデフォルトのメール アプリケーションのプロンプトが表示されていないことを確認してください。

答え2

構文の順序を変更したら、うまくいきました。Start-Process -WindowStyle Minimized thunderbirdこれはバグのようです。規定の構文の順序 (を参照Get-Help Start-Process) は、実際に機能するものと異なります。

答え3

以下は、Windows 8.1 のスタートアップ構成に追加したスクリプトです。

'
' A VBS script to start Thunderbird minimized to the tray at boot time.
'
' Thunderbird is unusual in that the GUI minimize hyphen (-) button already takes it
' to the tray rather than the task bar like most other programs. All this script has
' to do is open Thunderbird normally and immediately minimize it using the hotkey
' sequence ALT+SPACE+N.
'
' Create the WSH hosting environment
Set objShell = WScript.CreateObject("WScript.Shell")
'
' Open Thunderbird
Set objShellApp = CreateObject("Shell.Application")
objShellApp.ShellExecute "C:\Program Files\Mozilla Thunderbird\thunderbird.exe", "", "", "", 1
'
' Force Thunderbird to become the active window.
Do Until Activated
    Activated = objShell.AppActivate("Mozilla Thunderbird")
Loop
'
' Send the hotkey sequence to minimize the active window.
objShell.SendKeys "% N"
'
' All done. Thunderbird collapses to an icon in the system tray.

' To do this at system boot time, a shortcut to "Start_TBird_Minimized.vbs" is placed
' in the Windows startup folder, typically located here:
'       %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
'
WScript.Quit 0

関連情報