Martti Malmi 通信

回复:安装、自动运行、v0.1.6

中本聪 · 2009 年 10 月 18 日

SN-10073 附来源、原文与上下文。

阅读语言

可能是 Bitcoin 运行了,但因为某些问题又退出。如果是这样,debug.log 应该能说明一些情况。你用的是什么操作系统?我在想,我们是不是需要管理员权限,却没有意识到。在 Vista 上,需要管理员权限的程序不能在启动时运行。

It's possible Bitcoin ran and bailed out because something was wrong. debug.log should tell something if that was the case. What OS are you using? I wonder if we need Admin privilege and don't realize it. Stuff that requires Admin can't start on startup on Vista.

程序快捷方式的设置有多个选项卡,里面有很多小细节。我会试试启动文件夹的代码,看看能否复现这个问题。我电脑上其他所有系统托盘图标都在启动文件夹里,这让用户能方便地在一个地方管理所有自动运行的程序。注册表项里的那些东西,往往是偷偷隐藏的臃肿软件。

Program shortcuts have multiple tabs of settings with lots of little details. I'll try the startup folder code and see if I can reproduce the problem. Every other systray icon on my computer is in the startup folder, and it makes it easy for users to manage all their autoruns in one place. The things in the registry key tend to be devious hidden bloatware.

我实现了在每次关闭 wallet.dat 时都将其写入磁盘的代码,这样我们就能告诉用户,他们只需要备份 wallet.dat。你可以只恢复 wallet.dat,其余内容会重新下载。发布前我还得再做一次压力测试。

I implemented the code to flush wallet.dat whenever it's closed so we'll be able to tell users they only need to backup wallet.dat. You can restore just wallet.dat and it'll re-download the rest. I'll have to do another stress test before release.

引用 Martti Malmi 的文字Martti Malmi来源 ↗

嗯,代码能运行,也在启动文件夹里创建了快捷方式。不知为什么,开机时它没有自动启动,但在菜单里点击它时却能正常运行。现在我试着手动创建了一个快捷方式,这次它能自动启动了,不知道为什么。我可以再试试旧代码。

Well, the code worked and made a shortcut in the startup folder. For some reason it didn't automatically start when booting, but worked fine when you clicked on it in the menu. Now I tried making a shortcut manually, and this time it works on autostart, don't know why. I could try again with the older code.

引用中本聪此前的文字中本聪来源 ↗

我找到了,看到你在改用注册表之前,已经提交过启动文件夹的代码。代码中我没看出明显的问题。我想这取决于“默认情况下并不总是工作”具体是什么问题。是 Vista/UAC 安全机制的问题吗?

I got it, I see you checked in the startup folder code before changing it to registry. I don't see any visible problems in the code. I guess it depends what exactly the problem was with it not always working by default. Was there a Vista/UAC security problem?

引用中本聪此前的文字中本聪来源 ↗

启动文件夹里的快捷方式出了什么问题?如果你能把代码发给我,我想再看一遍,看看能否找出问题所在。注册表代码里的第一个 strcat 应该是 strcpy,否则会间歇性失败。如果快捷方式版本用了同样的代码,也许问题就在这里。

What was the problem with the shortcut in the startup folder? If you could send me the code, I'd like to take another look and see if I can see what the problem was. The first strcat in the registry code should be strcpy, otherwise it would fail intermittently. If the same code was in the shortcut one, maybe that was the problem.

引用 Martti Malmi 的文字Martti Malmi来源 ↗

我为最新版 Bitcoin 做了一个 Windows 安装程序,其中包括自动启动和最小化到托盘功能。安装程序会创建开始菜单快捷方式和一个启动注册表项。我最初通过在启动文件夹里放快捷方式来实现自动启动,但发现它在默认情况下并不总能工作,最后改用了注册表项。卸载程序会移除这个注册表项,也可以从选项菜单中禁用它,所以我觉得,说到底,它对用户也没有那么大的威胁。

I made a Windows installer for the latest version of Bitcoin, which includes the autostart and minimize to tray features. The installer makes a start menu shortcut and a startup registry entry. I first implemented the autostart with a shortcut to the startup folder, but I found out that it doesn't always work by default and ended up doing it with a registry entry. The registry entry is removed by the uninstaller and can be also disabled from the options menu, so I don't think it's such a big menace to the user after all.

来源

阅读字号

选择适合你的字号,之后阅读会继续使用。