TONT 31543 Microsoft Access 的名字是怎么来的?

原文链接:https://devblogs.microsoft.com/oldnewthing/20060413-09/?p=31543

We’ve seen how the names for some Microsoft products had to be changed due to a name conflict. I’m told that the people who had to come up with the name for the database product avoided this pitfall in a clever way: Instead of trying to avoid a name that was already taken, they intentionally used a name that was already taken: By Microsoft itself.

我们已经见识过一些微软产品的名字因为命名冲突而不得不改名的情况。据说要给一款数据库产品的员工巧妙地避开了这一大坑:没有选择不使用已经被占用的名字,而是恰恰相反选择了一款已经被占用的,(而占用它的不是别人,)正是微软自己。

They discovered that Microsoft had a long-forgotten terminal emulator product called Microsoft Access. “Access” sounded like an appropriate name for a database product, so they blew the dust off it and gave the name a new life.

这些人发现微软有一款被尘封许久的终端模拟器产品叫 Microsoft Access。「Access」一听就是个适合数据库产品的好名字,于是他们就为它掸去尘土,并为这个名字赋予了新生。

TONT 31563 为什么微软防护服务的服务名叫 msmpsvc?

原文链接:https://devblogs.microsoft.com/oldnewthing/20060412-09/?p=31563

(This is the first in a series of short posts on where Microsoft products got their names.)

(本文是一系列有关微软产品如何起名的小故事的第一篇。)

The original name for the malware protection service was “mpsvc” the “Microsoft Protection Service”, but it was discovered later that that filename was already used by malware! As a result, the name of the service had to be changed by sticking an “ms” in front, making it “msmpsvc.exe”. Therefore, technically, its name is the “Microsoft Microsoft Protection Service”. (This is, of course, not to be confused with “mpssvc.exe”, which is, I guess, the “Microsoft Protection Service Service”.)

恶意软件防护服务原来的服务名叫 mpsvc,是 Microsoft Protection Service 的缩写,结果后来我们发现,那个文件名居然已经被一款恶意软件给占掉了!于是乎,服务名称就得作出修改,而修改的方式就是在前面加上一个「ms」,使其变成了「msmpsvc.exe」。故而,技术上而言,msmpsvc 代表的是「微软微软防护服务」。(当然还是不要与 mpssvc.exe 混淆了,后者我估计是「微软防护服务服务」的缩写。)

Fortunately, the Marketing folks can attempt to recover by deciding that “msmpsvc” stands for “Microsoft Malware Protection Service”. But you and I will know what it really stands for.

幸运的是,营销人员们通过让「msmpsvc」代表「微软恶意软件防护服务」尝试挽回了损失,不过你我现在都知道它的本来含义了。

TONT 37203 「诱饵」显示控制面板

原文链接:https://devblogs.microsoft.com/oldnewthing/20060410-17/?p=32703

Last time, we saw one example of a “decoy” used in the service of application compatibility with respect to the Printers Control Panel. Today we’ll look at another decoy, this time for the Display Control Panel.

在上次的文章中,我们介绍了与打印机控制面板的有关的、一个为应用程序兼容性而设的“诱饵”控制面板的案例。今天我们来讲另一个案例,这次是为了显示(属性)控制面板的。

When support for multiple monitors was being developed, a major obstacle was that a large number of display drivers hacked the Display Control Panel directly instead of using the documented extension mechanism. For example, instead of adding a separate page to the Display Control Panel’s property sheet for, say, virtual desktops, they would just hack into the “Settings” page and add their button there. Some drivers were so adventuresome as to do what seemed like a total rewrite of the “Settings” page. They would take all the controls, move them around, resize them, hide some, show others, add new buttons of their own, and generally speaking treat the page as a lump of clay waiting to be molded into their own image. (Here’s a handy rule of thumb: If your technique works only if the user speaks English, you probably should consider the possibility that what you’re doing is relying on an implementation detail rather than something that will be officially supported going forward.)

早先开发多显示器支持的时候,我们遇到的一大问题是有为数众多的显示驱动程序是直接“黑”进显示控制面板(做修改)的,而没有使用文档中给出的扩展机制。

例如,某款驱动可能没有选择在显示控制面板的属性页里多加一页的方式,来增加对诸如虚拟桌面之类功能的支持,而是选择直接“黑”进显示控制面板的“设置”页面,然后在里面加上一个按钮。有些选手则更是重量级,选择干脆把整个“设置”页面重写一遍,把所有的控件挪来挪去、放大缩小、藏起这个、显示那个,再把自家的按钮大大方方地摆上台面。

基本上,这些驱动拿着“设置”页面当成了一块粘土,爱怎么揉全看它们自己的喜好。(这里有一条经验法则:如果你的做法只在用户的语言是英语的前提下才会起效,那你多半应该考虑你的所作所为是依赖实现细节、而不是会得到官方支持的做法。)

In order to support multiple monitors, the Settings page on the Display Control Panel underwent a major overhaul. But when you tried to open the Display Control Panel on a system that had one of these aggressive drivers installed, it would crash because the driver ran around rearranging things like it always did, even though the things it was manipulating weren’t what the developers of the driver intended!

为了开发多显示器支持,“设置”页面经历了大量的重构。但(在这之后,)如果你尝试在安装了上文所述的那种激进派驱动的系统上尝试打开显示控制面板的时候,页面会崩溃,因为那些驱动还在照例跑进控制面板里去大闹天宫,却发现他们要改造的那个世界已经不是那样了!

The solution was to create a “decoy” Settings page that looked exactly like the classic Windows 95 Settings page. The decoy page’s purpose in life was to act as bait for these aggressive display drivers and allow itself to be abused mercilessly, letting the driver have its way. Meanwhile, the real Settings page (which is the one that was shown to the user), by virtue of having been overlooked, remained safe and unharmed.

(对此的)解决方案是造一个跟 Windows 95 传统的(显示控制面板)设置页面一样的“诱饵”页面,它的存在意义则是当成香饽饽,让那些激进派驱动们进去按自己的想法大闹一番,同时又确保躲过一劫的、真正向用户展示的设置页面安然无恙。

There was no attempt to make this decoy Settings page do anything interesting at all. Its sole job was to soak up mistreatment without complaining. As a result, those drivers lost whatever nifty features their shenanigans were trying to accomplish, but at least the Display Control Panel stayed alive and allowed the user to do what they were trying to do in the first place: Adjust their display settings.

作诱饵的那个设置页面,除了默默承受驱动的胡搅蛮缠之外什么用处也没有。最后的结果是,驱动们想要通过诡计实现的那些花哨功能一个也没有展现出来,但至少(真正的)显示控制面板好好地活了下来,使用户得以实现它们本来的愿望:修改显示设置。

Day 7033 雪花

已经记不清是什么时候留存下来的网络歌曲,正确的创建和修改日期已在多次数据迁移中消失殆尽,留下的唯一信息是演唱者为裔天,词、曲作者已不可考。

在本文之前,这首歌在互联网上唯一剩下的记忆可能只剩下一个老式的 LRC 下载页面,以及一篇百度知道提问。

愿它的美丽从今天起能继续流传下去。

(Soundcloud 播放器所需梯子请自理)


作为 Blog 重建工作的一部分,顺手将原来「筱林乐音」这个分类下中的条目里原来的 Flash 播放器们更新为了 Youtube 或 Soundcloud 来源,只有一篇暂时无法立即找到可用源,就那样吧。

2025 年了,会搬梯子是基础技能。

Day 7032 洒水扬尘,抑或是喃喃自语

长久以来第一次正经写博文。

也不知道是否还会有访客意识到本博客的界面发生了变动,我想是没有的,毕竟除了基本上与原来没什么变化之外,还因为更新频次已经低于一年 10 篇文章,所以不指望会有多少访客,也就不指望会有人记得之前这里长什么样子。但不论如何,这个 WordPress 是从头重新安装的(当然数据还是恢复了的),甚至整台 VPS 都是格掉重来的。

新系统装完,不发点东西表示一下好像有点不好,于是以下是一大堆零零碎碎,权当我在记流水账。 继续阅读 “Day 7032 洒水扬尘,抑或是喃喃自语”

Day 6887 为 Photoshop 的“图像处理器”增加 CR2 格式打开支持

由于工作的缘故,需要快速将一批 RAW 图片转换为 JPEG 格式,该批文件的格式较新,手里现有的 AcdSee 和 XnView 无法打开,并且已经没有时间安装 Lightroom 等软件,经查找 Photoshop 的“图像处理器”(文件-脚本-图像处理器)可以完成这一操作。

然而,在操作过程中,发现文件夹中的 CR2 格式文件被尽数跳过。经搜索,原因为 Photoshop 自带的“图像处理器”脚本在判断需要用  CameraRaw 打开的文件时并不包含 CR2 扩展名,幸好这一插件的文件是纯文本,只需对其进行修改即可。

以 Photoshop 2020 为例,用文本编辑器打开下列文件:

C:\Program Files\Adobe\Adobe Photoshop 2020\Presets\Scripts\Image Processor.jsx

在大约115行的位置找到:

gFilesForCameraRaw = Array( “TIF”, “CRW”, “NEF”, “RAF”, “ORF”, “MRW”, “DCR”, “MOS”, “SRF”, “PEF”, “DCR”, “DNG”, “ERF”, “X3F”, “RAW”);

