Solved

Is there a way to re-load the registry while running Windows ?

Posted on 1997-10-19
12
134 Views
Last Modified: 2010-04-04
Is there a way to re-load the registry in Windows so that Windows system settings take effect ?
0
Comment
Question by:dms@
  • 7
  • 4
12 Comments
 
LVL 1

Expert Comment

by:anilms
ID: 1348238
Yes, if you are using Windows NT, you use the regedt32 command instead of regedit command. This allows you to save and restore the registry directly when running Windows NT
0
 

Author Comment

by:dms@
ID: 1348239
It's for Windows 95
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348240
I think so you are searching for :

SendMessage( hwnd_broadcast,  WM_WININICHANGE );
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348241
sorry .

Windows 95: The WM_WININICHANGE message is implemented on the Windows NT platform, but not on the Windows 95 platform. Windows 95 applications should use the WM_SETTINGCHANGE message, which provides equivalent functionality.

good work !
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348242
Hi
Are you there ?

0
 
LVL 3

Accepted Solution

by:
mirek071497 earned 220 total points
ID: 1348243
Do you need more ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dms@
ID: 1348244
Well, it still doesn't seem to work. Windows refreshes the desktop allright, but it doesn't reload the icons !
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348245
Why you don't say that you need reload icons !
I will try this today and if I found solution (or not) I submit comment tomorrow or today afternoon.
0
 

Author Comment

by:dms@
ID: 1348246
Well, the basic idea is that I change the location of the Desktop
(default C:\WINDOWS\DESKTOP) in the registry and after this, Windows will have to show the icons of the new directory.
0
 

Author Comment

by:dms@
ID: 1348247
Adjusted points to 220
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348248
Yes. This is big problem. I found so probably the only one way to reload icons from HDD is to change icon size from 32 to other and then back to 32. You can test this in properties for screen. I have Polish version so i can't say right names but in the third tab you can find combobox where the icon is listed. You can change then the icon size and apply changes. However you must remember to set this value back ! I don't know now how to do this in delphi, but when I found this then I submit comment.
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1348249
Hi

Mayby this is not very fine however this is working solution.

uses
  Registry;

procedure TForm1.Button1Click(Sender: TObject);
var
  reg : TRegistry;
  st  : string;
begin
  reg := TRegistry.Create;
  if reg.OpenKey('Control Panel\desktop\WindowMetrics', false) then
    begin
      st := reg.readstring('Shell Icon Size');
      reg.writestring( 'Shell Icon Size', IntToStr(StrToInt(st)+1) );
      SendMessage( hwnd_broadcast, WM_SETTINGCHANGE, 0, 0 );
      reg.writestring( 'Shell Icon Size', st );
    end;
  reg.free;
end;

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 117
Delphi : could not find program, '...exe' 2 144
Not able to call Delphi XE10 dll function from Delphi 6.0 4 16
update joined tables 2 24
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

937 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now