Use ActiveSync to create a PC-side Installer)

Source: Internet
Author: User

Installation packages are often used during normal development. In the face of different developers' needs, there are also a variety of installation package requirements. There are many methods and tools for creating Installation packages, it is convenient and troublesome. Next I will introduce the methods and processes that I usually use. I am not very convenient, but I am familiar with them. I hope to help anyone who needs them, please give us more advice on any mistakes. Generally, I divide the installation package into the following steps: 1. Compile Program , Organize the installation package Creation environment as needed, create a directory, and copy the target file with the compiled link and other required files. 2. Compile the INF file. Here we can set the local directory from which the installation file will be obtained, which files will be imported into the installation package, and which directories will be installed on the device, which registry content should be written during installation and whether to set shortcuts? 3. Compile setup dll as needed. (Optional) 4. Call cabwiz.exe (from my experience, it seems that the PPC and SP package programs are different. Pay attention to this), determine whether to compress and other options, and compress them into a cab file, this file can be directly copied to the device for installation. 5. Call the PC-side ActiveSync installation. (Optional) there are already some Article This article introduces how to create an installation package, so I will not bother with it. Next I will introduce how to use ActiveSync to implement the PC-side installation program. ActiveSync is Microsoft and Windows Mobile synchronization software, the new version 4.1: http://www.microsoft.com/downloads/details.aspx? Familyid = 4c254e3f-79d5-4012-8793-d2d180a42dfa & displaylang = EN ActiveSync provides command line to help us install the Windows Mobile installer in the format of C:/program files/Microsoft ActiveSync/ceappmgr.exe C: /program files/Microsoft ActiveSync/MyApp. in INI, C:/program files/Microsoft ActiveSync/is the installation directory of ActiveSync, MyApp. INI is very simple. The format is as follows: [ceappmanager] version = 1.0 Component = smartphone [smartphone] Description = MyApp Uninstall = MyApp Cabfiles = MyApp. Arm. Cab To create a PC-side installation program, you only need to perform the following steps: 1. Create the installation package and copy the cab file and the written INI file to the specified directory (for example, C:/program files/Microsoft ActiveSync/MyApp ,) 2. Compile the PC-side program and add the command line call: Tchar szcommandline = _ T ("C:/program files/Microsoft ActiveSync/ceappmgr.exe "); Tchar szparameter = _ T ("/" C:/program files/Microsoft ActiveSync/MyApp. INI /"") : ShellExecute (null, null, szcommandline, szparameter, null, sw_shownormal );   Try it. Can it work? In the preceding example, the installation path of ActiveSync is dead, and the portability is poor, but it doesn't matter, we can read the installation path of ActiveSync from the installeddir key value in the Registry key HKEY_LOCAL_MACHINE/software/Microsoft/Pegasus, so that our programs can be installed on other machines, of course, the premise is that ActiveSync must be installed. J You are welcome to make a brick.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.