Back in my Delphi days, I wrote several screensavers - each was a single executable that was dropped into the System32 folder, where the Windows XP Display control panel saw it and made it available. All good.

I'm now writing a significantly more complex screensaver in C# that is necessarily spread across multiple assemblies (it's using a plug-in model: merging all the assemblies into a single executable isn't an option).

Dumping all the files into System32 doesn't seem to be very tidy - not to mention that it simply won't work on a 64-bit system.

Is there any other way to install a screensaver on a Windows system?

I'm willing to take a dependency on Vista/Win7 if necessary.

The only suggestion I've had made so far, is to install the bulk of the screensaver normally, under Program Files, and put a trigger/launcher into System32.

What's up with the vote to close? If it doesn't belong here on SO, where does it belong?
–
BevanJan 9 '12 at 2:39

I didn't vote, but most likely it's because this is not strictly a programming question. It's more of a "how to configure a system properly/cleanly". Programming related, but not strictly programming.
–
Marc BJan 9 '12 at 3:10

I guess I can see how someone might think that. In my case, since System32 is on the PATH and I'm using some of popular libraries (e.g. Ninject), it becomes pretty important that I don't put them into that directory, else I risk breaking other peoples applications. Sigh, I guess this is where the GAC comes in.
–
BevanJan 9 '12 at 4:47

2 Answers
2

Useful information, thanks. But, is there any way to avoid the file pollution problem?
–
BevanJan 9 '12 at 2:46

Not really. MS has gotten a bit better with moving things out of the \windows tree for installable stuff, but some things still have to go in there, regardless of how "dirty" it seems. Screensavers are one of those things.
–
Marc BJan 9 '12 at 3:09

@shf301: Leave it to MS to come up with completely back-asswards directory names. Next up, they'll finally rename the start button "shutdown" like it should've been all along.
–
Marc BJan 9 '12 at 4:45

@MarcB then you also have the fun 64/32bit Registrykey ... Wow6432Node which is where 32bit HKLM/Software goes on 64bit windows
–
Paul FarryJan 9 '12 at 6:43

A screensaver does not have to be installed into System32 (or SysWoW64).

However, the control panel won't find it and won't list it for selection.

Unless it's configured as the current screensaver.

Let me explain ... the current screensaver is specified by the SCRNSAVE.EXE registry key found in HKEY_CURRENT_USER\Control Panel\Desktop. The value of this key is the complete path to a .SCR file.

The Display (XP) or Screen Saver (Win7) control panel scans System32 (and SysWow64 on 64 bit systems) for .SCR files. It also scans the folder containing the current screensaver, if that's different.

So, if you set the registry key directly, the screensaver will be listed by the control panel and available for selection. But, as soon as the user selects a different screensaver, the next invocation of the control panel won't list the new screensaver.