Errors when installing programs from the Windows Installer “.msi” package. Creating msi packages and installing any software using Windows group policies Run msi as administrator

Some programs and drivers in Windows should only be installed with administrator rights. In the case of EXE files, the option to install as administrator is present in context menu, which is called by right-clicking on the file. There is no such option for MSI packages, but you can add it through the registry editor.

Instructions

Open the Run dialog via the start menu or by pressing the Win+R key combination. In the window that opens, write regedit and press Enter. The Registry Editor will launch. Depending on your User Account Control settings, you may be asked to confirm that you want to launch the editor.

Go to the HKEY_CLASSES_ROOT\Msi.Package\shell branch. Click right click mouse on “shell” and in the menu that opens, select the option to create a new partition.

A subsection will be added to the “shell” section. Rename it "runas" (no quotes needed).

In the window on the right, double-click on the “Default” key or once with the right mouse button and select “Change...” In the empty value field, enter “Run as Administrator”. Confirm the changes by pressing the OK button.

Now right-click on “runas” and select the create partition option again. Create a subkey named "command" (without the quotes).

Edit the "Default" key by entering the command "msiexec /i "%1"" in the value field (without the herringbone quotes, but with quotes for %1). Click OK.

A fairly common problem among users of the Windows operating system of any version is the msi error when installing programs from a file with the .msi extension. In this article, I will describe common problems with the Windows 7/10/XP installer and solutions to them, and also make a video on the current issue.

Files with the .msi extension are regular installation packages (distributions) from which the program is installed. Unlike the usual "setup.exe", to run the file msi system uses the Windows Installer service (msiexec.exe process). Speaking in simple words, Windows Installer will unzip and run the files from the distribution. When Windows Installer does not work, various errors appear.

In general, this really infuriates me, because... After a stupid error message, it’s completely unclear what to do next. Microsoft specifically developed the Windows Installer to expand the capabilities of installing programs (mainly for system administrators), but did not take proper care to ensure that the service would run smoothly or even adequately report problems. Now we have to sort it out :)

Problems may be with the operation of the service itself or may arise during the installation of programs, when everything is configured, in principle, correctly. In the first case, you need to tinker with the installer service, and in the second, solve a problem with a specific file. Let's consider both options, but first the second one.

msi file errors

Very often errors appear due to insufficient system rights to files or folders. This is not to say that Windows Installer does not work; in this case, you just need to add the necessary rights and everything will work. Just yesterday I was faced with the fact that the downloaded distribution kit.msi did not want to be installed, the installation wizard starts successfully, the parameters are selected, but then the system thinks for a few seconds and gives an error:

"Error reading from file 'filename' verify that the file exists and that you can access it" (Error 1305). Translated: “Error reading from file...check if the file exists and if you have access to it.” Well, aren't you stupid? Naturally, the “Retry” button does not help, and canceling stops the entire installation. The message also does not carry any special meaning, because the file definitely exists and I have access to it, otherwise I simply wouldn’t be able to run it and receive this message, and for some reason it’s in English :)

And the mistake is that it is not I who should have access to the file, but the Windows installer, or rather the System itself. The solution is very simple:

Now the installer error will not appear! You can add access to the entire folder from which you usually install programs, for example, to the “Downloads” folder, like mine. Watch a video on solving problems with access rights:

In Windows XP, the Security tab will not appear if simple file sharing is enabled. To turn it off, you need to go to “Start -> Control Panel -> Folder Options -> View” and turn off the “Use simple file sharing” option. In stripped-down versions of Windows 7/10 and XP, there is no “Security” tab at all. To see it, you need to log in as an administrator.

More ways to solve the problem


The described method will help with different messages, with different numbers. For example, you may see msi file errors like this:

  • Error 1723
  • Internal Error 2203
  • System error 2147287035
  • Error: "This installation package cannot be opened"
  • Error 1603: A fatal error occurred during installation

