Delay Program Launch From Startup Menu

T

Tecknomage

At home and work I have a utility that launches from the Startup menu.

At work there is no problem. At home, due to other utilities that
launch at bootup the one utility hangs and cause an error when I try
to close the minimized window in the Taskbar.

Is there a way to delay the launch of an app from the Startup menu?


I have tried a CMD file that uses Sleep.exe then launches the app, but
since the app does not terminate the CMD Console does not close.

Example:

@echo off
cls

sleep 30

call "C:\Program Files\myapp\myapp.exe"

exit

---------

Works but Console remains open. Nothing after myapp is processed,
even a "pause" command.

And, using "call" or not, same result.
 
P

Pegasus \(MVP\)

Tecknomage said:
At home and work I have a utility that launches from the Startup menu.

At work there is no problem. At home, due to other utilities that
launch at bootup the one utility hangs and cause an error when I try
to close the minimized window in the Taskbar.

Is there a way to delay the launch of an app from the Startup menu?


I have tried a CMD file that uses Sleep.exe then launches the app, but
since the app does not terminate the CMD Console does not close.

Example:

@echo off
cls

sleep 30

call "C:\Program Files\myapp\myapp.exe"

exit

---------

Works but Console remains open. Nothing after myapp is processed,
even a "pause" command.

And, using "call" or not, same result.


--
======== Tecknomage ========
Computer Systems Specialist
IT Technician
San Diego, CA

You can modify your batch file like so. Note that both the "cls" and the
"exit" commands are superfluous. I suggest you do without them in order to
keep things nice and simple.
@echo off
sleep 30
start /b "My Application" "C:\Program Files\myapp\myapp.exe"
 
T

Tecknomage

Pegasus (MVP) said:
You can modify your batch file like so. Note that both the "cls" and the
"exit" commands are superfluous. I suggest you do without them in order to
keep things nice and simple.
@echo off
sleep 30
start /b "My Application" "C:\Program Files\myapp\myapp.exe"

The "My Applicattion," is that a general string-value or does it have to be
specific?

Thanks, by the way.
 
P

Pegasus \(MVP\)

Tecknomage said:
The "My Applicattion," is that a general string-value or does it have to
be
specific?

Thanks, by the way.

Why don't you give it a try to see if it works? Alternatively you could
start a Command Prompt and type start /? to see the meaning of this
parameter and find out about the many switches to the "start" command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top