简体   繁体   中英

CAB project targetting only Windows Mobile 6.1 or 6.5.3 devices - Way to restrict the install?

I was looking to create a CAB project in Visual Studio 2008 in order to deploy an application to several Windows Mobile devices. Among those devices, some of them are running Windows Mobile 6.1 , others Windows Mobile 6.5 and the last ones Windows Mobile 6.5.3 .

I want to restrict the possibility to install my CAB to the 6.1 & 6.5.3 terminals, not the 6.5 ones.

I already used in the past CAB projects and so I looked at the property window of my project in order to see if I can set the OS minimum/maximal version or if there was a field to excluse some OS versions. The fields are described here: http://msdn.microsoft.com/en-us/library/ms228717%28v=vs.90%29.aspx

Especially:

OSVersionMax

Specifies the maximum Windows CE operating system version number on which the .cab file can be installed. There are several ways to determine the operating system version number of a device:

  • See Operating System Version of Windows Mobile Devices.
  • View the About page on the device.
  • Programmatically query the device by using OSMajor and OSMinor.

OSVersionMin

Specifies the minimum Windows CE operating system version number on which the .cab file can be installed. There are several ways to determine the operating system version number of a device:

  • See Operating System Version of Windows Mobile Devices.
  • View the About page on the device.
  • Programmatically query the device by using OSMajor and OSMinor.

The versions of the OS are based on Windows CE version ( http://msdn.microsoft.com/en-us/library/dd722874%28v=vs.90%29.aspx ):

Windows Mobile 6.5.3 ==> 5.2.23090

Windows Mobile 6.5 ==> 5.2.21234

Windows Mobile 6.1.4 ==> 5.2.20757

Windows Mobile 6.1 ==> 5.2.19202

I can't any solution to generate only 1 CAB compatible with my 6.1 & 6.5.3 but not 6.5.

It seems that I should do 2 CAB, each targeting one version. Any idea?

Create a custom setup.dll that does the OS version check before installation.

MSDN Documentation is here (though they seem to move links all the time).
Another example of the code is here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM