Solved

Repost: Order of Start Up Applications

Posted on 1998-11-30
5
206 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
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 50 total points
ID: 1648151
ok, thanks...
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
virus question? 6 81
robocopy 33 115
Windows Password recovery 7 52
how to count files? 4 30
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

840 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