locked
Do I use Regit or RegSvr32 during Package Deployment? RRS feed

  • Question

  • Hi,
        At time of deployment  on the customer's machine, when we get our Package Load Key (PLK), are we supposed to use "RegIt.exe" or "RegSvr32.exe" to register the Packages (.DLLs). The reason I am asking this is, at that point the Visual Studio SDK is not needed & "RegIt.exe" may not be available.

    Is there a sample available for a real/actual deployment?

    Cheers,
    Venkat

    Tuesday, April 20, 2010 7:09 AM

Answers

  • Hi Venkat,

    Sorry for the delay.

    As far as I know, you can use the regit.exe tool to register Native C++ packages, RegPkg.exe is for .NET based packages only.

    If you want to register your Native packages, you need to write a script to register it. Please check MSDN document about VSPackage Registration, as document says:

    Unmanaged VSPackages (including those generated by the Visual Studio Integration Package Template) use ATL-style .rgs files to store registration information. The .rgs file format is specific to ATL and cannot generally be consumed as-is by an installation authoring tool. Registration information for the VSPackage installer must be maintained separately. For example, developers can keep files in .reg format in sync with .rgs file changes. The .reg files can be merged with RegEdit for development work or consumed by an installer.

    And For your reference, please see this thread with similiar question with yours: how to deploy the Unmanaged VsPackage(C++) .

    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.
    Tuesday, April 27, 2010 8:33 AM

All replies

  • Hi Venkat,

    Thanks for your post.

    Do you mean you want to use Regit.exe or RegSvr32 instead of Visual Studio SDK? If so, as far as I know, it can't, Regit.exe or RegSvr32.exe is just registering tool, and Visual Studio SDK includes not just these tools but also lots of other tools such as RegPkg.exe, Visual Studio Shell development support, Visual Studio Package development, and so on.

    For Samples about VSPackage Deployment, please refer to following articles and videos:

    If I misunderstood you, or you have any comments, please feel free to let me know.

    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.
    Wednesday, April 21, 2010 3:37 AM
  • Hi Nancy,


               Thanks for you reply.

    I have developed VSX packages in C++/ATL on VS2005/VS2008.

    As I understand, during development I will need the Visual Studio SDK which already has a Developer's license. But during deployment I will not be needing to install the Visual Studio SDK, as I would have a PLK with me.

    Since during deployment the Visual Studio SDK is not needed, I will not have the access to the tools like: RegIt.exe & RegPkg.exe which is under C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Tools\Bin". So in such a case, which registering tool can I use to register the VSX (C++/ATL) Package DLLs? If it is RegSvr32.exe then it does not have a /root option like Regit where you can specify the /root as "Software\Microsoft\VisualStudio\9.0". Do I have to write a script (.reg or .rgs) to register my Packages?

    Cheers,
    Venkat

    Wednesday, April 21, 2010 5:12 AM
  • Hi Venkat,

    Sorry for the delay.

    As far as I know, you can use the regit.exe tool to register Native C++ packages, RegPkg.exe is for .NET based packages only.

    If you want to register your Native packages, you need to write a script to register it. Please check MSDN document about VSPackage Registration, as document says:

    Unmanaged VSPackages (including those generated by the Visual Studio Integration Package Template) use ATL-style .rgs files to store registration information. The .rgs file format is specific to ATL and cannot generally be consumed as-is by an installation authoring tool. Registration information for the VSPackage installer must be maintained separately. For example, developers can keep files in .reg format in sync with .rgs file changes. The .reg files can be merged with RegEdit for development work or consumed by an installer.

    And For your reference, please see this thread with similiar question with yours: how to deploy the Unmanaged VsPackage(C++) .

    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.
    Tuesday, April 27, 2010 8:33 AM
  • Hi Nancy,

                    Thanks for your reply.

    You have answered my queries.

    I have created a .reg file just like in the referred post in MSDN: VSPackage Registration . This works on a deployment machine only on VS2008 but not on VS2005.

    On VS2005, the DLL does not load but gives the well known error: Package load failure. Looks like there are some issues with VS2005 which are discussed in: Aaron Stebner's WebLog. I need to explicitly only call "RegIt.exe" to register my Package (ATL) DLL & then VS2005 loads it. 

    The post: how to deploy the Unmanaged VsPackage(C++) says:"Note, the regit.exe and regpkg.exe utilities are used specifically for the purpose of self registering your package on the developers system. These particular tools are not licensed for redistribution.". Hence I cannot give the RegIt.exe to the customer on my installation CD.

    There are absolutely no issues with VS2008 with the .reg file registration, during the installation SetUp on the deployment machine.

    In case, you know (or anyone who reads this post) a way to run this .reg file on VS2005 without the "Package load failure" error, please do let me know.

     

    Cheers,

    Venkat

     

    • Edited by VENKATESH PAI Tuesday, April 27, 2010 2:02 PM Updated with correct HyperLink.
    Tuesday, April 27, 2010 1:52 PM
  • This sounds like you are using versioned packages targeted to VS2008 instead of shared packages.

    http://msdn.microsoft.com/en-us/library/bb166545.aspx

    Tuesday, April 27, 2010 4:44 PM
  • Hi David,

                   Thanks for your reply.

    As I understand, my package is a "Shared Package". It has a common windows installer for both VS2005 & VS2008. The only diferent step that I execute, is that I

    need to Register (using RegIt.exe) the Packages separately for VS2005 & VS2008 roots ie. under "HKLM\SOFTWARE\Microsoft\VisualStudio\8.0" &

    "HKLM\SOFTWARE\Microsoft\VisualStudio\9.0" in the Registry.

    Cheers,

    Venkat

     

    Wednesday, April 28, 2010 12:08 PM
  • Hi Nancy,

            I am now able to register the VSPackage on VS2005 just as in VS2008, using a .reg file using the information from the .rgs file.

    It worked!! Thanks.

    Cheers,

    Venkat

     

    Thursday, May 13, 2010 1:29 PM
  • Hi Venkat,

    Glad to hear it works.

    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.
    Monday, May 17, 2010 2:55 AM