[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Repost: Order of Start Up Applications

Posted on 1998-11-30
5
Medium Priority
?
229 Views
Last Modified: 2013-12-28
This is a repost of my earlier question: Order of Start Up Applications.  Please submit your comments, and I will issue a message to the most suitable answerer to then obtain the points.

Thanks

Tom
0
Comment
Question by:McDorman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:linschoten
ID: 1648147
I think you can order the startup by moving the icons. However you can either run the jobs from a batch file and put a shortcut to the batch file in the startup group or you can run the individual programs from the RUN and/or LOAD commands in the WIN.INI file

0
 
LVL 3

Expert Comment

by:arunm
ID: 1648148
Ok here I go again:-

Writing a utility to start programs in a particular order, and then pausing between the start of each program to ensure they appear in the correct order, is pretty easy. The follow program takes a list of program paths and delays as arguments. The easiest method to use it is to place a shortcut to this program in the startup directory with the correct target info. For example;-

A target string could look like.

c:\myprogs\thisprogram.exe c:\program files\first_program.exe 2 c:\program files\second_program.exe 3 c:\program files\third_program.exe 0

This would start c:\program files\first_program.exe wait 2 secs, then start  c:\program files\second_program.exe wait 3 secs and then finally start c:\program files\third_program.exe

If you dont have a vc++ complier I can email you a working version of
this. Or if you need any more help on how to use it, let me know.

    #include <afx.h>
    #include <iostream.h>
    #include <winbase.h>
    #include <process.h>


    int main(int argc, char *argv[])
    {
     PROCESS_INFORMATION ProcessInfo;
     STARTUPINFO  InfoToPass;
     int   seconds;
     int   currentArg = 1;



     // Initialise Startup structure
     InfoToPass.cb = sizeof(InfoToPass);
     InfoToPass.lpReserved = NULL;
     InfoToPass.lpDesktop = NULL;
     InfoToPass.lpTitle = NULL;
     InfoToPass.dwFlags = STARTF_USESHOWWINDOW;
     InfoToPass.cbReserved2 = 0;
     InfoToPass.lpReserved2 = NULL;
     InfoToPass.wShowWindow = SW_SHOWNORMAL;

     // Spawn required process as a normal process

     while (currentArg < argc)
     {
      // You could also use winexec here, but i prefer the control achived using
      CreateProcess(argv[currentArg++], "", NULL, NULL, FALSE,
       CREATE_NEW_CONSOLE, NULL, NULL, &InfoToPass, &ProcessInfo);


      sscanf(argv[currentArg++],"%d", &seconds);

       // wait
      Sleep(seconds * 1000);
     }

     return (0);

    }


Note:- I prefer to use createprocess() over winexec() due to the additional control it gives you over the process. Also, replacing  SW_SHOWNORMAL with SW_SHOWMINISMED allows an application to start minimsed on the task bar. It would be quite simple to add this to the list of arguments at start up.
0
 
LVL 2

Expert Comment

by:rlippert
ID: 1648149
actually a program already exists to do just that and is freeware.  Its called DoWinStartup and is available at
http://www.mrdo.com/dowinstartup
has alot of other cool features (like delayed loading of programs) and is much beter than writing your own program IMHO.
0
 

Author Comment

by:McDorman
ID: 1648150
I'm going to reject this answer due to 2 other better answers.  rlippert would you please post your comment as an answer to this question.  Arunm, I'll give your answer the points on the original answer to this question.

Although both your answers were very good, I took my wife's computer off the ISDN network and gave her a regular modem, which works well from within Outlook itself.

Thanks

Tom
0
 
LVL 2

Accepted Solution

by:
rlippert earned 200 total points
ID: 1648151
ok, thanks...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question