Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

shell & explorer.exe

Posted on 2000-03-26
8
Medium Priority
?
530 Views
Last Modified: 2010-08-05
I'm creating a program to limit the time my younger siblings spend each day on my computer.
I've created a login screen, and then I changed the SYSTEM.INI file so that "Shell" points to this
program.  This works fine, but when the correct password is entered, I want the program to run explorer.exe as a
shell.  Right now when I run explorer.exe, he just pops up like Windows Explorer, i.e no taskbar/startmenu & desktop visible.

Is it possible to run explorer.exe as a shell from within my program?


Another question,  I know that you can disable various things, like the desktop, control panel and start menu to
name a few ...  I've seen some tweak utility that did this.  How is this done?  It's somewhere in the registry, right?


Thanks,

Hagur
0
Comment
Question by:hagur
[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
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 21

Expert Comment

by:gemarti
ID: 2658426
Why don't you use user profiles instead of trying to recreate the wheel? I mean with user profiles you can set windows up so that whoever is logged on only sees what you want them to see. Then if you want to also have a timer program that will shut down windows after a certain period of time you can create this program with the appropriate code and place it in the registry to run on startup for this specific user.

This would seem to be a easier solution.

0
 
LVL 15

Expert Comment

by:simonet
ID: 2658432
Once the default shell has been loaded, you cannot load (change) another shell.

Alex
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2659975
My son is still too young to know what I'm actually doing on my computer but soon I have to care about this. And I already came to the conclusion that a simple DOS extension like Win9x doesn't provide the security I need. I know it is cheaper than OSes like WinNT but you will never need to think again about usual security with the latter. This might also be important if your machine is connected to Internet, as my little home network. I have two machines both running W2K and I simply cannot afford to open holes in my privacy (not only what my son sees, this would only be a small part of the problem, but what others may see).

Just my $0.02 and not thought as answer to this question here :-)

Ciao, Mike
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 20

Expert Comment

by:Madshi
ID: 2660249
Just change the Shell setting back to "Explorer.Exe" before starting the explorer.

  WritePrivateProfileString(...);  // restore Explorer as cache
  WritePrivateProfileString(nil, nil, nil, ...);  // flush ini
  ShellExecute(...);  // start explorer

Most policies are under "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies". The best way to find the correct keys is to use PolEdit and then look at the registry in the Policies key.

Regards, Madshi.
0
 
LVL 3

Author Comment

by:hagur
ID: 2660307
That's interesting Madshi ...

WritePrivateProfileString() where ?
In the registry?

Could you please be a little more specific?
0
 
LVL 21

Expert Comment

by:gemarti
ID: 2661639
Here's the syntax for WritePrivateProfileString()

WritePrivateProfileString(
  lpAppName:PChar;     {pointer to section name}
  lpKeyName:PChar;     {pointer to key name}
  lpString:PChar;      {pointer to string}
  lpFileName:PChar;    {pointer to initialization filename}
);BOOL;                {Returns TRUE or FALSE}

This function sets the string value for the specified reistry key in the specified section of a private user defined initialization file. The function can also create sections inside the initialization file.


I think you still need to setup the user profiles as I suggested, otherwise you will find nothing in the KEY that Madshi suggests.
0
 
LVL 20

Accepted Solution

by:
Madshi earned 400 total points
ID: 2661898
Hagur, you said this:

>> I've created a login screen, and then I changed the SYSTEM.INI file so that "Shell" points to this
program.

So I thought you would know how to use WritePrivateProfileString...   :-)

  WritePrivateProfileString('Boot', 'Shell', 'Explorer.Exe', 'system.ini');
  WritePrivateProfileString(nil, nil, nil, 'system.ini');

Regards, Madshi.

P.S: I don't have user profiles on my machine. It works without, too.
0
 
LVL 3

Author Comment

by:hagur
ID: 2663592
I'll have to accept Madshi's answer, what he said works exactly like I needed it to,  also without user profiles.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

715 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