在末尾添加 CR2 扩展名(注意保持大写),使其变成:

gFilesForCameraRaw = Array( “TIF”, “CRW”, “NEF”, “RAF”, “ORF”, “MRW”, “DCR”, “MOS”, “SRF”, “PEF”, “DCR”, “DNG”, “ERF”, “X3F”, “RAW”, “CR2”);

保存后重新调用图像处理器即可。

Day 6604 Word 中取消自动更新格式

在 Word 中编辑文档时,由于各种各样的原因(尤以外来文档居多),总会在录入一部分内容后一按回车,全文的部分内容就会变换为特定的格式(例如全部变成微软雅黑、自动缩进等等),而有时并不需要它这样多此一举——尤其是在修改一些长文档时特别烦人。

多数解决方法会要求去 Word 的选项中关闭“正文”样式的自动更新,但经尝试效果不彰,经搜索,找到一则通过 VBA 一次性关闭所有当前文档内置样式自动更新的方法:

Sub 清除自动套用格式()
  Dim update As Style
  Set Updates = ActiveDocument.Styles
  For Each update In Updates
    If update.Type = wdStyleTypeParagraph Then
      update.AutomaticallyUpdate = False
    End If
  Next
End Sub

将上述代码保存在通用模板 Normal.dotm 中,即可在任意文档中进行使用。

此处假设读者了解如何通过内置的 VBA 编辑器向 Normal.dotm 中添加宏,如不知如何操作,请在评论中提出,届时会增补相关操作步骤。

Day 6575 Windows 95 彩蛋音乐 Clouds.mid 的来源

这篇文章之前我居然没翻译?

原文地址:https://www.brianorr.com/blog/2010/01/14/windows-95-easter-egg-song-clouds-mid/


In early 1995, I was working at Microsoft as an intern software engineer on the Windows 95 team, and was approached to write the music for the hidden Windows 95 Easter Egg.

This ‘Easter Egg’ was tricky to find (see the instructions below), but once found it opened up a window with all the names of who worked on Windows 95, with my music as the theme.

1995 年的早些时候,我在微软公司的 Windows 95 团队中担任实习软件工程师,有人邀请我为隐藏的 Windows 95 彩蛋撰写音乐。

这个“彩蛋”不怎么好找(后附打开方式),不过只要找到了,系统就会打开一个窗口,展示所有为 Windows 95 开发做出贡献的人员名单,而它将会用我的作品作为背景音乐。

The only instructions I was given was that the music should invoke images of ‘clouds’ and feel ‘floating’ and ‘peaceful’ – this is how Windows 95 was going to be marketed. Well, and that it had to play well on all sound cards at the time. For 99.9% of computers, this meant through the Adlib synthesizer emulation of the Creative Labs Sound Blaster card (or equivalent clone). In other words – no sampled instruments, no effects – just simple FM synthesis. General MIDI at its finest.

So with that said, I really couldn’t do too much in terms of interesting instrumentation or sounds; and yes…it’s pretty funny to listen to the tune now. I’ve rendered it out using a GM sound module (which is better) but still doesn’t come close to the realism you’d expect from most computer music today.

我接到的仅有的指示是:这则音乐应囊括“云朵”的印象,并给人以“飘逸”、“平和”的感觉——而这正是 Windows 95 的市场定位。此外,它还需要能在当时所有的声卡上播放出来。对(当时)99.9%的环境来说,这意味着创新公司声霸卡(或者同类克隆)里的 Adlib 合成器模拟水平,换句话说,不许有采样乐器,不许有特殊效果,只能是简简单单的 FM 合成器音效,只能是最纯粹的 General MIDI。

由此,我在富有趣味性的乐器或音效方面大大受限,不过如今再度聆听这首旋律仍是一件乐事。我用 GM(Generan MIDI)的音效模块重新渲染了一下(略有提升),不过与当今多数的计算机音乐的真实度仍然难以相提并论。

Feel free to post comments or send me any questions. Here’s the tune:

请随意发表评论或向我提问(注:原文如此),曲子在这(注:以下内容托管在 Soundcloud 上,可能需要搬梯子):

These are the original instructions to actually see the Easter Egg in Windows 95. Note this doesn’t work in Windows 98 or above, nor under some versions of the Active Desktop under Windows 95.

以下是在 Windows 95 下调出彩蛋的原始方案。注意 Windows 98 及以上版本无效,在 Windows 95 下部分版本的 Active Desktop 下也可能不起效(译注:下面的文件夹命名一个字或一个标点也不能错,包括中间的空格也不能省略):