In all these cases, setting permissions on the file and/or on some system folders should help. Check if the "system" has access to the temporary files folder (you may receive the error "The system cannot open the specified device or file"). For this:

After pressing “Enter” the path will change to “normal” and you will be moved to the real temporary folder. The rights to it need to be checked. I also recommend clearing temporary folders of everything that has accumulated there, or even better, deleting them and creating new ones with the same names. If you can’t delete a folder, read, but it’s not necessary.

If Windows service Installer still does not want to work, then check the rights to the folder "C:\Config.Msi", here the “system” must also have full access. In this case, you might have seen the error “Error 1310”. Just in case, make sure that the folder WHERE you are installing the software also has all rights.

Registry and service settings

The next way to resolve the error is to restore operating parameters in the Windows Installer registry.

To do this, download the archive and run two reg files from there, according to your Windows versions. Agree to import settings.

Important! Before last action desirable! If the method does not help or gets worse, you can recover to your previous state.

In Windows XP or Windows Server 2000 install the latest installer version 4.5.

If this does not help, then re-register the components:

  1. Press "Win + R" and enter " cmd". Then in the black window enter the following commands in sequence:
    MSIExec /unregister
    MSIExec /regserver
  2. The answer should be empty, no errors. If the problem is not solved, enter another command
    regsvr32 msi.dll
  3. Close the black window

If it says that you do not have enough rights, then you need to run .

If the commands were executed, but did not help, then run msi_error.bat from the archive and check the result.

The last option is to download the Kerish Doctor program, it has a function for fixing the installer service and many others common problems Windows.

Also, many programs use the .NET Framework, so it would be a good idea to install the latest version of this package. And, finally, one more piece of advice: if in the path to the distribution file there is at least one folder with a space at the beginning of the name, then remove the space. This simple trick will solve your problem :)

Summarizing

Errors with the Windows installer are very unpleasant, there are a lot of them and it’s not immediately clear where to look. One thing is clear - the system has failed and needs to be restored to working condition. Sometimes nothing helps and you have to. However, do not rush to do this, try asking for help on this forum. Describe your problem exactly, tell us what you have already done, what messages you have received, and perhaps they will help you! After all, the world is not without good people :)

Introduction

Our installers for Windows contain a complete client side installation package (MSI) (built on the basis of Windows Installer v2.0). Instructions for network installation assumes that the user is familiar with the basics of Windows Installer, particularly deployment MSI files. This package can be used with any operating system Windows system, supporting Windows Installer v2.0.

Installation on a network server

  1. Do double click on the received file ( Yenka_Setup_(MSI).exe)
  2. Install this package into the folder public access to your programs.
  3. Attention : The program must be activated BEFORE deploying the package on the network. To do this, run "Yenka.exe" from the folder where you installed the program (<путь установки>\program files\Yenka\Software\Yenka.exe), and follow the Activation Instructions.

Installation

Installing an MSI package using the command line

  1. In the command field, enter the line:
    msiexec /i"<путь к MSI файлу>\YK.msi"
    Where:<путь к MSI файлу>this is the path to the file Windows package Installer. For example, the line might look like this: msiexec /i"C:\Program Files\Yenka\YK.msi"
  2. Press ENTER
    Attention: The Windows Installer service allows installation in “stealth” mode, using the “/q” switch. For example: msiexec /i"C:\Program Files\Yenka\YK.msi" /q. To show the installation progress indicator, you can use the key " /qb".

Uninstalling an MSI package using the command line

  1. From the Start menu, select "Run..."
  2. In the command field, enter the line:
    msiexec /x"<путь к MSI файлу>\YK.msi"
    Where:<путь к MSI файлу>this is the path to the Windows Installer package file
  3. Press ENTER

Good day, Habr! I would like to present an interesting, in my opinion, way of creating msi installers for anyone software and, as a result, its deployment using GPO. I would like to emphasize that the described method does not imply the creation of “snapshots” of the system, but uses native software installers, and only free products for commercial use are used to create msi.

Introduction, a couple of links and a disclaimer

