473,503 Members | 12,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apply registry changes immediately

Can anyone tell me how to force an immediate apply of system based registry changes. I have an application written in C# that updates the registry. However I’m forced to logout and log back in for the changes to take effect. I need to figure out how to have an apply button (just like the one in Microsoft power tweak). Any help is greatly appreciated.
Jul 21 '05 #1
7 7135
What specific system settings are you trying to change? There are API
functions that will reload some of them and others can only be read as part
of the user settings upon login. There are still others that will only be
read on startup - so the answer to your question really depends on what it
is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Can anyone tell me how to force an immediate apply of system based

registry changes. I have an application written in C# that updates the
registry. However I'm forced to logout and log back in for the changes to
take effect. I need to figure out how to have an apply button (just like the
one in Microsoft power tweak). Any help is greatly appreciated.
Jul 21 '05 #2

I'm trying to apply changes in two different areas (local machine & current user):

1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply the settings I would really appreicate it. I have searched and searched and can't find it.

Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are API
functions that will reload some of them and others can only be read as part
of the user settings upon login. There are still others that will only be
read on startup - so the answer to your question really depends on what it
is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Can anyone tell me how to force an immediate apply of system based

registry changes. I have an application written in C# that updates the
registry. However I'm forced to logout and log back in for the changes to
take effect. I need to figure out how to have an apply button (just like the
one in Microsoft power tweak). Any help is greatly appreciated.

Jul 21 '05 #3
For that first set, it looks like you're hacking the regstry instead of using
the SystemParametersInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...

I'm trying to apply changes in two different areas (local machine & current user):
1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply the settings I would really appreicate it. I have searched and searched and can't
find it.
Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are API
functions that will reload some of them and others can only be read as part of the user settings upon login. There are still others that will only be read on startup - so the answer to your question really depends on what it is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
> Can anyone tell me how to force an immediate apply of system based registry changes. I have an application written in C# that updates the
registry. However I'm forced to logout and log back in for the changes to
take effect. I need to figure out how to have an apply button (just like

the one in Microsoft power tweak). Any help is greatly appreciated.

Jul 21 '05 #4
Troy, Phil is right. Use SystemParametersInfo along with WM_SETTINGCHANGE
message. You don't really say what you want to change on or about the
desktop, but if it is video settings/colors, etc. you might start with
these:

Microsoft had an article on MSDN a few years ago entitled Creating A
ScreenInfo Class. You may want to find an old MSDN disk and try to track
that down. It includes descriptions of using EnumDisplaySettings and
ChangeDisplaySettings.

As for the Services area, that's outside my experience. Hopefully someone
else can point you in the right direction for that one.

Dale
"Phil Wilson" <ph*********@unisys.spamcom> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
For that first set, it looks like you're hacking the regstry instead of using the SystemParametersInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...

I'm trying to apply changes in two different areas (local machine & current
user):

1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply
the settings I would really appreicate it. I have searched and searched and can't find it.

Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are
API functions that will reload some of them and others can only be read as part
of the user settings upon login. There are still others that will
only be
read on startup - so the answer to your question really depends on
what it
is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
> Can anyone tell me how to force an immediate apply of system
based registry changes. I have an application written in C# that updates the registry. However I'm forced to logout and log back in for the changes to take effect. I need to figure out how to have an apply button (just

like the
one in Microsoft power tweak). Any help is greatly appreciated.


Jul 21 '05 #5

I'm trying to apply changes in two different areas (local machine & current user):

1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply the settings I would really appreicate it. I have searched and searched and can't find it.

Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are API
functions that will reload some of them and others can only be read as part
of the user settings upon login. There are still others that will only be
read on startup - so the answer to your question really depends on what it
is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Can anyone tell me how to force an immediate apply of system based

registry changes. I have an application written in C# that updates the
registry. However I'm forced to logout and log back in for the changes to
take effect. I need to figure out how to have an apply button (just like the
one in Microsoft power tweak). Any help is greatly appreciated.

Nov 22 '05 #6
For that first set, it looks like you're hacking the regstry instead of using
the SystemParametersInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...

