473,569 Members | 2,700 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 7141
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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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 SystemParameter sInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@disc ussions.microso ft.com> wrote in message
news:B0******** *************** ***********@mic rosoft.com...

I'm trying to apply changes in two different areas (local machine & current user):
1. HKEY_CURRENT_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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 SystemParameter sInfo along with WM_SETTINGCHANG E
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 EnumDisplaySett ings and
ChangeDisplaySe ttings.

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*********@un isys.spamcom> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
For that first set, it looks like you're hacking the regstry instead of using the SystemParameter sInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@disc ussions.microso ft.com> wrote in message
news:B0******** *************** ***********@mic rosoft.com...

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

1. HKEY_CURRENT_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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 SystemParameter sInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@disc ussions.microso ft.com> wrote in message
news:B0******** *************** ***********@mic rosoft.com...

I'm trying to apply changes in two different areas (local machine & current user):
1. HKEY_CURRENT_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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 SystemParameter sInfo along with WM_SETTINGCHANG E
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 EnumDisplaySett ings and
ChangeDisplaySe ttings.

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*********@un isys.spamcom> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
For that first set, it looks like you're hacking the regstry instead of using the SystemParameter sInfo API.
--
Phil Wilson [MVP Windows Installer]
----
"Troy Heber" <an*******@disc ussions.microso ft.com> wrote in message
news:B0******** *************** ***********@mic rosoft.com...

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

1. HKEY_CURRENT_US ER\Control Panel\Desktop
2. HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices

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*******@disc ussions.microso ft.com> wrote in message
news:57******** *************** ***********@mic rosoft.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
2972
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 the target server is on another Windows server running the apply program. This replication set up has a mix of bidirectional and unidirection data...
1
16302
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 count exceeded. Increase MaxLocksPerFile registry entry." I checked in the Tools - Options - Advance. I have the database shared with no locks...
0
1484
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. Any tips? I think that RegNotifyChangeKeyValue is not going to help me. Can I do this (detect changes and enumerate the changes) with WMI? I was able...
2
3088
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 via regedit.exe. However when I make the changes with the code below those changed are NOT reflected in the control panel applet even though they...
1
3127
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, read and change the remote registry (HKLM/Software/...) of some internal server. After installing SP1 on the web server (IIS) all functions with...
6
2519
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 to overcome the "click" sound of the WebBrowser, without having to affect the Registry permanently. This way I could monitor the call for the sound...
3
2156
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 import in particular is SetupDiBuildDriverInfoList(), which builds a list of potential drivers for a piece of hardware. This function uses the...
2
2031
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 able to make changes into a registry that resides on another partition or harddrive, not over a network. Basically, I want to plug in a second hard...
5
2504
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 from os.path import exists from random import randint #first grab a registry handle.
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
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. ...
0
8122
jinu1996
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...
1
7673
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...
0
7970
tracyyun
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...
1
5513
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1213
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.