Create a new folder on the Desktop and name it EXACTLY like this

(在桌面上创建一个新文件夹,严格按照下列内容命名):

and now, the moment you’ve all been waiting for

Then rename it to:(然后将其改名为:)

we proudly present for your viewing pleasure

Rename this folder again to:(最后一次将其改名为:)

The Microsoft Windows 95 Product Team!

Double-click the new folder and enjoy the show!(现在双击这个文件夹,就能看到表演了!)

Day 6556 Windows 7 下安装航天信息打印机驱动时,提示“操作无法完成(0x00000002)”或“系统找不到指定的文件”

情况说明:

在 Windows 7 x64 操作系统下安装航天信息 SK-860 税控打印机驱动时,在正常检测到设备的前提下,发生如下情况:

(1)使用其官方安装程序,开始安装后提示“操作无法完成(0x00000002)”,随后提示打印机驱动安装失败(0x00000002 即对应“系统找不到指定的文件”错误);

(2)在设备管理器中试图更新“其他设备”下对应的打印机设备驱动时,使用官方提供的驱动程序包,可以找到对应或兼容的设备型号,但开始安装后提示“系统找不到指定的文件”。

处理经历:

首先尝试上次安装 .NET Framework 3.5 的方法,但本次该方法无效,要么在启动安装程序后没有任何反应(或走完进度条后消失),要么直接给出必须使用“控制面板”中的“打开或关闭 Windows 功能”安装或配置 Microsoft .NET Framework 3.5 SP1 的提示(因为 .NET Framework 3.5 事实上是 Windows 7 的一部分)。

然后从低到高尝试安装各种版本的 .NET Framework ,虽然成功,但并没有解决问题,又发现该机器自 2019 年以来长期未安装过更新,遂运行 Windows Update,安装完所有能检测到的更新,仍未果。

最终后知后觉想到去查看“系统找不到指定的文件”的根源,在 \Windows\inf\SetupAPI.dev.log 中查找最近一次安装该打印机的记录:

flq: CopyFile: ‘C:\Windows\System32\DriverStore\FileRepository\sk-860.inf_amd64_neutral_aa11c87673493b48\amd64\SK-860.GPD’
flq: to: ‘C:\Windows\system32\spool\DRIVERS\x64\{6C859189-FD69-4CD3-9460-EA8EF1602268}\SETDB4.tmp’
cpy: CopyFile Drp is NOT active
flq: MoveFile: ‘C:\Windows\system32\spool\DRIVERS\x64\{6C859189-FD69-4CD3-9460-EA8EF1602268}\SETDB4.tmp’
flq: to: ‘C:\Windows\system32\spool\DRIVERS\x64\{6C859189-FD69-4CD3-9460-EA8EF1602268}\SK-860.GPD’
flq: {SPFILENOTIFY_ENDCOPY}
flq: {SPFILENOTIFY_ENDCOPY – exit(0x00000001)}
flq: {_commit_copyfile exit OK}
flq: source media:
flq: Description – [Windows 安装光盘]
flq: SourcePath – [C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_neutral_02f0bd8e459ed8b3\Amd64]
flq: SourceFile – [UNIDRV.DLL]
flq: Flags – 0x00000000
flq: {SPFQNOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA – exit(0x00000000)}
flq: {SPFQNOTIFY_NEEDMEDIA – returned 0x00000000}
!!! flq: source media: SPFQOPERATION_ABORT.
!!! flq: Error 2: The system cannot find the file specified.
flq: {_commit_copy_subqueue exit(0x00000002)}
!!! flq: FileQueueCommit aborting!
!!! flq: Error 2: The system cannot find the file specified.
flq: {SPFILENOTIFY_ENDQUEUE}
flq: {SPFILENOTIFY_ENDQUEUE – exit(0x00000001)}
flq: {_commit_file_queue exit(0x00000002)}

注意其中带下划线的两行,明确指出了驱动安装过程中找不到的文件。

经查询,该问题主要出现在一些经过优化或精简的 Windows 7 系统上,在本例中,ntprint 所在驱动包目录名原本包括 02f0bd8e459ed8b3 和 4616c3de1949be6d 两个版本,而本次安装需要的 02f0bd8e459ed8b3 不存在,所以出错,解决方法有二:

(1)将 ntprint.inf_amd64_neutral_4616c3de1949be6d 文件夹及其内容复制一份,并改名为 ntprint.inf_amd64_neutral_02f0bd8e459ed8b3

(2)直接将 ntprint.inf_amd64_neutral_4616c3de1949be6d 文件夹改名为 ntprint.inf_amd64_neutral_02f0bd8e459ed8b3

完成上述操作后,重新安装驱动即可。