So I asked a question with the same title earlier and got an answer that works for the most part. My issue now is that the string table in the Win32 resource file is not working on Windows Server 2003 (maybe others too, limited O/S testing at this point).
Testing results:
Displays correctly:
- Windows XP
- Windows Vista
- Windows 7
Doesn't display correctly:
- Windows 2000 Professional
- Windows Server 2003
I know the solution provided in the answer to my first question works as expected in Windows XP and Vista but is not working on Windows Server 2003. Do I have to do something different to get my "friendly" screensaver name to show up in Windows Server 2003?
My resource file only contains two items:
- Icon - ID: 1
- String Table
- String - ID: < empty >, Value: 1, Caption: CC.Votd
And the behavior is the same if I go back to a resource file that only contains the string table.
Edit: I tried adding another string:
- String - ID: < empty >, Value: 100, Caption: CC.Votd
As I've seen that in other screensavers that display the correct name in Windows Server 2003 but nothing changed. It's frustrating because I don't see consistency when I use a resource explorer to browse the screensavers that come with Windows.
Some specify a string with a value of 1 and the friendly name. Others also specify a string with a value of 100. Some don't even include a string table but still show a different name than the executable filename.
Update: I created a very basic solution that shows how I'm creating and using the resource file. If you copy the .scr file to the system directory on a XP/Vista box you'll see "Friendly Screen Saver Name" in the drop down. On Windows Server 2003 you'll see "So_screensaver_display_name" (the executable name w/o extension). You can download this here: http://www.ccswe.com/temp/SO_ScreenSaver_Display_Name.zip
Edit: It would also be helpful if someone, running Windows Server 2003, would compile and test my example project above so I can determine if this is specific to my Windows Server 2003 machine or not.
Also interested in the results on any other OSes since I only have XP/Vista/2003 to test with locally. Thanks!
Update: I was able to test on a different Windows Server 2003 (R2) machine and the results are the same. Also displays incorrectly on Windows 2000 Professional. Works on a Windows 7 machine though.
Solution: As mentioned in the accepted answer I renamed my file from CC.Votd.scr
to CCVotd.scr
and now Windows 2000/2003 properly read the description, CC.Votd
from my string table and display that in the drop down. I still don't understand the "why" a non-DOS 8.3 filename caused it to not use my description but it's fixed at least.