Hey There,
I've been trying to see if there is a way to programmaticall y block,
or hide, the Control Panel. Since it is a "Virtual Folder", just
blocking an .exe from running doesn't work. Even some of the applet
items in the Control Panel are problematic. The "Fonts" link or the
"Network Connections" link are both "Virtual Folders", so when I block
..cpl files doesn't affect them. Anybody out there have any suggestions?
Thanks!
Jay
(patelj27b at gmail dot com) 7 4322
I've been trying to see if there is a way to programmaticall y block,
or hide, the Control Panel. Since it is a "Virtual Folder", just
blocking an .exe from running doesn't work. Even some of the applet
items in the Control Panel are problematic. The "Fonts" link or the
"Network Connections" link are both "Virtual Folders", so when I block
.cpl files doesn't affect them. Anybody out there have any suggestions?
1) Start
2) Run
3) gpedit.msc
4) User Configuration
5) Administrative Templates
6) Control Panel
7) Prohibit access to the Control Panel
8) Enabled
Eric
Eric,
Thanks for the reply, but that way is doing it throught the GUI. I'm
looking for a way to do this programatically , using C++. Any insight
into that method would be greatly appreciated!
-Jay
(patelj27b at gmail dot com)
Eric Hill wrote:
I've been trying to see if there is a way to programmaticall y block,
or hide, the Control Panel. Since it is a "Virtual Folder", just
blocking an .exe from running doesn't work. Even some of the applet
items in the Control Panel are problematic. The "Fonts" link or the
"Network Connections" link are both "Virtual Folders", so when I block
.cpl files doesn't affect them. Anybody out there have any suggestions?
1) Start
2) Run
3) gpedit.msc
4) User Configuration
5) Administrative Templates
6) Control Panel
7) Prohibit access to the Control Panel
8) Enabled
Eric
Thanks for the reply, but that way is doing it throught the GUI. I'm
looking for a way to do this programatically , using C++. Any insight
into that method would be greatly appreciated!
That policy setting modifies the following registry key:
[HKCU\Software\M icrosoft\Window s\CurrentVersio n\Policies\Expl orer]
NoControlPanel= REG_DWORD:0x000 00001
The documentation for this setting is in TechNet: http://technet2.microsoft.com/Window...19b081033.mspx
Eric
I've seen that registry keey modification before, and while that is a
step in the right direction, It also requires a reboot of the machine
in order for the setting to take effect. I am hoping for a way that
will be able to do it run-time, in a service (hopefully).
-Jay
(patelj27b at gmail dot com)
Eric Hill wrote:
Thanks for the reply, but that way is doing it throught the GUI. I'm
looking for a way to do this programatically , using C++. Any insight
into that method would be greatly appreciated!
That policy setting modifies the following registry key:
[HKCU\Software\M icrosoft\Window s\CurrentVersio n\Policies\Expl orer]
NoControlPanel= REG_DWORD:0x000 00001
The documentation for this setting is in TechNet:
http://technet2.microsoft.com/Window...19b081033.mspx
Eric
I've seen that registry keey modification before, and while that is a
step in the right direction, It also requires a reboot of the machine
in order for the setting to take effect. I am hoping for a way that
will be able to do it run-time, in a service (hopefully).
Actually, no, the policy editor does it without a reboot. Once you make
the change in the registry, you need to tell all the top-level windows
that "something has changed" and that will cause Explorer to re-load those
settings from the registry.
Specifically, change the registry key and do this:
::SendMessageTi meout(
HWND_BROADCAST,
WM_SETTINGCHANG E,
0, // user policy change = 0, computer policy change = 1
L"Policy",
SMTO_NORMAL,
2000, // 2 second timeout for each window handle
&result);
From here: http://msdn.microsoft.com/library/en...asp?frame=true
Eric
Eric,
That is extremely helpful! I just have one last question. Since this
involves window handles, would this need to be called from a user-level
application, or could it be called from a service? I don't think a
service could do this because of the desktop interaction.
-Jay
(patelj27b at gmail dot com)
Eric Hill wrote:
I've seen that registry keey modification before, and while that is a
step in the right direction, It also requires a reboot of the machine
in order for the setting to take effect. I am hoping for a way that
will be able to do it run-time, in a service (hopefully).
Actually, no, the policy editor does it without a reboot. Once you make
the change in the registry, you need to tell all the top-level windows
that "something has changed" and that will cause Explorer to re-load those
settings from the registry.
Specifically, change the registry key and do this:
::SendMessageTi meout(
HWND_BROADCAST,
WM_SETTINGCHANG E,
0, // user policy change = 0, computer policy change = 1
L"Policy",
SMTO_NORMAL,
2000, // 2 second timeout for each window handle
&result);
From here:
http://msdn.microsoft.com/library/en...asp?frame=true
Eric
"Jay" <pa*******@gmai l.comwrote in message
news:11******** *************@1 6g2000cwy.googl egroups.com...
Eric,
That is extremely helpful! I just have one last question. Since this
involves window handles, would this need to be called from a user-level
application, or could it be called from a service? I don't think a
service could do this because of the desktop interaction.
Would BroadcastSystem Message() work?
-- David This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: R6_2003 |
last post by:
Hello all,
i dunno if that's the right newsgroup to ask, but i'll try, please
ignore me if u feel its not 0:)
i've been messing with a control panel app for so long.. previously i
was using Microsoft Visual C++ 6 and had ZERO problems, but now at
work we switched to Borland C++ 6.0.
The control panel applet i did contains a simple form with a
|
by: AKR |
last post by:
I have to create control panel applet using C# . I have read in the
net that it is not possible using C# . How can i create control panel
applet using C# .
|
by: John Seelig |
last post by:
I have a vb.net program that calls an msi to uninstall a control panel
(*.cpi, *.cpl and *.exe). However, after uninstall the icon persists in the
control panel window until a refresh (F5) is initiated. Is there a way to
refresh, or at lease close, the window from my vb.net code?
Thanks in advance!
jseelig@compasslearning.com
|
by: Mac via DotNetMonster.com |
last post by:
I have a MDI parent form and the only control on it is a panel anchored to
the left hand side. I have menu items on the MDI parent that show & hide
this panel. Ideally I would like it to show by not pushing out the child
forms, but rather be overlapping them.
Alternatively I tried creating a form the same size as the panel but run
into difficulty because I would like it to have a normal window state while
the other child forms are...
|
by: pealy2 |
last post by:
Sorry if this is in the wrong group, I've searched long & hard without
finding anything even slightly useful. (recommendations for a more
relevant group gratefuly received)
I need to change the settings for the default web service user account
so that sounds go through a sound card rather than the on-board sound.
I can do this simply when I'm logged in to my own user account by going
through control panel. If I can't log on as the Web...
| |
by: Glenn |
last post by:
Hello
Is there any documentation around which shows you ( if it is possible)
how to create a new category for the windows xp control panel.( in
category view)
I would like to create a new control panel category and have tasks in
it which fire off some of my code.
Does microsoft provide a way of doing this or are the categorties in
|
by: Frank Burleigh |
last post by:
A while ago I installed Net 2.0 to our Server 2003 web machine, but the
Control Panel folder icon for configuring Net 2.0 never made it to the
Control Panel folder. Thinking this might indicate a botched install, I
used the install.exe found in 2.0's "Microsoft .net framework 2.0"
directory to repair the install. No change I can see.
I can find the application exe whose icon is missing from control panel
easily enough, but I wonder...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |