How to force a program to start and run minimized on start up

Search This thread

heartpumper77

Member
Nov 17, 2007
33
0
I was wondering what type of changes I have to make to the registry or the lnk or exe file to get a program to run on startup and minimized?

Thanks
 

irus

Senior Member
Jun 29, 2007
1,950
3
well this is how i do it, make a mortscript that runs that app waits a couple of seconds then use vijay555 ok button app to close it. thats the best way i know how.
 

kareeem

Retired Senior Moderator
Oct 19, 2006
4,027
56
33
Southern California
It doesn't really have to do with the registry and is pretty simple. Just get the .lnk or .exe and navigate to Windows>Startup and whatever you want to start up, just place the shortcut there.
 

sean222

Senior Member
Yea it can be done with MortScript. I did it. Your script should look something like:

Run ( HiCalculator.exe )
Sleep ( 5000 )
Minimize ( HiCalc )

You have to refer to the mortscript manual for more info.
Basically the above script starts the program, waits 5 seconds, then mortscript will look for the window title and minimize the window :D
 

mr_deimos

Senior Member
Nov 22, 2007
386
101
Yea it can be done with MortScript. I did it. Your script should look something like:

Run ( HiCalculator.exe )
Sleep ( 5000 )
Minimize ( HiCalc )

You have to refer to the mortscript manual for more info.
Basically the above script starts the program, waits 5 seconds, then mortscript will look for the window title and minimize the window :D

Even better way to do this is to use the WaitForActive() command. It waits for a window to become active, but no longer than a defined time period.
Code:
Run ("HiCalculator.exe")
WaitForActive ("Hicalc", 5000)
Minimize ("HiCalc")
This way if the window is displayed after 1 second, the script minimizes it and ends. Your version would always wait 5 seconds before minimizing the program, no matter how fast it's launched - why waste so much time? :D
 

sean222

Senior Member
Even better way to do this is to use the WaitForActive() command. It waits for a window to become active, but no longer than a defined time period.
Code:
Run ("HiCalculator.exe")
WaitForActive ("Hicalc", 5000)
Minimize ("HiCalc")
This way if the window is displayed after 1 second, the script minimizes it and ends. Your version would always wait 5 seconds before minimizing the program, no matter how fast it's launched - why waste so much time? :D

Nice! Thanks ;) As you know the Mortscript manual is huge, I just skimmed through it :D