Solved

Repost: Order of Start Up Applications

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Compiling PHP with Curl plus protocols 8 25
Network adapter failed to start 5 39
system default settings 4 26
autocad mechanical 2014 installation issue 5 22
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

726 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