检测Compact Framewok是否安装在移动设备上

时间:2022-06-04 03:47:28

Ive written an application using the .net compact framework. One of the requirements is that a check is run before app runs to see if the compact framework is installed. If not I should prompt this to them and redirect them to cf download location.

我用.net紧凑框架编写了一个应用程序。其中一个要求是在app运行之前运行检查以查看是否安装了紧凑框架。如果不是,我应该向他们提示并将其重定向到cf下载位置。

What would be the best most common approach to doing this. Obviously my .net wont run in the first place if .net cf is not installed, do i need to write this in eVc++?

这样做最常用的方法是什么。显然,如果没有安装.net cf,我的.net将不会首先运行,我是否需要在eVc ++中编写?

Much appreciate your thoughts on the Tony

非常感谢你对Tony的看法

2 个解决方案

#1


This is an MSDN article about creating an MSI Package that detects and updates the .NET Compact Framework, if this is required. It is pretty old, but the principles still apply. You need to write a dll that will run in the phone. You first search for compact framework's dll files and then you can get the version from a registry key. You can also detect the device type and install the appropriate compact framework cab files.

这是一篇关于创建检测和更新.NET Compact Framework的MSI包的MSDN文章(如果需要)。它已经很老了,但原则仍然适用。你需要编写一个将在手机中运行的DLL。您首先搜索紧凑框架的DLL文件,然后您可以从注册表项获取该版本。您还可以检测设备类型并安装相应的紧凑框架cab文件。

If you want to do it with a cab file, the process is still the same. See this link on how you can run a set-up dll from a cab file.

如果您想使用cab文件,则过程仍然相同。请参阅此链接,了解如何从cab文件运行设置dll。

#2


Also check out Mobile Packager. We have used it to bundle multiple CAB deployment including .NET compact framework and only install it if it is not already installed.

另请查看Mobile Packager。我们已经使用它来捆绑多个CAB部署,包括.NET紧凑框架,只有在尚未安装的情况下才安装它。

#1


This is an MSDN article about creating an MSI Package that detects and updates the .NET Compact Framework, if this is required. It is pretty old, but the principles still apply. You need to write a dll that will run in the phone. You first search for compact framework's dll files and then you can get the version from a registry key. You can also detect the device type and install the appropriate compact framework cab files.

这是一篇关于创建检测和更新.NET Compact Framework的MSI包的MSDN文章(如果需要)。它已经很老了,但原则仍然适用。你需要编写一个将在手机中运行的DLL。您首先搜索紧凑框架的DLL文件,然后您可以从注册表项获取该版本。您还可以检测设备类型并安装相应的紧凑框架cab文件。

If you want to do it with a cab file, the process is still the same. See this link on how you can run a set-up dll from a cab file.

如果您想使用cab文件,则过程仍然相同。请参阅此链接,了解如何从cab文件运行设置dll。

#2


Also check out Mobile Packager. We have used it to bundle multiple CAB deployment including .NET compact framework and only install it if it is not already installed.

另请查看Mobile Packager。我们已经使用它来捆绑多个CAB部署,包括.NET紧凑框架,只有在尚未安装的情况下才安装它。