New Server and Vault view recreation

We have to move the servers to new machines with new IP and host name and I would like to make a one click script to handle a smooth setting for all our workstations.

I have searched the KB and the closest Q&A I found on the topic says that it is not possible to batch destroy a vault view.
I am not so convinced, If I kill the epdm.exe task and console delete the vault view, then overwrite the registry I should be able to reroute to my new servers? Am I missing something? Yes, it would be not supported etc…

I have PDM and SW installed with an admin image so everybody has the same setup regarding PDM.
I am not interested in PDM client uninstall.

I have already made a CVS file to install a new vault view via batch.

Q&A Is it possible to completely uninstall the SOLIDWORKS® PDM client and remove the local view via a command line script?
Portfolio / Domain: SOLIDWORKS Desktop / GOVERNANCE
Product: SOLIDWORKS PDM Professional CAD Editor Network
Platform: On Premise
Question

Is it possible to completely uninstall the SOLIDWORKS® PDM client and remove the local view via a command line script?

Answer

There is no automatic method to remove a vault view. To manually perform the complete uninstall:

  1. Right-click view and remove it.
  2. Uninstall Enterprise from add/remove programs
  3. Delete the SOLIDWORKS® PDM registry keys.

To perform the clean uninstall via command line script , use a *.bat file and perform the steps in the following order:

  1. Uninstall Enterprise using MSIEXEC /x as described in knowledge base solution QA00000108838
  2. Delete the two Enterprise registry keys:
    HKEY_CURRENT_USER\Software\SolidWorks\Applications\PDMWorks Enterprise
    HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise
  3. Delete the (now orphaned) local view folder.

Keep in mind that this will completely remove SOLIDWORKS PDM, so any checked out files to that view will still show as checked out in the database. Please ensure that users check in all files before attempting this operation.

For additional help with completely removing SOLIDWORKS PDM, please contact either your Local SOLIDWORKS Reseller or SOLIDWORKS Technical Support.

If the vault name is the same, you can just update the server names in the client registry. Kill the PDM processes in a script then change the keys for “DbServer” and “ServerLoc” in these two locations:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\Databases
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\Applications\PDMWorks Enterprise\Databases

You may also need to make adjustments in the “Current User” registry for the Admin tool if the users use it.
Computer\HKEY_CURRENT_USER\Software\SolidWorks\Applications\PDMWorks Enterprise\ConisioAdmin\Servers

Batch script to kill PDM processes:

taskkill /f /IM explorer.exe
taskkill /f /IM EDMSERVER.exe
taskkill /f /IM EDMSER~1.exe
taskkill /f /IM Search.exe
taskkill /f /IM AddInSrv.exe
taskkill /f /IM ViewServer.exe
start explorer.exe
exit

thank you for the batch, I was usually killing edmserver and explorer after checking if sldworks was in execution to avoid a registry overwrite when it closes.
I will lookup the othet exes to better understand what they do.


Do you think it is better to delete the whole vault folder and remake it?
If not recreated I think the ini file in the vault root needs to be updated with the new server info

One thing to keep an eye out for is that if you destroy a vault view and re-make it, then anything the user had checked out before the vault view was deleted won’t be able to be checked back in after creating the new view. The vault view has a unique ID that is created when the view is made. So a new view would have a different ID and the server would see that as a different PC trying to check in the file.

As jcapriotti said, the best method is to change the server registry keys to the new server info.

Search.exe is the standalone search tool
AddInSrv.exe Is for add-ins that may be executing in the background.
ViewServer.exe I think is something to do with the built in viewer.

I would avoid recreating if possible. Even though the ini does contain the line:
AttachedFrom=ArchiveServer:3030

It should still work…you can test a client if you have your new servers up. If not, a batch script to edit the file or replace it with another copy should be easy.

TO BE MARKED AS SOLVED
(I plan to edit this reply later)

I made a batch script to handle an effortless transition to the new servers.
Around 70 machines used it and only one had a problem with solidworks process detection that apparently crashed the batch. Not sure about the reason, during extensive tests it never had a problem, only on that peculiar workstation it did.

The structure of the batch was (every step is logged locally with a unique filename and then sent with robocopy to a public share on an internal server):

  1. Force console elevation with admin rights (needed to write HKLM registry etc)
  2. Display a warning to the user, once started the process reboots the PC, last chance to cancel
  3. kill explorer.exe and all the PDM related tasks in execution
  4. Check if the vault root folder is present and the hidden desktop.ini inside it (no vault folder = abort)
  5. Read the PDM registry entry for current vault server name (not found = abort)
  6. Backup desktop.ini outside the vault folder (non 100% sure that file is really used outside vault view creation and destruction, but to keep the vault installation coherent I decided to modify it too)
  7. Search for the old server name strings inside desktop.ini and replace with the new ones (to rewrite the file you need attrib -h -r and once done attrib +r +h again)
  8. Search for the old server name strings inside the registry (must include the WOW6432node too) and overwrite them with the new server name
  9. Restart explorer.exe
  10. Move the batch log file on the server (even in case of error)
  11. Reboot the PC if no error is detected
1 Like