locked
Convert pkgdef/pkgundef to wixfile in VS2010 ? RRS feed

  • Question

  • We are working with an Isolated shell appplication VS2010.

    In order to create a installer, we're currently using wix.
    We are also trying to get ride of the pkgdef file for our core packages.
    Thus by using the regpkg.exe utility, we are able to generate the wixfile which is the same content as the pkgdef and include them in our installer.

    But the isolated shell provides pkgdef, pkgundef and a reg file.
    From our point of view, we don't want to provide the pkgdef since the registry keys will be written by our installer.

    How do you manager this in your installer for the isolated shell ? Are you providing these pkgdef/pkgundef file ?
    Did you convert it to a wixfile ? if yes using a manual steps or automatic with which tools ?

     

     

    Thursday, July 29, 2010 7:17 AM

Answers

  • Hi Fred,

    That article is incorrect; sorry for any confusion it caused you.  I've opened a bug to have the Visual Studio 2010 version fixed.  That article described the old methods of deploying VS Packages.  In Visual Studio 2010, VS Packages use the pkgdef model for registration and should, whenever possible, use the VSIX method of deployment (or xcopy).

    You should use the earlier articles we listed that describe how to install Isolated Shell applications.  In addition, deployment of extensions for Visual Studio 2010 is described at http://msdn.microsoft.com/en-us/library/dd393694.aspx.

    Thanks,
    Gearard

    Saturday, July 31, 2010 12:35 AM

All replies

  • Hello,

    As far as I know, there is no tool or automatic method to convert ProjectName.reg to ApplicationRegisty.wxs. So you need to do it manually. For more information, please refer to MSDN article:

    Installing an Integrated or Isolated Shell Application

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, July 29, 2010 2:43 PM
  • Hello Frédéric,

    I'm afraid that what you are proposing is actually not possible. The architecture of the Visual Studio 2010 Isolated Shell is such that it will only recognize component and package registration done via pkgdef files (the reg file is performing registration outside of the Isolated Shell application's hive).

    If you read Aaron's blog post on RegKeys and PkgDef files, you can see that Visual Studio itself will merge the contents of HKEY_LOCAL_MACHINE with the pkgdef files. The Isolated Shell is different in that it does not merge any values from the registry. Everything comes from the pkgdef files.

    As for what the Isolated Shell installer provides. Yes, it does install the pkgdef files it needs. All you need to do is chain it in to your installer. See the MSDN article that Nancy referenced.

    Regards,
    Bill Weinberger

     

    Thursday, July 29, 2010 6:53 PM
  • And for our package provided with the installation, can we use the wixfile or should we keep the pkgdef ?
    Because if the isolated shell is going to use the pkgdef and pkgundef, i'm thinking that also our package should stay with the pkgdef, at least the one provided by default?

    The wixfile can be only use if we want to add extra package/feature in a different installer than our isolated shell ?

    Thursday, July 29, 2010 11:48 PM
  • No, the wixfile registrations to HKEY_LOCAL_MACHINE will not be seen by the Isolated Shell. Use pkgdef.

    The only thing this does not apply to are any registry entries being written outside of your application's hive, for example HKEY_CLASSES_ROOT.

    I'm not sure I understand your last question. The wixfile (actually the resulting MSI) is useful for laying out the file components of your application. And for chaining in the Isolated Shell MSI.

    But what do you mean by "add extra package/feature in a different installer"? Is this a feature you want to install for Visual Studio, too? In that case, the pkgdef is still valid. And again, the MSI is still a good deployment mechanism for the file layout.

    Bill

    Friday, July 30, 2010 12:09 AM
  • The wixfile regenerating by the regpkg.exe tools is exactly the same content as the pkgdef file for the package, with a predefine registry root
    When to use this wix file and not the pkgdef file ?

    If our package is inside the same msi as our isolated shell, does it works ? I'm not sure because the registry key will be (re)set when the application will be launch for the first time?

    Thus we can only use the wixfile to generate a MSI and not used the pkgdef if only this package is coming in an extra installer as an extra package ?
    (Adding new feature to a vs2010 or a new feature to our isolated shell)

     

    Regards,

    Fred

    Friday, July 30, 2010 12:25 AM
  • Hi Frédéric,

    If you haven't already, you should read through the MSDN documentation that Nancy referenced in her reply.  It has a link to a sample that we created demonstrating the proper, and supported, way to deploy Visual Studio 2010 Shell (Isolated) based applications.

    Your application, and any packages you created for it, should use pkgdef.  Your MSI should not write to the registry directly, unless it is to keys that are outside of your application's hive (for example, HKCR for file extensions that you want your shell application to handle).  Your MSI simply lays down the application and package files, with their corresponding pkgdef files.

    You should not use regpkg for Visual Studio 2010 - everything has moved to the pkgdef model.

    Thanks,
    Gearard

    Friday, July 30, 2010 6:57 AM
  • So what about this article ? http://msdn.microsoft.com/en-us/library/bb458038.aspx

    And in particular the section "Deployment By Using the Windows Installer XML Toolset " ?

    I'm sure the wixfile generation was not part of the 2008 and added to 2010 ? So it's a new deprecated feature ???

    Regards,

    Fred

    Friday, July 30, 2010 7:22 AM
  • Hi Fred,

    That article is incorrect; sorry for any confusion it caused you.  I've opened a bug to have the Visual Studio 2010 version fixed.  That article described the old methods of deploying VS Packages.  In Visual Studio 2010, VS Packages use the pkgdef model for registration and should, whenever possible, use the VSIX method of deployment (or xcopy).

    You should use the earlier articles we listed that describe how to install Isolated Shell applications.  In addition, deployment of extensions for Visual Studio 2010 is described at http://msdn.microsoft.com/en-us/library/dd393694.aspx.

    Thanks,
    Gearard

    Saturday, July 31, 2010 12:35 AM