user9578094
user9578094

Reputation:

How to rename Visual Studio

I just downloaded Visual Studio, and the name is showing like this "Visual Studio Community 2017 (2)". Everything is working but that "2" at the end is just annoying. And of course, first thing I've tried was reinstalling. Anyone can help me with this? Thanks in advance.

Screenshot of how it looks: Screenshot of how it looks

And by the way my computer is completely new, and I've never had Visual Studio installed on this computer.

Upvotes: 39

Views: 10167

Answers (5)

Francis
Francis

Reputation: 1904

Updated for Visual Studio 2022:

I tried to follow VS 2017 instructions for Visual Studio 2022 but found a few steps have changed. I had a community installation initially and upgraded to Professional and found myself in the annoying "(2)" situation.

This solution assumes that you're trying to change (2) for a Professional installation. It should work for a different scenario as long as you substitute the Professional in the listed paths but YMMV.

Also I recommend taking a backup files of all the ini files and the Windows registry before proceeding, unless you're feeling irrationally confident and gung-ho.

  1. Same as VS2017, you will need to update the isolation.ini files and change the nickname field to your desired nickname. The difference is you probably have a 64-bit installation, so the directories have changed. I have listed the 2 ini files for your convenience.

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\blend.isolation.ini

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.isolation.ini

  1. You need to change the nickname field in the state.json file located in your ProgramData folder. First goto the following folder

C:\ProgramData\Microsoft\VisualStudio\Packages_Instances

  1. If you only see one folder, then choose that folder. If you see multiple folders, try picking the most recently modified folder. Also, note down that instanceId as we will need it later. It's 3ede33b5 on my computer, but it will something different on yours.

enter image description here

  1. Edit the state.json file. Search for "nickname" and change it to your desired nickname. If you're NOT seeing "2" as the nickname, then you're probably in the wrong folder, so try the others listed in Step 3)

  2. We need to go to the registry now and change the Nickname. First, go to the following location in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall

You will find that, unlike VS2017, there are no Visual Studio Key entries

enter image description here

Remember that instanceId previously? Search for the instanceId under the above Registry location, and change the DisplayName key

enter image description here

  1. Lastly, you will still need to manually rename the application shortcuts. They are located here.

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools

enter image description here

Upvotes: 3

fepiv
fepiv

Reputation: 1290

The issue is that the instance of visual studio has a nickname associated with it. Use the following instructions to change the nickname of an existing Visual Studio (tested with VS2017) installation (partially lifted from https://developercommunity.visualstudio.com/content/problem/99059/not-able-to-easiliy-change-installation-nickname.html):

  1. Set the nickname in the *.isolation.ini files in %ProgramFiles(x86)%\Microsoft Visual Studio\2017\[Version]\Common7\IDE.

  2. Set the nickname in the state.json file in %ProgramData%\Microsoft\VisualStudio\Packages\_Instances\[InstanceId]\state.json

  3. Open regedit, go to under path HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall, find there "Visual Studio {your version} 2017 (2)" (The folder will have a different name use the regedit search with "(2)" to find the corresponding entry. Rename string to be without " (2)" - this will change application name appearance in control panel / program and features.

You'll need admin permission to modify these files. If you want to remove the nickname altogether, just set it to an empty string (e.g. Nickname= in the .ini files, "nickname": "" in the .json).

Note that this will only have affect within VS tools, such as the VS installer in the screenshot you posted. Any names with the suffix in, for example, the Start/Windows menu will need to be renamed manually.

Upvotes: 70

Thnxalot
Thnxalot

Reputation: 41

If the installer says that a nickname is mandatory, even after uninstalling Visual Studio (like in the screenshot by Bernardo above), you can try the InstallCleanup.exe tool by Microsoft. You can find it in your Visual Studio Installer folder.
After running this tool with the -i flag, I was able to re-install Visual Studio 2019 without a nickname. Link to InstallCleanup.exe docs

Upvotes: 2

Kuruvikalai K
Kuruvikalai K

Reputation: 11

A nickname is mandatory for the Visual Studio installation when you are installing the same version of Visual Studio(eg.: VS 2019 or 2022) but with different editions(eg.: VS Community or Professional or Enterprise).

If we uninstall the same version of VS with different edition, then the VS Installer is not asking for the nickname and not taking the nickname as 2, the "Installation nickname" textbox is not visible under Installation locations tab in VS Installer.

Upvotes: 1

If you don't want to mess up with any files on you file system, one alternative is to reinstall the product.

After you uninstall the annoying product with the nickname "(2)", you can select the Installation locations tab and specify another nickname or perhaps leave it blank. Mine does not allow to leave it blank.

Here is a screen:

enter image description here

Upvotes: 6

Related Questions