none
Errors installing Visual Studio 2017 Enterprise on Win10: "elevation required" and "product definitions failed to load"

    Question

  • When installing Visual Studio 2017 Enterprise (final release) on Windows 10, I receive the error message "elevation required" (whether or not I run as administrator).

    After I click "OK", I see "Sorry, the product definitions failed to load" (which may be behind the "elevation required" dialog).

    If I click "Retry" I get the "elevation required" dialog again.

    The install worked correctly on another computer, which had the VS 2017 RC installed (so it was an upgrade instead of a new install).

    I now see Visual Studio 2017 listed in my control panel | programs; but am unable to uninstall it. When I attempt to remove it, I get a nearly blank dialog:

    I've also tried setting up a new offline install from a local directory, but that didn't work.

    I tried posting screenshots to help, but apparently I need my account verified first.

    I have also posted this issue here:
    https://developercommunity.visualstudio.com/comments/28127/view.html

    This seems to be happening to a number of people, but I haven't found a workable solution yet.

    • Edited by J Crim Thursday, March 16, 2017 4:10 PM
    Thursday, March 16, 2017 12:23 AM

Answers

  • Thanks Lana - I tried creating an offline installation previously, and no luck. It might work now though, since I now know the steps to uninstall VS 2017.

    On a separate note, I identified the root cause, with some help from some folks on the VS team. The reason I'm getting this error is that "net" is disabled by my domain's group policy; and the installer is calling `net session` to determine if the install process is running with elevated permissions or not.

    So, the workaround is either to disable group policy, or remove the computer from the domain. I understand that the VS team will work on a fix so that `net session` is no longer needed in future versions. 

    In the meantime, for anyone with a group policy that prevents running "net", you can use this powershell script (run as administrator) to temporarily disable the group policy object that prevents running "net":

    $blockKey = 'HKLM:\Software\Policies\Microsoft\Windows\safer\codeidentifiers\0\Paths\{bef17ac7-f389-4213-b889-ce009452cb06}\'
    If (Test-Path $blockKey) {
      Remove-Item $blockKey
    }

    After running that, the install proceeds as expected. Of course, the group policy will be restored on some schedule, we may experience similar problems in the future if VS 2017 updates shell out to "net session" in the same way.

    • Edited by J Crim Tuesday, March 21, 2017 9:23 PM Formatting
    • Marked as answer by J Crim Tuesday, March 21, 2017 9:23 PM
    Tuesday, March 21, 2017 8:19 PM

