How can you delay a program to start in the startup floder?

sumyunguyz
sumyunguyz used Ask the Experts™
on
I need to delay a program to start running automatically when my machine boots up. One program needs another to run automatically, but the one I need to load first unfortunatly always loads last. Is there a DOS command or a bat file that I can put in the autoexec or startup that will delay the program that I need to load last on startup?
Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Could you please list the names of the programs that you need to have at startup here?
BTW - there is no email notification on this site.  It is down for now (and has been since last Friday.)  Hopefully you will check this queue soon :)

Author

Commented:
From: shekerra  Date: 05/06/2001 11:53PM PST  
Could you please list the names of the programs that you need to have at startup here?  

"The programs are industrial applications. One is a Dialogic speech processor ISA board program, which must run before the other program runs."
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Commented:
the programs will run in the order u mention them in the autoexec.bat , so  write the program u want to load first
at the first line.

This one looks good:
http://www.createwindow.com/raewebsite/rae-watx.htm
And maybe this one:
http://www.robvanderwoude.com/index.html (look for "wait page")
yashraj,
I have deleted the advertising section of your post.  This is not authorized.  Hope you understand.  

Thank You
Computer101
Community Support Moderator
Commented:

sumyunguyz,

If you can launch your programs from Windows, you can use the START command
to run the first one and have it wait until its finished before the other runs.
You can launch them from the StartUp directory
or from WIN.INI or using the Registry.
Example syntax would be like:

START /w /m C:\FOLDER\PROGRAM1.EXE
START /m C:\FOLDER\PROGRAM2.EXE

The /w switch won't allow the program to return to the os until its finished.
The /m switch runs the program in the background.
Type START/? at a prompt for more about it.

But the START command won't work in DOS mode, so it may not help you
if you need to launch both programs before Windows starts.
Or perhaps you can run the first program from AUTOEXEC.BAT
and the other when Windows starts.

I have a batch script that will do a loop delay, but if you need to run the programs from
AUTOEXEC.BAT then you should be able to make it work using CHOICE to create a delay.
Place the following line after the command to launch the first program:

CHOICE.COM /N /CY /TY,10 >nul

That will halt things for 10 seconds, then automatically continue...
Adjust the number of seconds you want it to delay.
Post back if you want more about it or the batch loop.
 
Yashraj,
Here you go locking up the queue again so that other experts cannot assist sumy - I am going to post a 0 pointer so that other experts can come and help.


>Bev
LeeTutorretired
Top Expert 2009

Commented:
Rin1010, you say "But the START command won't work in DOS mode, so it may not help you if you need to launch both programs before Windows starts."  I am pretty sure you CAN use the START command under DOS.  Since Sumyunguyz asked if he could use a batch file in the Startup folder, then apparently this solution would work for him.  Just put the two Start commands in a batch file, and put a shortcut to the batch file in the Startup folder.

Author

Commented:
Thank you for going being a little more detail in your answer. Works great!

Commented:

You're welcome, sumyunguyz.... Very glad it helped... Please post back here
if there's a chance I can provide more on it, or if you require more on
batch commands in Windows or whatever.

LeeTutor, you say you're "pretty sure you CAN use the START command under DOS."
If you test it, you'll be 100% sure... The START program is a Windows app
and, as such, won't run in DOS mode.

Regarding your comment; "Just put the two Start commands in a batch file,
and put a shortcut to the batch file in the Startup folder." That's what I was illustrating...
Using START to launch the program was simply to take advantage of its /Wait option.
But I'll note that a shortcut to the batch file isn't necessary...
Just put the batch file in the StartUp folder.

Alternatively, if you want to use a "shortcut" to launch a DOS program
and run it when Windows starts (e.g., from StartUp or WIN.INI or the Registry)
then you can just enter the command in the PIF properties
and launch the PIF when Windows starts. Using the previous example,
in the Cmd Line field on the PIF properties' Program tab, you could use:

START /w /m C:\FOLDER\PROGRAM1.EXE

Anyway, let us know if you want more about it or anything else...
You can post here and hopefully the email notification works,
or submit a low point question (this one has cost you enough)
in the MS-DOS topic area, which I occasionally frequent --
(is that an oxymoron?) and I'll try to help...
 
LeeTutorretired
Top Expert 2009

Commented:
Rin1010 (and anyone else who reads this question and wants the info), the info about using the Start command in DOS mode came from an article I read.  Now, I have tested using Start at the MSDOS prompt, in order to start up NotePad, and it worked...

Commented:

~   LeeTutor...  You're confusing DOS mode with a DOS window...
DOS mode is when, for example, you boot to a Command Prompt Only
or choose "Restart in MS-DOS mode" from the Shut Down menu in Windows 98.
What you "tested" is running the commands in a DOS window from within Windows...
Neither the Start application nor Notepad will run outside of Windows (i.e., in DOS mode) ...
 
LeeTutorretired
Top Expert 2009

Commented:
Ah, thanks for the clarification.  But does the answer to this question require DOS mode?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial