0
votes

I support a Windows tool that was written in C# using VS2008. The tools is called STAS. STAS has a feature that allows users to call "exposed functions" in the tool using Python scripts. STAS initializes a COM object containing the interface for the function. The Python script uses the win32.client.GetObject module to get the COM object. The variable returned by GetObject is used to call the exposed functions.

I was requested by my company management to convert STAS to VS2015. The vdproj installer files are not supported in VS 2015. VS2015 uses Wix for the installer projects. I used the "vdproj to wix" converter program to produce the wix installer project.

I got installer built and installed the STAS tool. I saw that the Python scripts were not working.

I de-installed STAS built with VS2015. I then ran the registry compare program RegShot and selected "1st shot". I then installed the STAS tool using VS2008 version and ran RegShot again to compare the registry. RegShot showed 604 keys were added to the registry. 1159 Values were added to the registry.

I de-installed STAS built with VS2008. I then repeated the process for STAS built with VS 2015. When I ran RegShot before and after the VS2015 STAS was intalled, RegShot showed only 35 keys were added. 415 Values were added.

I have the following questions: 1. Has anybody seen this issue with the Wix converter program missing hundreds of registry settings?

  1. Is there a way to import a .reg file into the WIX .wxs file? The registry using VS2015 STAS install is missing so many settings, it would take too much time to add them to the Wix install file by hand. I saw this website: http://neilsleightholm.blogspot.com/2010/06/wix-reg-file-heat-extension.html

  2. Has anybody tried this method?

I don't know a lot about VS installer projects and registry settings. Thank you for any help.

1
Installer projects are supported in VS 2015 if you install the installer extension visualstudiogallery.msdn.microsoft.com/…PhilDW

1 Answers

0
votes

A few options you can use:

  1. You probably need to add SelfRegCost=1to the components which are able to be registered with dllRegisterServer. This is likely what the old installer was doing and is the quickest way to re-implement the behaviour. (this is not considered the best practice though)

    I would take a look at the the vs2008 msi in Orca and see if it has a SelfReg table. If it does, figure out which files it is referencing and in your new wix project, add the SelfRegCost=1 attribute to their File tags.

  2. Use the heat tool. I would run the heat tool on just the files in the selfreg table of the vs2008 msi and then copy in the output component's registry information into your new wix files for the appropriate components.

  3. Check the registry table of the vs2008 msi and see if it contains all these missing entries. I assume it won't since this wasn't copied over in the convert that you did. If these entries are there you should be able to use dark.exe on the msi and get the registry table's information from it.

  4. Better yet, take your msi created by vs2008 and use the dark.exe program on it (part of the wix toolset). This should decompile your msi into usable wix files. You can either pick and choose files you want to copy over or just use the complete decompiled output although it may be quite verbose and hard to read and hard to maintain or modify.