如何控制下拉列表中显示的屏幕保护程序(友好/显示)名称? - Windows Server 2003 / Windows 2000

发布于 2024-08-23 04:10:22 字数 2192 浏览 1 评论 0原文

所以我问了一个 问题早些时候相同的标题并得到了大部分有效的答案。我现在的问题是,Win32 资源文件中的字符串表在 Windows Server 2003 上不起作用(也许其他版本也,此时操作系统测试有限)。

测试结果:

正确显示:

  • Windows XP
  • Windows Vista
  • Windows 7

无法正确显示:

  • Windows 2000 Professional
  • Windows Server 2003

我知道提供的解决方案我的第一个问题的答案中的内容在 Windows XP 和 Vista 中按预期工作,但在 Windows Server 2003 上不起作用。我是否需要做一些不同的事情才能让我的“友好”屏幕保护程序名称显示在 Windows Server 2003 中?

我的资源文件仅包含两项:

  • Icon - ID: 1
  • String Table
    • 字符串 - ID: <空 >,值: 1,标题: CC.Votd

如果我返回到仅包含字符串表的资源文件,则行为是相同的。

编辑:我尝试添加另一个字符串:

  • String - ID: <空 >,值: 100,标题: CC.Votd

正如我在 Windows Server 2003 中显示正确名称的其他屏幕保护程序中看到的那样,但没有任何变化。这很令人沮丧,因为当我使用资源浏览器浏览 Windows 附带的屏幕保护程序时,我看不到一致性。

有些指定一个值为 1 的字符串和友好名称。其他还指定一个值为 100 的字符串。有些甚至不包含字符串表,但仍然显示与可执行文件名不同的名称。


更新:我创建了一个非常基本的解决方案,它展示了我如何创建和使用资源文件。如果将 .scr 文件复制到 XP/Vista 机器上的系统目录,您将在下拉列表中看到“友好屏幕保护程序名称”。在 Windows Server 2003 上,您将看到“So_screensaver_display_name”(不带扩展名的可执行文件名称)。您可以在此处下载:http://www.ccswe.com/temp/SO_ScreenSaver_Display_Name.zip< /a>

编辑: 如果有人运行 Windows Server 2003,编译并测试上面的示例项目,这样我就可以确定这是否特定于我的 Windows Server 2003 计算机,这也会很有帮助。

也对任何其他操作系统上的结果感兴趣因为我只有 XP/Vista/2003 可以在本地进行测试。谢谢!

更新:我能够在不同的 Windows Server 2003 (R2) 计算机上进行测试,结果是相同的。在 Windows 2000 Professional 上也无法正确显示。但可以在 Windows 7 机器上运行。


解决方案:正如已接受的答案中所述,我将文件从 CC.Votd.scr 重命名为 CCVotd.scr,现在 Windows 2000/2003 已正确重命名从我的字符串表中读取描述 CC.Votd 并将其显示在下拉列表中。我仍然不明白“为什么”非 DOS 8.3 文件名导致它不使用我的描述,但至少它已修复。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

后eg是否自 2024-08-30 04:10:22

重命名 scr 文件以符合 DOS 8.3 文件名约定。没有任何记录,在 kb137250 中进行了模糊描述。

Rename the scr file to conform to DOS 8.3 file name convention. Not documented anywhere, vaguely described in kb137250.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文