[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Disable dektop icons and righ-click in Windows 7

Asked by GurtDotCom in Delphi Programming, Pascal Programming Language

Tags: windows 7, delphi, disable desktop, block, desktop, lock down

I have a program that, when running, requires the desktop to be disabled (icons disabled and right-click disabled).

I got this working fine in XP and Vista, but Windows 7 keeps throwing me curve balls.

This is what I have tried already...

*  dwinlock component
*  EnableWindow(FindWindowEx(FindWindow ('Progman', nil), HWND(0), 'ShellDll_DefView', nil), FALSE) ;
*  HKCU\SoftwareMicrosoft\Windows\CurrentVersion\Policies\Explorer\NoDesktop



dwinlock works GREAT for XP and Vista for all it is advertised to do, but the disable desktop feature does not work in Windows 7. No error code or anything. The program thinks it is working, but the desktop is still fully accessible.


"EnableWindow(FindWindowEx(FindWindow ('Progman', nil), HWND(0), 'ShellDll_DefView', nil), FALSE) ;" does nothing since Windows 7 does not use "Progman" for the program manager. I have read that it uses "WorkerW", but I cannot call it as like I used to be able to call ProgMan.

HKCU\SoftwareMicrosoft\Windows\CurrentVersion\Policies\Explorer\NoDesktop. When I manually set this with regedit, and I kill then restart explorer.exe it works like a champ. The problem is that I need this to be programmatically automatic when my app starts up and reverse when it closes. I tried using Delphi to write this to the registry, but Windows 7 deflects it without error messages. (it seems it get re-routed to HKU instead of HKCU. I found that by default, the "policies" sub-dir does not offer write permissions which only seem to take effect when I try to use a script too modify it. If I manually set write permission for the current user for the "policies" sub-dir, it lets Delphi write the needed key.

 I also tried shellexecuting a .reg file, but if I run it silently (using switch /s) it fails without any messages) Running it without any switches works, but I am nagged and cannot have my end users nagged at all (not an option).


An answer to any of these questions will solve the issue...

How can I programmatically write values to the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer section in the registry?

How can I use the "EnableWindow(FindWindowEx(FindWindow ('Progman', nil), HWND(0), 'ShellDll_DefView', nil), FALSE) ;" but with Windows 7?

Know of any WORKING component like dwinlock for Windows 7?


When replying, please remember, this is a required function (don't try to talk me out of it) It MUST work with Windows 7, and it must be forgiving (this app will run on a variety of different computers)

Thank you!

[+][-]11/06/09 06:34 AM, ID: 25759399Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Delphi Programming, Pascal Programming Language
Tags: windows 7, delphi, disable desktop, block, desktop, lock down
Sign Up Now!
Solution Provided By: senad
Participating Experts: 2
Solution Grade: B
 
[+][-]11/06/09 06:40 AM, ID: 25759442Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 06:41 AM, ID: 25759454Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 10:44 AM, ID: 25761823Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/06/09 12:44 PM, ID: 25762872Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 12:46 PM, ID: 25762886Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]11/06/09 12:47 PM, ID: 25762898Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625