   proper way to set the default screensaver?
  Hello all,i'm creating a screensaver and i'm a little nervous about my implementation of how to set the default screensaver.  Right now i set the following registry:HKCU/Control Panel/Desktop/SCRNSAVE.EXE = myScreensaverit generally works, however, i've had the odd problem with people's wallpapers disappearing & other strangeness.  I'm not sure if it's related to this, but it's the only place i mess with the system's registries.  Is this too much of a hack?  It also doesn't make the screensaver immediately active.I know i could just run the Display Properties/Set screensaver as the MSDN docs say, but i'd rather have a checkbox in my installer.advice is appreciated,thanks!alan   
  You'll need to set that registry key through WritePrivateProfileString () then call SystemParametersInfo (SPI_SETSCREENSAVEACTIVE, ...) to inform the system about the changes. The code will look like this://Get the currently selected screensaverchar CurSav[MAX_PATH];DWORD res=GetPrivateProfileString("boot","SCRNSAVE.EXE","",    CurSav,MAX_PATH,"system.ini");if (res==0 || strcmp(scrt,"")==0) {..} // Currently selected saver is 'none'...//Change the currently selected screensaver - We must change the path into SHORT type firstchar ShortName[MAX_PATH];GetShortPathName (CurSav,ShortName,MAX_PATH) ;WritePrivateProfileString ("boot","SCRNSAVE.EXE",ShortName,"system.ini") ;//That sends a WM_WININICHANGE so that DisplayProperties dialog knows we've changed. It also enables screensaving.SystemParametersInfo (SPI_SETSCREENSAVEACTIVE,TRUE,NULL,TRUE);Microsoft says that newer applications should not write to the ini file but the registry instead, the code above while changing the system.ini settings, it also maps the changes to the registry.Hth.   ;  fabulous.  thanks-you!