Link to home
Start Free TrialLog in
Avatar of hshliang
hshliang

asked on

How to re-order the start-up programs?

Is there a way (other than deleting all the programs and re-inserting them in the proper order) to re-organize the order of programs that will be call in start-up in the explorer view of start-up folder?
ASKER CERTIFIED SOLUTION
Avatar of Patricia Siu-Lai Ho
Patricia Siu-Lai Ho
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dew_associates
hshliang,

Do I presume what you mean is that you want to change the order in which various processes or programs start during the boot process?

Dennis
Avatar of Jason_S
Jason_S

This may take some trial, and error, but give it a shot.

It seems to make a diffrence as to which shortcut was either created, or copied to the Startup group in order.  try copying the shortcuts out, then back in one at a time.  I believe how it works is the one that is copied last is the one that will run first.

Sorry this isn't very definative, but it seems to work in some cases.
Avatar of hshliang

ASKER

Yes, I mean to order th programs that is called at boot startup. You certainly can not move by pointing. But I think the idea of moving them out of the explorer ( may be to the desktop) then re-drag it back to the explorer will re-order it. I will try it out. I think it is true that the order is when you copy it to the start-up folder.
That presumes though that there are no entries in the registry for those particular programs.
Actually, I have tried to move the programs out of the start-up folder and re-insert them, it does NOT work, when I check the System Configuration Utility/Startup the order is NOT changed. Can any body suggest a way the change the order of programs being called at boot time? Does it mean I have to change the registry?
hshliang, try to post your current order "System Configuration Utility/Startup the order " and what order would you like to appear. Could you explain the reason so that we can comprehand your situation more closely?   pslh
HS, the system configuration utility does not determine which program items start before any other. It just informs you of "what" is running.
HS, open regedit and drill down to this registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Here you will see most, if not all, of the items presented in MSCONFIG. There are exceptions to this, such as ICQ, MSN etc.

To reorder these, you will need to delete all of the RUN keys and re-enter them in the order you wish the items to start.
If these programs are all started in  Startup, you can create a BAT file to start programs in a perticular order.

I have done this before puting a 30 second interval between the programs as it was needed for my application.
Jason, why would you want to slow down a machine by implementing a batch file to start programs?
I had created a BAT file to start one program that needed to be up and running before another program.  After the first had loaded (about 30 seconds) I then started the other program.  the BAT file was basicaly as follows.

call fist.exe
choice /t:n,30
call second.exe

The 30 seconds was long enough for the first executable to start and can be adjusted.
Thank you for the interest, let me explain, I have written a Windows startup password protection program. I want to start it before the desktop if possible, but I was not able to change the order of the startup programs that are called. I am curious about the registry, but I hope I don't have to fiddle with the registry.
Please also tell me which of the program in the Startup list is the desktop?
The programs are listed as:
ScanRegistry
TaskMonitor
SystemTray
LoadPowerProfile
NetworkSetup
TIPS
POINTER
NETSPY
LoadPowerProfile
ICQ
Office Startup
FastFind
Shutdown (my program)
What is the easiest way to move the Shutdown program to before desktop is loaded?
Try running it from the MSDOS.sys file.
The desktop (explore.exe) is not loaded in the Startup group.  It is loaded in the System.INI file.  You can try placing a semicolon(;) before the line "shell=Explorer.exe," in the System.ini file and replacing it with your program.  Then at the end of your program, you could call Explore.exe.

I don't have a 98 system to try this on.  Give it a try, and let us know.
hshliang, you may consider these possibilities too (other than Dennis' suggestion.) for a test.

(1) to put a "call" of your shutdown program in your autoexec.bat

(2) Go to the registry, start-run-regedit, OK.
At the registry,
My Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

create a string with your Shutdown program's name', enter the path of your program at the value data.

Name                   Data
ShutdownMyProgram      "C:\Myprogram\Shutdown.exe"

This string should be the first one just next to the default.

See if this can be worked or not.      pslh
Thank you for all the suggestions.
1) My program is a Windows program, so it will not run in DOS

2) I have tried the change in registry (My version of windows does not even have /Run, I created it and did exactly what you suggested. It works, but just like in startup menu, AFTER the desktop is loaded.

3) The only one that works is the change of System.ini. I added :
shell=C:\Shutdown\Shutdown.exe BEFORE
shell=explorer.exe
it is called before desktop, BUT the desktop is not called.
Must I call explorer in my program, that will mean rewritting the program.
Is there any way to call my program then the explorer in SYSTEM>INI?
I believe your System.ini can only have one entry for Shell=.  Calling Explore.exe from your program would do it.  If you don't want to rewrite the program, experiment with a BAT file.  But to do it right, I would rewrite the program.

Otherwise, try puting explorer.exe either on your load=, or run= lines in your .ini file.
I agree with Jason. Call it from a load or run in the ini.
Sorry, it took me awhile to test all the options, I still have major problems:
1) this is a windows program, so it does not run in DOS (or batch files).

2) yes, only one shell= is allowed. If I put shell=shutdown.exe then the next shell=explorer is not called when shutdown exits. And I do not have a desktop.

3) I have tried to load in System.ini with: load= shutdown BEFORE shell=explorer.exe. somehow the shutdown is put in the startup menu and explorer (desktop) is called first, so did not acheive what I want.

4) I then rewrite my program, adding:
_execlp("C:\Windows\Explorer.exe","C:\Windows\Explorer.exe") at the end of the program. It works to call the explorer when I tested it in debug. Then I call it by shell=shutdown, it causes a program error, I am not able to debug what the problem is, but it does not work anyways. Please tell me what is the best way to call explorer as a desktop.

