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

x
?
Solved

Remove System Shortcuts from Desktop

Posted on 1999-07-15
6
Medium Priority
?
144 Views
Last Modified: 2010-05-02
Hola,
  I want to know how to remove standard system desktop icons (such as My Computer and Recycle Bin).  
  Basically, I am running an app on a handheld computer, and I want only my app to run.  
  I have already got it running as startup, locked down the start button, and disabled "WinKeys" such as Alt-Tab, Ctrl-Alt-Del, and the like.  I am also shutting down Windows when the app closes.  
  The problem is that the user can still open My Computer before my app can load (it is a handheld.. it is slow), and use that to get around in Windows.  I want to remove everything from the Desktop.
 
  TIA,
     JDunck
0
Comment
Question by:jdunck
[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
  • 4
6 Comments
 
LVL 5

Accepted Solution

by:
KDivad earned 400 total points
ID: 1525013

If the only thing you want running is your program, change the line in Windows\system.ini that reads "SHELL=EXPLORER.EXE" to point to your app instead of explorer. Explorer will never even be loaded.
0
 
LVL 5

Expert Comment

by:KDivad
ID: 1525014
I suppose that doesn't exactly answer your question, but it should work a little better since explorer takes a while to load and uses a TON of resources.
0
 
LVL 6

Expert Comment

by:setiawan
ID: 1525015
Why don't you try to disable the desktop ?
I think codes below can answer your question

Declare Function EnableWindow Lib "user32" (ByVal hWnd As Long, ByVal cmd As Long) As Long
Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String)
Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String)

' to disable windows desktop
Dim lParent As Long
lParent = FindWindow("Progman", vbNullString)
Dim lChild1 As Long
lChild1 = FindWindowEx(lParent, 0, "SHELLDLL_DefView", vbNullString)
Dim lChild2 As Long
lChild2 = FindWindowEx(lChild1, 0, "SysListView32", vbNullString)
Call EnableWindow(lChild2, 0)

'to enable windows desktop
Dim lParent As Long
lParent = FindWindow("Progman", vbNullString)
Dim lChild1 As Long
lChild1 = FindWindowEx(lParent, 0, "SHELLDLL_DefView", vbNullString)
Dim lChild2 As Long
lChild2 = FindWindowEx(lChild1, 0, "SysListView32", vbNullString)
Call EnableWindow(lChild2, 5)



0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Expert Comment

by:KDivad
ID: 1525016
Instead of using lengthy code to disable the desktop (if you don't wish to replace the shell) and since it appears you wish to have this method all the time merely edit one value in the registry to disable the desktop:

Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
Value Name: NoDesktop
Data Type: REG_DWORD
Data: (0 = disabled, 1 = enabled)

0
 
LVL 1

Author Comment

by:jdunck
ID: 1525017
KDivad,
  I still want it to "feel" like Win95.. I just don't want the users to get outside my app.
  Your second suggestion does it for me.  Thanks a bunch :)

  -JDunck
0
 
LVL 5

Expert Comment

by:KDivad
ID: 1525018
Glad one of my suggestions helped. Your Welcome.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

670 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