All replies

  • Hi J Crim,

    Thank you for posting in MSDN forum.

    >>I tried posting screenshots to help, but apparently I need my account verified first.

    Please ask for a requirement in Verify Your Account 38 .

    According to the error message, I found other community members also meet this issue and reported it to the Visual Studio Product Team, please see  Sorry, the product definitions failed to load.

    A member solved it by formatting. But before OS format, I suggest you could try with the following steps:

    1. Disable all the Anti-virus software and firewall, clean temp folder.

    2. Use Visual Studio Uninstaller to uninstall the failed VS 2017 cleanly.

    3. Check if the  Installer Service is running:
       a. Click Start, type Services.msc and press {ENTER} 
       b. Double-click Windows Installer 
       c. Set the Startup type of Windows Installer to Manua
       d. Click Start to start the service. 
       e. Click OK.

    4. Check if the machine has any group policy that block the VS installation( disable it if existed).

    4. Download Visual Studio 2017  and run the seup.exe as administrator.

    Best Regards,


    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.



    Thursday, March 16, 2017 7:48 AM
    Moderator
  • Thank you for the reply, Lana. 

    It looks to me like Visual Studio Uninstaller will uninstall VS 2015 as well, so that's a pretty big deal. I'll need to hold off on this until I can tolerate reinstalling everything. At that point I may do a clean (OS) reinstall of everything.

    If anyone knows of a way to uninstall Visual Studio 2017 only (given that it shows a blank screen and won't let me uninstall), please let me know.

    I've tried running msiexec /x, but it didn't seen to work. I'm not confident that the GUID shown in "uninstall programs" is correct, and I couldn't find it in the registry.


    • Edited by J Crim Thursday, March 16, 2017 4:10 PM
    Thursday, March 16, 2017 2:38 PM
  • This looks like the best/most useful match:

    https://developercommunity.visualstudio.com/content/problem/16954/product-definitions-failed-to-load.html

    I'll try both fixes, but the most likely issue is that our domain group policy probably doesn't allow writes to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft

    Thursday, March 16, 2017 4:57 PM
  • I wasn't able to verify that this was the case - but I do have domain-level group policy that may be restricting the key.

    So, still stuck on this. I have a vslogs.zip file standing by, but no place to send it.

    • Edited by J Crim Thursday, March 16, 2017 7:26 PM
    Thursday, March 16, 2017 5:37 PM
  • Hi J Crim,

    Thank you for your update.

    About the vslogs, you could upload it on Onedrive  and share us link here.

    You just point an important reason: your machine is in a domain which has group policy, it could prevent installation process writing registry key, that causes product definitions failed to load.

    As we know, the precondition to install VS is there is no AVG issue or any setting stop install running properly. Would you mind checking the group policy setting and disable it on temporary, or consult with your IT apartment to allow you download the VS for work.

    Once you have a smooth environment, I believe it will be much easier for you to do the VS setup.

    Thank you for your understanding.

    Best Regards,


    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, March 17, 2017 6:34 AM
    Moderator
  • I'm unable to uninstall Visual Studio 2017 in order to retry. Is there a way to uninstall VS2017 so I can retry? (which doesn't also uninstall VS 2015)? 
    Friday, March 17, 2017 9:33 PM
  • Hi J Crim,

    If you want uninstall VS 2017 and keep the VS 2015 at the same time, you can try to remove the existing VS 2017 that install failed before as below:

    1. Go to Control Panel—Programs and Features, if there has ‘Microsoft Visual Studio 2017’, right click it and choose ‘Uninstall’

    2. Try to delete the following installed folders: (you can back up those folders before any modification, in case we need to roll back)

    3. Go to the folder: %ProgramData%\Microsoft\VisualStudio and delete the ‘Packages’ folder and ‘Setup’ folder if there has.

    4. Go to the Visual Studio installation folder (normally under %ProgramFiles(x86)%\Microsoft Visual Studio) and delete the folder ‘2017’

    After that, the most important is that disable the domain group policy that prevent the VS installation writing registry key on your machine.

    please also make sure windows update is up-to-date, clean up the %temp% folder and temporarily disable any antivirus software, reboot the computer and re-run the VS 2017 RTM installer as administrator again.

    Best Regards,


    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.

    Monday, March 20, 2017 3:02 AM
    Moderator
  • Thank you for the info Lana.

    As I noted in my initial problem description:

    "I now see Visual Studio 2017 listed in my control panel | programs; but am unable to uninstall it. When I attempt to remove it, I get a nearly blank dialog:"

    I wasn't able to post pictures before, but this is what I get when I click "uninstall".

    If I press "enter", nothing happens (thinking there could be a default button that is hidden).

    If I close it, Visual Studio 2017 is still there.

    Any other ideas for removing it?

    • Edited by J Crim Monday, March 20, 2017 10:59 PM
    Monday, March 20, 2017 10:57 PM
  • If I complete your steps in this order, I can get VS 2017 to uninstall:

    2,3,4,1

    As noted, I'm unable to uninstall from the Control Panel | Programs; but if all the files are gone Windows allows me to remove VS 2017.

    I've tried reinstalling 3x, including with reboots. Same result.

    I am unable to disable the domain group policy (this requires approval from our IT department, which is difficult and will require more information on what specifically is required). Is it possible for me to add permissions to a specific registry key to allow installation to continue?

    Tuesday, March 21, 2017 12:10 AM
  • Hi J Crim,

    >>Is it possible for me to add permissions to a specific registry key to allow installation to continue?

    You could have a try with it,  if you have the group policy limit about it, please refer to the following article to create an offline installation:

    https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio

    Best Regards,


    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.

    Tuesday, March 21, 2017 10:08 AM
    Moderator
  • Thanks Lana - I tried creating an offline installation previously, and no luck. It might work now though, since I now know the steps to uninstall VS 2017.

    On a separate note, I identified the root cause, with some help from some folks on the VS team. The reason I'm getting this error is that "net" is disabled by my domain's group policy; and the installer is calling `net session` to determine if the install process is running with elevated permissions or not.

    So, the workaround is either to disable group policy, or remove the computer from the domain. I understand that the VS team will work on a fix so that `net session` is no longer needed in future versions. 

    In the meantime, for anyone with a group policy that prevents running "net", you can use this powershell script (run as administrator) to temporarily disable the group policy object that prevents running "net":

    $blockKey = 'HKLM:\Software\Policies\Microsoft\Windows\safer\codeidentifiers\0\Paths\{bef17ac7-f389-4213-b889-ce009452cb06}\'
    If (Test-Path $blockKey) {
      Remove-Item $blockKey
    }

    After running that, the install proceeds as expected. Of course, the group policy will be restored on some schedule, we may experience similar problems in the future if VS 2017 updates shell out to "net session" in the same way.

    • Edited by J Crim Tuesday, March 21, 2017 9:23 PM Formatting
    • Marked as answer by J Crim Tuesday, March 21, 2017 9:23 PM
    Tuesday, March 21, 2017 8:19 PM
  • Hi J,

    Thank you very much for sharing your wonderful solution and result here.

    It's my pleasure to help you troubleshoot this case, I will also take your great answer as a note, so that it will benefit other community members to solve similar problem.

    Have a good day :)

    Best Regards,


    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.

    Wednesday, March 22, 2017 2:16 AM
    Moderator