Visual Studio 2010: Windows Installer using msiexec.exe returns MSI error 2727

I have a Visual Studio installation project that uses the msiexec.exe file to create a delete item as specified in โ†’ THIS <<<<<<<<<<<<; article about SO.

The installer does not start.

When I launch the installer by double-clicking the setup.exe file, the โ€œWait while the installation startsโ€ screen will almost not appear on the screen before I encounter my error.

Error Code 2727

Text (for search functions):

The installer encountered an unexpected error while installing this package. This may indicate a problem with this package. The error code is 2727.

I found a set of MSI error codes , and error code 2727 translates to

The directory entry '[2]' does not exist in the Directory table .

Can someone lead me to fix this? What should I do?

[UPDATE]

At the suggestion of Cosmin Pirvu , I created an error log for my installer. After you looked at it, my installation error may be the result of a link to the Not Installed msiexec.exe file, which I use with my Project [ProductCode] to create the Uninstall link.

The log file shown below indicates that my installation failed when the installer tried to create a temporary file for msiexec.exe , after which it has another failure when trying to display the error icon.

The file โ†’ install.log on Google sites << is my error log file (Hint: just search for Return value 3 to get errors).

[UPDATE 2]

I have an Uninstall link in an installation project that references the uninstall.bat batch file in my main project:

 @echo off %windir%\system32\msiexec.exe /x %1 

The Arguments reference to Uninstall is only [ProductCode] , since the /x switch is hard-coded into a batch file.

[Decision]:

Visual Studio Installer did not create a folder that contained certain DLL files.

+6
source share
4 answers

The first step is to create an installation log to find out what causes the error.

From the log you posted, it looks like your MSI is trying to use a directory that is not in the Directory table. Do you use any merge modules or special custom actions? If so, try to determine if they are trying to use the directory from your package.

You mentioned something about the delete shortcut. Can you give us more details?

+3
source

An old question, I know, I just wanted to add some information that helped me with the Windows Installer project in Visual Studio 2015 if anyone came across this topic.

I received the same error message 2727. My problem was that I included my source code in the "src" folder in the installation directory. If you look at the output files for the source, I noticed several of these files:

\ OBJ \ Release \\ TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

Yes, it included an extra slash after release. I had to add an exception (right-click Output Files output โ†’ ExcludeFilter) to exclude these files from the installation. I added "* Temporary *" to exclude only these files.

Perhaps someone else can explain why these temporary files were created, all I know is that this fixed the problem. Hope this helps someone else find this topic.

+3
source

I know his old question, but, like @Riccaforte, I had some problems to fix this in Visual Studio 2015. What I did was just delete all my source files inside my Aplication folder, and I don't know why, but he did the trick.

+2
source

If you delete a directory or directories from a directory table, this will cause a problem with other tables using these directory variables.

+1
source

Source: https://habr.com/ru/post/893614/


All Articles