Solved

Loading Before Explorer ?

Posted on 2000-04-07
16
259 Views
Last Modified: 2010-04-04
I want my application to load before
explorer(not internet) loads... and
also explorer and other applications
must load after my application finishes.

any ideas ?

Thanx
0
Comment
Question by:k6__
  • 5
  • 5
  • 4
  • +2
16 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 2695129
Hi
to run at startup before windows ,write the path of your app here and this will start it before others:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 2695504
Or you could put it into HKEY_CURRENT_USER\\Software\Microsoft\Windows\CurrentVersion\RunServices if you want it to run only for the user who installed your app.


Cheers,
DragonSlayer
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2695874
If you run it under RunServices, it will START before the Explorer loads, but the Explorer will not wait until your program has finished.
If you need that, you have no other choice than to change the shell. Under win9x change "system.ini\[boot]\shell=c:\yourPath\yourProgram.exe". Next boot your program is loaded as shell, NOT the explorer. Before your program now terminates, you have to change the shell back to "Explorer.Exe" (without path!!), then start the Explorer, then quit your program.

Regards, Madshi.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 2

Author Comment

by:k6__
ID: 2697076
hmmm .. it is very dangerus to do that..
If my application crashes the i won't
load the explorer.. i've just wonder
how other programs do that... (i think
if i remember right the "norton
otimization" program loads before
explorer does when ever it does and
when it finishes it loads the explorer
and the rest of the programs)

Also this wont work under WinNT or
Win2k =(

Thanx
0
 
LVL 17

Expert Comment

by:inthe
ID: 2697105
i guess you'll have to write a proper service ..

www.jgsoftware.com/nt.htm 
has examples if you need any ..
0
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
ID: 2697480
As far as I know, a service can't delay the starting of the explorer, or am I wrong?

k6, I don't have Norton whatever on my PC, so I can't check that. But my suggestion is the only way I can think of - BTW, it works for NT, too!!! Okay, you've to set some registry keys and such, but it's possible. If you would accept that as an answer, I could give you the complete information about how to change the shell under NT as well.

Regards, Madshi.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2697799
no no you correct , i dont even think the service would start until first instance of explorer has started ,i mean doesnt explorer start the services? ..

k6 go on accept the answer of madshi  ,
i wanna see this nt way .. :o)

0
 
LVL 2

Author Comment

by:k6__
ID: 2701846
btw ... is there any way to disable/enable
explorer/taskbar ?
(post the NT stuff =) )

Thanx
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2703018
Well, "thanks" for that C grade...  :-(

"According to MSDN, you can indeed replace the shell on Windows NT. Note from the references to Program Manager that this information was written with reference to WinNT 3.x

Excerpted from MSDN:

Replacing the Shell (Program Manager)
Last reviewed: November 2, 1995
Article ID: Q100328  
The information in this article applies to:
Microsoft Win32 Application Programming Interface (API) included with:


    - Microsoft Windows NT versions 3.1, 3.5, and 3.51



SUMMARY
To replace the current shell, change the following registry key:


   HKEY_LOCAL_MACHINE\
      SOFTWARE\
      Microsoft\
      Windows NT\
      CurrentVersion\
      Winlogon\
      Shell

Note that Program Manager combines the functionality of Program Manager and Task Manager (the Task Manager installed is not actually run). Therefore, you must take this into account. In Windows NT 3.1, if the new shell does not replace the Task Manager functionality, the replacement string should contain both the new shell name and TASKMAN.EXE, separated by commas. In Windows NT 3.5, the new shell should either spawn TASKMAN.EXE or your own task manager, specified in

   HKEY_LOCAL_MACHINE\
      SOFTWARE\
      Microsoft\
      Windows NT\
      CurrentVersion\
      Winlogon\
      Taskman

The value does not exist by default, it must be added. The value type is REG_SZ.
To update the string that is retrieved when you call GetPrivateProfileString(), change the string in the following registry key:


   HKEY_LOCAL_MACHINE\
      SOFTWARE\
      MICROSOFT\
      Windows NT\
      Current Version\
      WOW\
      Boot\
      Shell

The duplicate entry is for compatibility with Windows 3.1."
0
 
LVL 2

Author Comment

by:k6__
ID: 2705599
Well i've gave you the "C" grade because
it isn't exctacly what i wanted!

0
 
LVL 17

Expert Comment

by:inthe
ID: 2705690
and giving an "a" grade would have hurt who ?

sometimes what we want isnt possible.
i mean it sounds as though you are wanting to start a win32 app before windows is loaded ..
(win32 exe will be using windows api's therefore need explorers dlls loaded ) that doesnt make sense to be possible ..

0
 
LVL 3

Expert Comment

by:darinw
ID: 2713425
Hi all,

k6__ : When you grade an answer, you should grade it on how well it addressed the problem - not on how well it may have met your preconcieved notions on what the answer should be. In short, you shouldn't penalize the Experts who are trying to help YOU for a limitation of the software/OS/whathaveyou that is being used.

Remember, a customer that shoots the messenger often finds that the best people to help them won't help again because they have already been shot :)

darinw
Customer Service
0
 
LVL 2

Author Comment

by:k6__
ID: 2714169
I have Graded "C" because it is
addressing my problem in "dangerous" way
not safe... and because it isn't the
best solution...I don't mind to give
him an "A" but i don't see what points
and grades serves for ?

Thanx
0
 
LVL 17

Expert Comment

by:inthe
ID: 2714185
>>and because it isn't the
best solution...


ok then ,im curious as to what is best solution ??
0
 
LVL 20

Expert Comment

by:Madshi
ID: 2714942
My solution is not the best solution if compared to what you want to have (namely an official API to let your program run before the explorer without making your program the shell).
But it's not my fault, that there simply is no such API. So I gave you the best *possible* solution. That's the scale where you should grade.

But let's forget about this question now. I can live with this one C grade. Perhaps next time you can measure your grade on the "possibility" scale, not on the "fancy-wish" scale.

Regards, Madshi.
0
 
LVL 2

Author Comment

by:k6__
ID: 2717717
I found the best possible way is to
"Hide" Desktop and Explorer but the
problem is that if the user press
CTRL-ESC it will bring the Start menu
up... this is also a lot of safer! =)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 119
Firemonkey webbrowser scrollbars ? 1 37
firemonkey keyboard covers the controls 1 25
Breakpoint doesn't stop in my variable 3 23
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now