Every normal software installer has the ability automatic installation with defined or default parameters. The essence of my method is simple and consists in packaging the native installer into an msi “container” and launching it with necessary parameters command line. There is a lot of information on the Internet about automatically installing this or that application, and I will not focus on this. Our goal, I repeat, is to install software using group policies. By the way, some of you may argue that the installation can be done through ZAW, but, unfortunately, this method applicable only for installation with the rights of the current user and cannot be used for centralized automatic installation of applications.

An interesting series of articles on installing software via GPU. For beginners, I recommend reading everything so as not to ask later what the difference between the “assigned” and “public” installation type is.

Required software. Exe to MSI Converter freeware and the well-known orca The first one is needed in order to create an msi from an exe, and the second one is needed so that the resulting msi nickname can be installed through group policies.

The method does not claim to be completely unique and in some places there may be excesses that could be avoided, but this is due to the lack of desire and need to delve too deeply into the parameters of the msi package tables. The initial goal was to quickly find free way creating msi and after several hours spent reading foreign forums and endless reboots virtual machine, the method was found. Also, the article is not a review of the program interface, and you will not see screenshots.

Creating and preparing a package

An example installation will be made for Mozilla Firefox, because this is a well-known product that does not have an msi installer from the developers.
  1. Run exe to msi and specify in it the path to the firefox exe installer. Based on the information previously found on the network, it becomes clear that you can quietly install Firefox with the parameters -ms -ira. We indicate them in the second field exe to msi and click “Build MSI”.
  2. It would seem that everything is ready. The msi package is ready. Indeed, by running the resulting result, we will get firefox installed on the system and we could put an end to the article. Unfortunately, it's not that simple. The current installation package is not suitable for deployment through GPO and when you boot the computer you will receive completely meaningless errors in the logs “an unrecoverable error has occurred...” And the whole point is that the developers of exe to msi also want to eat them free product generates msi “not according to the rules”.
  3. Well, let's take the orca and open our emsianik in it.
  4. First of all, find the table in the left list Property and pay attention to two fields - ProductCode And UpgradeCode. These two fields must be unique for each product, but our exe to msi always generates the same ones. Well, no problem, click on top menu View -> Summary Information, find the field PackageCode and click New GUID. Copy the resulting result to the clipboard and paste it into ProductCode. Repeat for UpgradeCode and finally for himself PackageCode. Right there in Summary Information edit the field Title on Mozilla Firefox, the rest is optional. This, in fact, does not affect anything.
  5. Again in the table Property me ProductName on Mozilla Firefox (I change a lot more ARPCONTACT And Manufacturer). You can also set the correct value for ProductVersion.
  6. It seems that the GUID and other “IDs” have been changed, but as practice shows, this is not enough. Click on orca Tools –> Validate, remove the bird Show INFO Messages and press Go.
  7. As you can see, a bunch of errors appeared regarding the presence/absence of some tables and values. I didn’t bother and just took the first small msi that came across (7zip x64 9.20) and copied the 4 missing tables from there (via Export-Import, of course): _Validation, AdminExecuteSequence, AdminUISequence and AdvtExecuteSequence. In fact, I am sure that it is possible to create a “correct” msi installer, without unnecessary garbage, but do not forget, our goal is just to run the native setup of the application quietly.
  8. After adding the tables, go through it again Tools –> Validate(by the way, you don’t have to do the check at all the first time and just import the tables right away). If you also took the msi from 7zip as a basis, then the result will be six errors that need to be eliminated. Click Close, delete unnecessary fields marked in red.
  9. At the end, you can check the validation again and make sure that only warnings that do not interfere with anything remain. Save msi.
  10. That's basically it, all that remains is to add msi to the GPU and assign the necessary properties.

