使 Windows CE 卸载程序正常工作
在我正在使用的某些设备上,\Windows
目录不在永久存储中。也就是说,一旦设备重新启动,写入 \Windows
的任何内容都会丢失。这对于卸载程序来说尤其成问题,因为 wceload.exe
(Windows CE CAB 安装程序)会生成 .unload 文件并将其放置在 \Windows
中。该应用程序可以在设备重新启动之前卸载,但之后就无法卸载(控制面板中的“删除程序”工具返回错误,提示无法打开卸载文件)。那么如何才能让 .unload 文件在重新启动后仍然存在呢?有什么方法可以控制卸载程序(我相信它称为 unload.exe
)在哪里查找 .unload 文件?
On some of the devices that I am working on, the \Windows
directory is not on permanent storage. That is, once the device is rebooted, whatever was written to \Windows
is lost. This is particularly problematic for uninstalling programs since wceload.exe
(the Windows CE CAB installer program) generates a .unload file and places it in \Windows
. The application can be uninstalled before the device is rebooted, but afterward it can't (the "Remove Programs" tool in the control panel comes back with an error about not being able to open the unload file). So how can I get the .unload file to persist across reboots? Is there any way to control where the uninstaller (I believe it is called unload.exe
) looks for the .unload file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我还没有找到任何关于此的好信息。看起来卸载文件的路径是硬编码的,所以我能做的最好的就是备份卸载文件。如果用户希望卸载,则必须手动将文件复制到 \windows 目录,然后使用控制面板中的卸载工具。以下是更多信息:
http://www. Generation-nt.com/us/answer/wince5-force-wceload-install-unload-into-nonvolatile-memory-help-87676002.html
I haven't been able to find any good info on this still. It looks like the path to the unload file is hardcoded so the best I can do is make a backup of the unload file. If the user wishes to uninstall they will have to manually copy the file to the \windows directory and then use the uninstall tool in the control panel. Here is more info:
http://www.generation-nt.com/us/answer/wince5-force-wceload-install-unload-into-nonvolatile-memory-help-87676002.html
您可以在安装后将 .unload 文件复制到持久目录,从而在重新启动后保留该文件。此目录可能因设备而异,例如
\Hard Disk\ramroot\Windows
或\Backup\Windows
。然后,它会在重新启动时自动复制到\Windows
中。 (尽管我不确定每个设备是否都存在这样的目录和行为。)要复制此文件,您需要在安装完成后从自定义 setup-dll 执行复制语句。 这个 codeproject-site 有非常全面的解释,截图和代码。
You can probably keep the .unload file across reboots by copying it to a persistent directory after installing. This directory may vary per device, e.g.
\Hard Disk\ramroot\Windows
or\Backup\Windows
. It will then automatically be copied to the\Windows
on reboot. (Although I am not sure whether such a directory and behavior exist for every device.)To copy this file you need to execute a copy-statement from a custom setup-dll after the install completes. This codeproject-site has a very comprehensive explanation, with screenshots and code.
只需重新安装应用程序,然后从控制面板中的删除程序卸载即可。
Simply re-Install application and then un-install from remove programs in control panel.