A batch file to minimize other applications
Solution 1
Try:
start /min "" firefox
.. or (if FireFox is your default browser):
start /min "" "http://google.com"
Solution 2
here is how i solved the problem using a command line tool known as nircmd,i used the hide parameter to hide the firefox and it acctully works perfectly.see the code example.
START "" "C:\Program Files\Mozilla Firefox\firefox.exe" -P "america" -no-remote http://hakikahost.com error.html
"nircmd.exe" win hide process "firefox.exe"
the link to nircmd ...link
Solution 3
The proper parameter would be -turbo
, but it is long obsolete and probably not functional.
start "path\firefox.exe http://example.com/file.html" /MIN
might work better.
EDIT: Oops, it has already been suggested.
Solution 4
Have you tried:
start /min C:\Program Files\Mozilla Firefox\firefox.exe
using the forward slash?
Solution 5
Did you have a look at https://tn123.org/mintrayr/ addon? This can minimize firefox to try.
Jimmy Obonyo Abor
Full stack web/mobile developer, cloud solutions architect. I am vastly experienced in server/web/mobile/cloud/containerization technologies, conversant with functional and object oriented methodologies , test driven programming, ci/cd technologies and processes. Worked on singular and team settings, able to thrive in a fast-paced environment, looking to create world-class applications. Am passionate about programming, loves to learn, enjoys the challenge and artistry inherent in the creation process. Can do attitude, reliable, self starter. My favorite stacks are Nodejs, Python, Go-lang,Meteor, React,React Native,Vue, Laravel (Php) , Jest, Mocha.
Updated on March 11, 2020Comments
-
Jimmy Obonyo Abor about 4 years
How can i have a bat file which opens an application lets call it firefox.exe.how would i call the bat file or any other script ie vbs to minimize the application ie firefox.exe then after lets say a minute or two close it.please mind you the
start\min
does not work?below is an example /part of my script?please help out?"C:\Program Files\Mozilla Firefox\firefox.exe" -tray
-
Jimmy Obonyo Abor about 11 yearsfunny enough your code minimizes the cmd prompt but not the firfox?
-
Jimmy Obonyo Abor about 11 yearsit opens the url in a new window which does not minimize ,and it opens with a default window.not what am loking for!
-
Jimmy Obonyo Abor about 11 yearsopens firefox ,but does not minimize the firefox window!
-
Ansgar Wiechers about 11 yearsWhy do you use
SendKeys
to restore and close a window when you already have aWshScriptExec
object that you can simplyTerminate
? -
Panayot Karabakalov about 11 years@AnsgarWiechers - Only because that not work for me, see my update.
-
Jimmy Obonyo Abor about 11 yearswhat platform are you using?am using windows xp,and doesnt seem to work?
-
anishsane about 11 yearsThe addon adds a minimize to tray feature to firefox.
-
Endoro about 11 yearsalso xp, both are working, but not, if FireFox is already open.
-
Jimmy Obonyo Abor about 11 yearsok thanks!guess there is something wrong machine,coz it doesnt minimize whichever way,will try in another machine.did the firefox
tray
parameter work? -
anishsane about 11 yearsOh... that addon has an option, to "always start minimized". In case it is ok with you.
-
anishsane about 11 yearsoh wait... I think, it was some other addon, with similar functionality... But google for "firefox minimize to tray" :)
-
Jimmy Obonyo Abor about 11 yearsdoes this command line work from your end
"C:\Program Files\Mozilla Firefox\firefox.exe" -tray
using the -tray parameter?pliz reply -
anishsane about 11 yearsnopes... FF doesn't support this option.. See this: kb.mozillazine.org/Command_line_arguments
-
Jimmy Obonyo Abor about 11 yearsdoes using the firefox
tray
parameter work from your end?pliz reply? -
Endoro about 11 yearsno, it doesn't. there is no
/tray
option in thestart
command. Minimize to tray is in the responsibility of a windows application, not of cmd. -
Jimmy Obonyo Abor about 11 yearsno the
tray
is a ff commandline parameter see the link kb.mozillazine.org/Command_line_arguments but it doesnt seem to work! -
Panayot Karabakalov about 11 yearsPerhaps this works on concrete case? I'm too on XP and this not work. My Firefox is 3.5.2 portable (if that relevant).
-
Ansgar Wiechers about 11 yearsHmm... both works just fine for me. I tested with SeaMonkey, not Firefox, though.
-
Panayot Karabakalov about 11 years@AnsgarWiechers - Can you test unruly Firefox as well.
-
Ansgar Wiechers about 11 yearsWorks with Firefox 20.0 as well (fresh install on Server 2003).
-
anishsane over 10 yearsChange
Program Files
&Mozilla Firefox
to 8.3 notation, to avoid space in the path. Or see Endoro's answer. -
Ray Woodcock over 3 yearsApparently the relationship between NirCmd and FF has changed over the years. For me, using FF 85 on Win10 20H2, this command closed FF and erased all open tabs. What worked for me was nircmd win min process firefox.exe