Solved

shell & explorer.exe

Posted on 2000-03-26
8
512 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
Independent Software Vendors: 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!

 
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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
delphi parse string to params 3 178
tidtcpserver connection lost handle 2 124
Delphi Seattle StructureView color 1 34
Delphi Firemonkey : user drawing in window 3 56
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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