none
VSIX setting InstalledProducts RRS feed

  • Question

  • Hello,

    for backward compatibility reasons, I need my VSIX to create a key under VS's private copy of \Software\Microsoft\VisualStudio\16.0_2d196999_Config\InstalledProducts\.

    What does VSIX need to contain or define in order to create a key under InstalledProducts?

    Thank you,
    Jan

    Saturday, August 17, 2019 8:02 PM

Answers

  • Hi Jan,

    Sorry for replying you so late.

    Since you want to add a private key, l suggest you can try to register your VSPackage and then add a signature .

    When you register your VSPackage, you can create a private key as you want to control your package.

    And also you will receive the warnings if your package has been tampered with when you sign your package.

    Hope it could help you.

    Best Regards,

    Perry 


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, August 23, 2019 6:50 AM

All replies

  • Hi Jan,

    Sorry for replying you so late.

    Since you want to add a private key, l suggest you can try to register your VSPackage and then add a signature .

    When you register your VSPackage, you can create a private key as you want to control your package.

    And also you will receive the warnings if your package has been tampered with when you sign your package.

    Hope it could help you.

    Best Regards,

    Perry 


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, August 23, 2019 6:50 AM
  • Hi Jan,

    Welcome to MSDN forum.

    Please check if Perry's reply helps. And here's some discoveries why may help:

    1. I think the copy you mean is actually Computer\HKEY_CURRENT_USER\Software\....But as I know for VS2017 and VS2019, it doesn't uses the xx.xxx_config\InstalledProducts. See:

    

    For VS2015, it do have the registry InstalledProducts under VisualStudio\14.0_Config\InstalledProducts, but for VS2017 and VS2019, it seems to not have the \VisualStudio\16.0_xxx_Config\InstalledProducts\.

     (Test in several machines)I guess for VS2017 and higher, it use another path to store the related info about installed products, or it may use another way instead of registry. So when you want to create a key under that path, you may not get the extension to work as expected.

    >>What does VSIX need to contain or define in order to create a key under InstalledProducts?

    2. Assuming the path is there. To create a key under InstalledProducts you may get some help from this document. But since I'm not familiar with that IVsUserSettings Interface, I'm not sure if it's what you want. I would suggest you can use Registry class to manage the registry keys.

    More details see this stackOverFlow issue. You can add a Custom Command Item to your vsix, and execute the code to create key by Registry class when the command is clicked. I think it could be better if there exists a  VSIX install or load event, then we can execute the related code when vs install the extension, but negative I fail to find any related topic about it online.

    Hope all above makes some help and if I misunderstand anything, feel free to let me know :)

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 23, 2019 7:59 AM
  • Perry,

    thank you for pointing me in the right direction. I created a .pkgdef file similar to

    [$RootKey$\InstalledProducts]
    [$RootKey$\InstalledProducts\ΧΧΧ]
    @="ΝΑΜΕ"
    "ProductDetails"="DETAILS"
    "PID"="VERSION"
    

    and it worked.

    For those in a similar situation, there is some documentation of the registry key here:

    Product registration for the About Box in Visual Studio 2010 and the deprecation of IVsInstalledProduct interface

    Lance, I think you did misunderstand the issue a bit indeed, but I appreciate your help nevertheless. VS2017 and VS2019 in fact still have these keys, but in a private registry hive. You can explore them for example using the Registry Explorer extension, or by loading the hive into regedit.

    Thanks,
    Jan

    Friday, August 23, 2019 2:59 PM