Little-known windows "plug-in" Msi

Source: Internet
Author: User
I. First recognized WINDOWS function enhancement "plug-in" Msi

We often see that many software only have one file with the extension MSI. If you double-click this file to run it, there will be a very similar installation process as windows application software installation. What is the MSI file? Why did a lot of software begin to be released in MSI format? Let me talk about it.

1. Sources of MSI files
Speaking of MSI files, we have to talk about Windows Installer. It is not just an installation program, but an extensible software management system. Windows Installer is used to manage software installation, add and delete software components, monitor file recovery, and maintain basic disaster recovery using rollback technology. In addition, Windows Installer supports installing and running software from multiple source locations and can be customized by developers who want to install custom programs. To use these functions, you must use the MSI file. The MSI file is a Windows installer package. It is actually a database that contains the information required to install a product and is installed (and uninstalled) in many installation scenarios) the commands and data required by the program. The MSI file associates the component files of the program with functions. It also contains information about the installation process itself, such as the installation sequence, target folder path, system dependencies, installation options, and attributes that control the installation process.

2. Advantages of MSI
The Windows Installer technology is a combination of the client Installer Service (msiexec.exe) and Microsoft software installation (MSI) package files.

The msiexec.exe program is a component of Windows installer. When msiexec.exe is called by the installer, it reads the package file (. MSI) and application conversion file (. MST) with MSI. dll and merges the command line options provided by the installer. Windows Installer executes all installation-related tasks, including copying files to a hard disk, modifying the registry, creating a desktop shortcut, and displaying a prompt dialog box when necessary, so that you can enter the installation preferences.

When you double-click an MSI file, msiexec.exe, a file associated with Windows Installer, is called. DLL to read the package file (. MSI), application conversion file (. (MST) for further processing, and then the Windows Installer executes all installation-related tasks, including copying files to the hard disk, modifying the registry, and creating Desktop shortcuts, if necessary, a prompt dialog box is displayed so that you can enter the information required for installation. In this way, a program is installed on your computer.
The advantage of using MSI for installation is that you can delete them and change the installation options at any time. Even if unexpected errors occur during the installation process, you can safely restore them to the previous status, with this powerful function, more and more software began to use MSI as a release method. If you are interested in MSI files, you can use WinRAR and other compression software to open them and check the content to satisfy your curiosity.

3. MSI file installation support program: winme and WINXP support MSI well, but other versions of Windows need to install a plug-in to use MSI files.

[Url = http://download.microsoft.com/download/windowsinstaller/install/2.0/nt45/en-us/instmsi1_exe]Click here to download the instmsiw plug-in[/Url]

Ii. Customize your MSI file

We have introduced a lot of MSI file contents. In fact, MSI is not mysterious and complicated. We can make it on our own, and the tool used to create the MSI file is already on the Windows installation disk.

First, find the installation disc of windows and double-click the file at the bottom: valueadd \ 3rdparty \ MGMT \ winstleadmle. MSI,
(This file has been uploaded to the Internet. You can download it here)
Soon the software was automatically installed on the computer. In all the programs in the Start menu, the "Veritas Software" group is added. Click "Veritas discover" in the running menu to start creating the MSI file.

The basic principle for creating an MSI file is to take a "snapshot" of the computer disk before installing a software ". The software to be installed is then installed on the computer, and the Registry and other content are modified. After confirming that the software runs correctly, a "snapshot" is taken for the computer disk ". The discover software automatically finds out the differences between two "snapshots" and generates an MSI file. Finally, if you want to, you can use another tool in the Veritas Software Group: Veritas Software console to further package and adjust the MSI file, so that an MSI file package is generated.

Next, we will use an example to illustrate how to use discover to generate an MSI file. Assume that the installation process of my software is: Install the my.exe file to C: \ programmeme files \ myprog, run. DLL is placed in Windows \ system, create a myprom item in the software item of HKEY_LOCAL_MACHINE in the registry, and add a value project with the value of OK to it.

Step 1: Run discover. The program interface is displayed. You can click "Next" to continue.

Step 2: In the dialog box in Figure 3, first name your program in the first text box, for example, "My programmeme "; the second dialog box shows the storage location and file name of the output MSI file. Here, save the file as E: \ my_setup.msi. The third box is the language of the compressed package. You can use its default value. After filling in the information, click "Next.

Step 3: select a temporary space for the Discover snapshot file. You can select a disk with a relatively large disk space.

Step 4: In the next 4 dialog box, select the disk on which the Discover disk needs to be scanned and taken a "snapshot". Select the disk on which your program is installed, click the "add" button to add it to the list of files to be scanned. You can select a few or all disks, but this will waste more time in the scanning process, therefore, select as few disks as possible. Here we only select disk C, because our software is mounted to disk C. Click "Next ".

Step 5: In the dialog box shown in figure 5, select the folder or file to be scanned for each disk selected in the previous step. Because we only selected disk C in the previous step, select disk C. In addition, discover automatically adds some special files and directories. We can decide whether to remove them from the list of files to be scanned as needed, but it is best to keep them. Here we add the "C: \ programmeme Files" and Windows folders. First, click the file or folder in the file box on the left, and then click the Add button. For registry scanning, discover only scans some registries to speed up scanning. It can scan most programs to modify the Registry. If you are not at ease, you can also set the "enhanced registry scan" below, which may be much slower and the temporary files will be greatly increased, but you can record all the changes to the registry. Since our software only makes minor changes to the registry, it is not necessary to scan all registries. Click "Next" to continue.

Step 6: Next, discover will scan the system to generate a "snapshot". It may take several minutes to wait patiently.

Step 7: After the scan is complete, a dialog box will pop up, which means to tell you that the scan has been completed and ask if you want to select a program to run and then automatically install your software, we are about to create an installer and there is no program to run, so click "cancel.

Step 8: Next, we need to manually install the software, copy the my.exe file to c: \ programmeme files \ myprog, and then run. the DLL is copied to Windows \ system, and then a myprom item is created in the software item of HKEY_LOCAL_MACHINE in the registry using the Registry Editor, and a value key with the OK value is added to it. Note that, in addition to these changes, try to avoid other irrelevant changes. Then we try to run the just-installed my.exe file to test whether the installation is correct.

Step 9: Check whether the installation is correct. You need to run the Discover program again. When you run the Discover program this time, there is an interface shown in Figure 6 with two options, the first option is to generate an installed snapshot to generate an MSI file compared with the previous snapshot. The second option is to discard the previous scan. Of course, you must select the first one, click "Next ". At this time, discover began to scan the computer again, generate a "snapshot", and automatically generate an installation file.

Step 10: if you want to, you can start the Veritas Software console that is associated with the Discover program to further modify the information of the MSI file. The process is relatively simple. You only need to open an MSI file first, then you can make the changes. We will not introduce them here.
In this way, we generate an MSI file of our own.

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.