Disclaimer: I'd like to first mention that this blog article and solution should only be attempted by EPDM admin and IT. As it does require admin rights on the local machine to edit registry keys, without proper knowledge of the registry key it is very easy to compromise your machine. Also, this blog is intended for use in situations where the vault is already corrupt or not working properly. For people just wanting to replace their view, use the standard procedure for adding and removing the file vault view. Please be sure to always check in all files into vault if possible or at least have copies saved in another location to ensure that they can be added later.
Why would I need to manually remove my file vault views?
There are a couple of likely reasons why this would need to be done.
There was a test vault created and deleted.
If the local file vault view was not deleted before the vault itself was, it's very common that the 3 registry keys that are associated with the view are not deleted. During the deletion, the local machine may prompt you to reboot to delete local view. Upon reboot though, the machine has now fully restored the view, yet there is no vault. This happens because the keys were not removed and the machine assumes that the vault should be there and therefore restores the view.
During an upgrade, a server was moved.
If there was a server move during an upgrade, its best practice to remove the view and then add the view again with it pointing to the correct vault location. Sometimes during the deletion of the local view, remnants of the old view are left over in the registry. Typically, it's only one or two of the 3 keys that make up the view. When this happens, as you attempt to add a new vault view, you will notice that the view setup tool is showing your vault as grey. This indicates that vault is already connected. Because the previous view still has a registry key or two still there, the machine registers that file vault view as still connected on that machine and will not allow you add the vault again.
- Vault view was accidentally deleted.
Sometimes a file vault view is accidentally deleted by the user. Depending if EPDM was interacting with windows explorer at the moment, it can occur that the situation above happens. The file vault view glitches and does not remove all of the keys associated with the view. This again does not allow you to re-add the file vault view without correcting those said keys.
Vault View is corrupt or not working in general.
Although it's very unlikely that the file vault view corrupts itself and cannot connect properly, it can still happen. I have noticed that this can happen particularly after a major windows update that alters many registry keys (ie. Microsoft KB3072630 update). Unlike the previous two above where one of the registry keys is missing, updates and sometime change the information within them or corrupt the way that vault icon as read. As the Vault icon is technically a system fie, it can be treated as a regular folder file. Because of this, sometimes windows doesn't know how to read the file properly and therefore doesn't let you view the vault properly. The way to correct this is just re-add the vault view. Of course, because the registry keys were what caused this issue to begin with, you get a situation like in the previous two examples.
Note: You should only remove a file vault view manually if you are certain that there are no files checked out (locked) in that view.
Before following the instructions below, try to remove the file vault view by right-clicking the file vault root and select "delete file vault view". If the deletion does not work, proceed with the manual remove.
To remove the local view "manually" you could do as follows:
1. Delete the registry key for the view:
(On x64 OS also delete HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\Applications\PDMWorks Enterprise\Databases\[VAULTNAME]
2. Delete the following registry key:
HKEY_CURRENT_USER\Software\SolidWorks\Applications\PDMWorks Enterprise\ConisioAdmin - Locate your file vault under the server and delete there first. IF it does not work then delete entire registry key from ConisioAdmin down as specified
3. Open a command prompt with administration permissions (Start, type CMD, right-click CMD and select "Run as administrator").
4. Type RD "c:\path_to_vault_view" /s
5. Close command prompt (type EXIT)
4. Step into the view (CD "c:\path_to_vault_view") and change the attributes of desktop.ini using: attrib -s -h -r desktop.ini
5. Delete desktop.ini (type DEL Desktop.ini)
6. Close command prompt (type EXIT)
7. Close any existing Windows Explorer windows and re-open explorer.
8. Delete the (now a local yellow folder) file vault view cache folder.
It's also to important to note that if the file vault view icon does not delete or turn into a regular folder after these commands, it's still most likely being read as a system file. In the event that this happens, the command below will delete the system flag for the vault icon. Then it will look like a regular folder that will allow you delete it.
You will need to open Task Manager > Kill EdmServer.exe.
Type ATTRIB [path to your view] -s
Then the View will look like a typical Windows folder
Delete the Folder.