开发者

Embedding Mappoint 2010 Control in C# WinForm Creates Registry Error In Win7 (64-bit)

开发者 https://www.devze.com 2022-12-26 19:54 出处:网络
I have a WinForms application with an embedded MapPoint control that I\'ve been maintaining for about 5 years now.

I have a WinForms application with an embedded MapPoint control that I've been maintaining for about 5 years now.

The application originally used MapPoint 2004, then 2006, and now we're upgrading to 2010.

Within开发者_StackOverflow社区 my development environment (VS2008/.NET 2.0 for the project) the application runs fine.

Once I create an installer and install the app and try to run that, I start encountering problems. First the application prompts the UAC in Windows 2007 64 bit, though I don't have any code that modifies the filesystem or other protected systems.

If I choose "Yes" to allow the program to run, as soon as I try to create a new instance of a map to use within my map control

this._activeMap = this._mapCtrl.NewMap(MapPoint.GeoMapRegion.geoMapNorthAmerica);

I get a messagebox from MapPoint with the following error:

Your registry settings were not copied correctly. To correct these settings, run setup again for this application.

I'm aware of the KB article (http://support.microsoft.com/kb/314590) regarding this error in Streets & Tips, but MapPoint 2010 runs fine on its own, and as I said, the app runs fine from within VS or when run from a non-protected folder (e.g. if I do an x-copy of the files to my user's directory, it runs fine).


We received the same MapPoint error (along with others) on our install. We use NSIS for our install packages; once we ran it with elevated permissions the errors disappeared. I wish I could give you more details but I was not me who coded our installer. I was simply told how we got passed the MapPoint issue. I hope it at least points you in the right direction and helps you narrow your research.


Yes elevated install permissions are typically required anyway. My experience is more for MapPoint add-ins rather than apps that use the ActiveX control. There, I use the Visual Studio installed and Add-in Express, which has special settings for UAC handling. I don't think they have anything for using Office/MapPoint ActiveX controls, but it might be worth looking.

0

精彩评论

暂无评论...
验证码 换一张
取 消