Nuances

  1. When installing using the method described above, you will have two copies of the software. The first one is actually the right application, and the second is the original msi nickname, because we sort of installed it. In principle, this does not affect anything except its display in “Add or Remove Programs”, and then only in Windows XP (if you did not change anything other than what I indicated). The downside may be the appearance unnecessary programs with automatic software inventory, if you use it.
  2. You won't be able to automatically remove the application using the same deployment tools. It will work out more precisely, but only the unnecessary msi container will be deleted. Well, you can tinker with the properties of msi when creating it, so that it takes with it a previously installed application, just as quietly. I did not set such a task.
  3. When installing software updates, you need to specify in the properties of the application's GP so that it replaces the previous one, that is, it must first remove the old one. This guarantees that you will not have those same left-handed duplicate applications in “install and remove programs” that have not given up to anyone.
  4. To install an application that has a distribution package of several files, you will first have to package it into an exe, which, when launched, will unpack itself and give the command for quiet installation. I recommend creating sfx archives using the same 7-zip.
  5. There is nothing stopping you from installing software through startup scripts. Moreover, this method is more flexible, and I have been using it through my scripts for a long time. But using native GPU tools is much faster, since simply creating an msi from an exe takes a couple of minutes.
  6. For some reason Windows 7 doesn't say "Installing a managed application...", it just says "please wait." When deploying a whole bunch of software at once for the first time or when installing a heavy application, this may prompt the user to call the admin or press the reset button.
That seems to be all, I hope it was interesting, share your experience.

If you have installed on your computer antivirus program Can scan all files on your computer, as well as each file individually. You can scan any file by right-clicking on the file and selecting the appropriate option to scan the file for viruses.

For example, in this figure it is highlighted my-file.msi file, then you need to right-click on this file and select the option in the file menu "scan from using AVG» . When choosing this parameter will open AVG Antivirus, which will perform the check this file for the presence of viruses.


Sometimes an error may occur as a result incorrect software installation, which may be due to a problem encountered during the installation process. This may interfere with your operating system link your MSI file to the correct application software , influencing the so-called "file extension associations".

Sometimes simple reinstalling 7-Zip may solve your problem by linking MSI to 7-Zip correctly. In other cases, problems with file associations may result from bad software programming developer and you may need to contact the developer for further assistance.


Advice: Try updating 7-Zip to latest version to make sure you have the latest patches and updates installed.


This may seem too obvious, but often The MSI file itself may be causing the problem. If you received the file via an attachment Email or downloaded it from a website and the download process was interrupted (for example, a power outage or other reason), the file may become damaged. If possible, try getting a new copy of the MSI file and try opening it again.


Carefully: A damaged file may cause collateral damage to a previous or existing malware on your PC, so it is very important to keep an updated antivirus running on your computer at all times.


If your MSI file related to the hardware on your computer to open the file you may need update device drivers associated with this equipment.

This problem usually associated with media file types, which depend on successfully opening the hardware inside the computer, e.g. sound card or video cards. For example, if you are trying to open an audio file but cannot open it, you may need to update sound card drivers.


Advice: If when you try to open an MSI file you receive .SYS file error message, the problem could probably be associated with damaged or outdated drivers devices that need to be updated. This process can be made easier by using driver update software such as DriverDoc.


If the steps do not solve the problem and you are still having problems opening MSI files, this may be due to lack of available system resources . Some versions of MSI files may require a significant amount of resources (e.g. memory/RAM, processing power) to properly open on your computer. This problem occurs quite often if you are using a fairly old computer. Hardware and at the same time a much newer operating system.

This problem can occur when the computer has difficulty completing a task because operating system(and other services running in background) can consume too many resources to open MSI file. Try closing all applications on your PC before opening the Windows Installer Package. Freeing up all available resources on your computer will provide the best conditions for attempting to open the MSI file.


If you completed all the steps described above and your MSI file still won't open, you may need to run equipment update. In most cases, even when using older versions of hardware, the processing power can still be more than sufficient for most user applications (unless you're doing a lot of CPU-intensive work, such as 3D rendering, financial/scientific modeling, or intensive multimedia work) . Thus, it is likely that your computer does not have enough memory(more commonly called "RAM", or RAM) to perform the file open task.