Joe
Joe

Reputation: 442

Can't manage to make CMD launch a program using start

I made a .bat file which is supposed to run Thunderbird minimized. Here's what I put in it so far:

start /min "" C:\"Program Files (x86)"\"Mozilla Thunderbird"\thunderbird.exe runas /user:Administrator

I tried several tests:
- Removing /min
- Adding the runas option for administrator rights
- Adding the first empty quotes after start
- Writing the whole path into quotes
- ...etc.

Everything that happens is the .bat launches, but nothing furthermore happens. I have no error in the CMD window.

Why isn't it working ?? My purpose is to put that .bat in startup folder so that Thunderbird launches minimized on startup.

I used to use an extension (MinimizeOnStartup) for Thunderbird, but it's no longer compatible with latest version and I couldn't manage to find any alternative.

I read through here, it wasn't enough to help: A batch file to minimize other applications

Can you help me? Thank you.

Using Windows 10.

Upvotes: -1

Views: 961

Answers (2)

wsmwk
wsmwk

Reputation: 101

A solution posted on reddit https://www.reddit.com/r/Thunderbird/comments/bnt6u3/ive_created_a_small_script_to_minimize/ ...

This is Windows only. You'll need NirCMD for this. NirCMD will trigger the "Minimize" Event after we've started Thunderbird. Get it here: https://www.nirsoft.net/utils/nircmd.html

The script:

START "" "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" timeout /T 3 /nobreak "nircmd.exe" win min process "thunderbird.exe"

Upvotes: 0

user5997635
user5997635

Reputation:

Try the following (modify it accordingly)

cd C:\Program Files (x86)\Mozilla Thunderbird\    
start /min thunderbird.exe runas /user:Administrator

Upvotes: 0

Related Questions