1

My application installs the DesKey Dk2 dongle drivers if they are not installed or are lower than a perticular version. One of the user is complaining that whenever he runs the application from start menu shortcut, DK2 installation starts and then application is launched. Nobody else is facing this issue.

I am indtalling Dk2 as custom action in Wix script as below. lets say DK2 is represented as ABC:

<DirectoryRef Id="TARGETDIR">
      <Directory Id="ABCRedistDirectory" Name="ABCDrivers">
        <Component Id="ABCRedist" Guid="*">
          <File Id="ABC_EXE" Source="$(var.TargetDir)ABC.exe" KeyPath="yes" Checksum="yes"/>
        </Component>
      </Directory>
    </DirectoryRef>

<Property Id="DK2_VERSION">
      <RegistrySearch Id="Dk2_Version"
        Root="HKLM"
        Key="SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\DESkey DK2 Uninstall"
        Name="DisplayVersion"
        Type="raw" />
    </Property>

<Feature Id="ABCRedist" Title="ABC drivers" AllowAdvertise="no" Display="hidden" Level="1">
      <ComponentRef Id="ABCRedist"/>
    </Feature>

<CustomAction Id="InstallDK2Drivers" FileKey="ABC_EXE" ExeCommand="" Execute="deferred" Impersonate="no" Return="check"/>

<InstallExecuteSequence>
      <Custom Action="InstallDK2Drivers" Before="InstallFinalize">
        <![CDATA[NOT DK2_VERSION OR DK2_VERSION < "7.34.0.57"]]>
      </Custom>
    </InstallExecuteSequence>

The warning in Windows Event viewer points to main executable, which is below:

<Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLLOCATION" Name="FolderName">
          <Directory Id ="MyFolder" Name="MyApp">

            <Component Id ="MyApp.exe" Guid="*">
              <File Id="MyApp.exe" Source ="$(var.TargetDir)MyApp.exe" KeyPath="yes" Checksum ="yes" />
              <Shortcut Id="MyAppStartMenuShortcut" Name="My App" Directory="ProgramMenuDir" Icon="MyAppIcon.exe" WorkingDirectory="MyFolder" Advertise="yes"></Shortcut>
              <Shortcut Id="MyAppDesktopShortcut" Name="My App" Directory="DesktopFolder" Icon="MyAppIcon.exe" WorkingDirectory="MyFolder" Advertise="yes"></Shortcut>
            </Component>

...

Now it is not happening on other machines so I am not able to diagnose. Can anybody point out any obvious mistake? What can I do to diagnose this on customer's machine i.e. how to get logs when installing .exe, .dll, some third party installers like VC100 CRT and VC100 MFC and .Net 4.0 bootstrapper?

Thanks in advance.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
vb.s
  • 13
  • 5

4 Answers4

1

I can't tell from your post if the 3rd party ABC product that you're using is the same one that is repairing, or maybe the client doesn't know and you're assuming that it is your ABC thing. There's no indication in that WiX fragment exactly how you're installing the ABC thing, all you show is that it's copied to disk, there's no clue how you are running it to get it installed, and no shortcuts either.

What's happening in general seems to be that the other product is going into repair mode. There should be MsiInstaller entries in the Application Event Log that say something about whatever is wrong, referencing component ids, products, and maybe file names or registry entries. Your setup may have a conflict with that other install. It's unlikely to be anything to do with your shortcut except that your shortcut is advertised, so it goes off into a component feature check, and is apparently finding that you are sharing something with that other app, and now it needs repairing. If the 3rd party app that repairs is not your ABC thing then you won't be able to reproduce the issue unless you also install that 3rd party thing and find out what you're sharing with it, perhaps in the wrong way.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • I guess it must be a COM component or a file association / MIME conflict of some sort. I would guess it is COM, and this is not the easiest to fix if that ABC setup does its own thing and isn't possible to inspect. – Stein Åsmul Apr 07 '14 at 19:30
  • I have edited the question and it is DesKey Dk2 which is raparing itself and is replaced by ABC in code. I guess I need some way to create a special build to generated detailed on user's machine during installation. Any idea how to do that in Wix 3.6? – vb.s Apr 08 '14 at 04:38
  • The MsiInstaller event log entries in the application log may help define what's broken, plus if you get the customer to enable logging policy the repairs will also generate MSI log files, msixxx.log in the temp folder each time there's a repair. You don't need a special build of your setup. It might be more useful if the customer sent you a copy of that other MSI file, then you can inspect it with Orca and look for common file names, common registry entries, component ids that may conflict with yours. Logging policy here http://support.microsoft.com/kb/223300 – PhilDW Apr 08 '14 at 17:39
0

Is this some sort of bit-torrent component? I see an abc project on sourceforge.net with Python dll's, some visual C++ runtimes included as well as other stuff. This is by no means a properly constructed package, and it could trigger the self-repair problems seen on that particular computer.

To debug this would require to see what entries exist in the Windows Event log - it will specify what MSI component triggered the repair. The error could still be in other packages since a COM call from the embedded components in this abc package, could trigger a repair in any MSI package installed on the system. As could taking over a file association associated with torrent files.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
0
  • Right click My Computer
  • Select Manage
  • Event Log -> Windows Logs -> Programs

In this log you will find entries starting with "Description: Detection of product..." with id 1001 or 1004. Here is a sample:

Event ID: 1001 Description: Detection of product "{4ED0C75A-8BC5-4520-B9C7-76968FD5677F}", feature "Test" failed during request for component "{A7B09747-E527-4E1B-AE51-323CD636210F}"

This information is enough to determine what package triggered the self-repair. Please provide this information and we can take it from there.

I extracted the above sample information from Stefan Krüger's MSI FAG at installsite.org.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • thanks. I've updated the code. it is the main executable that is pointed out in windows event log – vb.s Apr 09 '14 at 04:49
0

You are using advertised shortcuts. In your Shortcut elements, set Advertise="no" or remove the Advertise attribute completely.

For more information, see this SO answer and msdn.

Community
  • 1
  • 1
BryanJ
  • 8,485
  • 1
  • 42
  • 61