I'm trying to apply changes in two different areas (local machine & current user):
1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply the settings I would really appreicate it. I have searched and searched and can't
find it.
Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are API
functions that will reload some of them and others can only be read as part of the user settings upon login. There are still others that will only be read on startup - so the answer to your question really depends on what it is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
> Can anyone tell me how to force an immediate apply of system based registry changes. I have an application written in C# that updates the
registry. However I'm forced to logout and log back in for the changes to
take effect. I need to figure out how to have an apply button (just like

the one in Microsoft power tweak). Any help is greatly appreciated.

Nov 22 '05 #7
Troy, Phil is right. Use SystemParametersInfo along with WM_SETTINGCHANGE
message. You don't really say what you want to change on or about the
desktop, but if it is video settings/colors, etc. you might start with
these:

Microsoft had an article on MSDN a few years ago entitled Creating A
ScreenInfo Class. You may want to find an old MSDN disk and try to track
that down. It includes descriptions of using EnumDisplaySettings and
ChangeDisplaySettings.

As for the Services area, that's outside my experience. Hopefully someone
else can point you in the right direction for that one.

Dale
"Phil Wilson" <ph*********@unisys.spamcom> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
For that first set, it looks like you're hacking the regstry instead of using the SystemParametersInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...

I'm trying to apply changes in two different areas (local machine & current
user):

1. HKEY_CURRENT_USER\Control Panel\Desktop
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es

If you could point me to the documentation on the API functions to apply
the settings I would really appreicate it. I have searched and searched and can't find it.

Thanks for the reply!!

Troy

----- DalePres wrote: -----

What specific system settings are you trying to change? There are
API functions that will reload some of them and others can only be read as part
of the user settings upon login. There are still others that will
only be
read on startup - so the answer to your question really depends on
what it
is you're trying to change.

Dale
"Troy Heber" <an*******@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
> Can anyone tell me how to force an immediate apply of system
based registry changes. I have an application written in C# that updates the registry. However I'm forced to logout and log back in for the changes to take effect. I need to figure out how to have an apply button (just

like the
one in Microsoft power tweak). Any help is greatly appreciated.


Nov 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2962
by: Trent | last post by:
Hello,everyone. I'm setting a db2 replication environment using UDB version 8.1.5 running on Windows 2000 servers. The source server is on a Windows server with the capture program running while...
1
16292
by: rdavis7408 | last post by:
I have a database that has a form that opens a report using date parameters. I have been using it for six months and last week I began to get the following Error Message: "File sharing lock...
0
1478
by: robmcdan | last post by:
Hi, I'm using RegNotifyChangeKeyValue() (via DllImport) to detect changes to registry keys and subkeys. However, in addition to catching changes, I would like to know what the changes were. ...
2
3070
by: Ty Moffett | last post by:
Below is a set of insructions that changes the registry keys pertaining to Automatic Updates on my Windows XP box. I can make changes using the control panel applet and see the changes reflected...
1
3111
by: UK1967 | last post by:
I wrote a ASP.NET application (Windows 2003 Enterprise Server, IIS, .NET Framework 1.1). This application use the Windows (AD) account and impersonation. Some functions in this application contact,...
6
2510
by: ewolfman | last post by:
Hi, Is there any way in which I can monitor / hook the Registry, and upon a call to a specific key from a specific application - swap the returned value? I was thinking of using this method...
3
2149
by: Rymfax | last post by:
Hello, I was hoping someone could help me with a problem I'm having. I've got a C# app that uses several DLL Imports from setupapi.dll and others (Thanks again for the Help on those Willy). One...
2
2028
by: rodpolako | last post by:
Hi everyone, I am trying to write a program that can make some changes into a windows XP registry. My program works great when it is working on the local registry. What I want to do is to be...
5
2496
by: teh_sAbEr | last post by:
Hi everybody. I'm trying to write a script that'll change desktop wallpaper every time its run. Heres what I've gotten so far: #random wallpaper changer! import _winreg from os import walk...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7017
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...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
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...
0
4696
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...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.