By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,883 Members | 955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,883 IT Pros & Developers. It's quick & easy.

Apply registry changes immediately

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.