Try useing shell= to run your program, then when completed, and there is no desktop, hit ctrl-alt-del, then from Task manager, go to Start(?) Run, and run explore.  If that works, then we will look further.
hshliang, try this,

Go to the registry, start-run-regedit, OK.
At the registry,
My Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

create a string with your Shutdown program's name', enter the path of your program at the value data.

Name                   Data
ShutdownMyProgram      "C:\Myprogram\Shutdown.exe"

This string should be the first one just next to the default.

See if this can be worked or not.      pslh
I have tried both, result:
1) The registry way is not going to work, shutdown is called in /Run but AFTER desktop, it is not even called in /RunServices!!

2) With the system.ini, I got the debug version, it works again, it will call up the explorer at the exit of the program, but ONLY the explorer, NOT  the desktop. I tried the ctrl-alt-del, the task manager only give me the options: End Task; Shutdown; Cancel, there is no start or run button.
I am calling the explorer by the dos version of _execlp(...), is there a MFC windows way of calling the desktop, I look through the whole "SH operations", there doesn't seem to be one that will serve this purpose.
My program is written in VC++ 6.0 with MFC, please help to suggest a way I can call the desktop in the program, It could be the only way to do it.
OOPS!  Now I remember another way to open Task Manager in 98.  Simply double click, (in the open space on the desktop) and it should come up.
Dear Jason S
I could not get the desktop, I try to double click on the empty space, nothing happens. I have tried that even after the desktop is on, still it does not bring up the task manager. The only way is Ctrl-Alt-Del.
OK, as I understand, you are able to get your Shutdown.exe file to load instead of the desktop. (correct me if I'm wrong)

Sorry, I can not these suggestions myself...

Try running a BAT file with Shell=.  In the BAT file, run first your Shutdown.exe, then Explore.
HS, how about calling WIN.COM in a batch after you've run your program?
My program is a Windows Program, will NOT run without Windows!!! It does not work in batch files!!!
No call your file as noted above, but as you note, you can call the shell as you had intended. Therefore do as you were going to do, but instead of trying to call the shell, call a batch that calls win.com.
As I understand, the GUI (started with Win.com) is already loaded.  Just not the normal shell (explore.exe).

We understand that it is a Windows executable.  Any executable will run from a BAT file.  The BAT file is just a way to automate (for lack of a better term) the running of multiple executables (in this case).

Sorry, I can not try these suggestions myself...

Copy these commands into a BAT file, and run it from Shell=

call shutdown.exe
choice /t:n,10
call explore.exe

The choice command is only to create a pause in between programs.  It may not be needed.
Good idea Jason.
I have tried your way of using a batch file. I wrote a batch file called shutdown.bat and put:
call shutdown.exe
call explorer.exe
What happens is: first shutdown will be called then explorer called ( not AFTER shutdown has exited.
secondly, calling explorer gives a :
bad command or file
(well I just remember, may be I have to put the path in) but how do I make the call after shutdown has exited??
How long does it take for Shutdown.exe to complete?  Adjust the choice command accordingly.

Do try using the path to explorer.exe (sorry about the incorrect "explore.exe" references.)

To get the correct syntax for the BAT file to call explorer, remark out the other commands, then experiment.
have tried it, doesn't work. The shutdown.exe is ok, but 'call c:\windows\explorer.exe' failed with "bad command or file name".
shutdown is timed to 60 second
Thank you
I may play with this tonight on my own system (95) and let you know.
I'm wondering if this wouldn't be better being called right from the registry during boot in HKEY_LOCAL_MACHINE. Maybe in the security section.
I don't know if that will work since the standard shell (explorer.exe) is not beeing loaded.
If your trying to secure the desktop, then security would have to be enable "before" the GUI boots.
Thank you for the discussion, it is true that the security should start before all programs, including desktop, but I have seen a lot of this type of program that are windows based. I would expect the GUI is already loaded in order for a windows based program to work. Any other thoughts???
Nope, it doesn't load that way.

It loads Bios-->Basic dos-->16bit Windows files (if any)-->Base Win drivers-->profiles (if any)-->networking (local LAN/WAN)-->Security issues-->Hardware drivers (other than video)-->then GUI (but only to a logon if networking and/or security or profiles have been implemented.
hshliang, I saw a lot of window based programs are loaded before the window logon prompt.
There are in priorities :-

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Window Logon, Then user profile

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Thus, I thought you have to re-test it. Or perhaps is your programs's problem which should be re-written in start-close steps.

pslh
> 4) I then rewrite my program... Then I call it by shell=shutdown, it causes a program error...

What is the error it is giving you?

It seems to me that the way to go is to call this from your executable.
Thank you pslh,
I appologize, I didnot realize that you have change to LOCAL_MACHINE. I have tried all versions, including:

RunService, the program runs, but parallel with other programs. that is other programs are run before my shutdown has exit.

RunServiceOnce. the key was deleted after it is run.

RunOnce. as above. (althought this is the best performancce. i.e., the shutdown is run and wait until it exits, then other programs are called, but unfortunately, the key is deleted afterward, so it is not call the second time.)

Run, the active desktop is loaded first then the shutdown.

RunOnceEx. it is NOT called

Any other suggestion?  
Try to disabled the active desktop ( I forgot the technical terms in describing this, you may imagine active desktop is two shells, one in background and one is the foreground).

Thus, disabling it to make it running without any background shell.

Try again the testing.     pslh