5 Replies Latest reply on Sep 20, 2012 2:00 PM by Joseph Lewinski

    Deleted desktop.ini file

    Joseph Lewinski

      Like the old saying, "Haste makes Waste", a hasty decision resulted in the accidental deletion of the desktop.ini file from a local vault view.  Now all that is seen is a normal yellow explorer folder.  Is it possible to recreate the .ini file to get the vault view back and if so, how do I do it?  (Step-by-step please, so even an idiot can follow along...)


      ---=== edit ===---


      BTW - I'm using SW Enterprise PDM Admin. 12.2 (B615)


      I've tried following the directions in the Administration guide (page 37).  Step #4 says to, "Right-click the vault, then select Create local view".



      You'll notice that there is no option to "Create local view".


      What am I missing? 


      Blushing in Florida

        • Re: Deleted desktop.ini file
          Lee CS Young

          You're going to need a file checked out on the machine that is broken for this to work, but here goes:


          1. On a client machine that has EPDM installed, open Notepad.
          2. Go to the file menu, Open, and in the Open file dialog type the path to the desktop.ini file. (E.G.: C:\YourVault\desktop.ini). You'll need to type the path to the desktop.ini file because it's a hidden file.
          3. Copy the contents of the file and paste it somewhere you'll be able to get to it from the other client.
          4. On the "broken" client, create a new file and copy and paste the contents from the previous step.
          5. Open SQL Management Studio, and perfom the following query on your vault;
          6. SELECT D.Filename ,D.LockViewID ,U.Username FROM Documents D JOIN Users U ON U.UserID = D.UserID WHERE LockViewID IS NOT NULL
          7. Look for the correct viewid buy cross referencing the user and filename. Copy and paste the correct LockViewID for the broken client into the file created in Step 4.
          8. Save the file as desktop.ini in the root of your vault folder.
          9. Open a command prompt, (Start -> Run -> cmd) and cd into the root of your vault folder.
          10. Type: ATTRIB +s +h +r desktop.ini.
          11. Close the command prompt and restart the computer.


          Hope this helps!

          • Re: Deleted desktop.ini file
            Eric Endlich

            Instead of trying to recreate the desktop.ini file, you're better off re-creating the vault view by cleaning up the registry key created for the vault view.


            Delete the key with the name of your vault from the registry in one of the following locations. The key location depends on which option you selected when creating the vault view (Current User Only or All Users) but only one of the locations will contain a key that matches your vault name:


            [HKEY_CURRENT_USER\Software\Solidworks\Applications\PDMWorks Enterprise\Vaults]


            [HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\Databases]


            Its most likely going to be in the 2nd location, "HKEY_LOCAL_MACHINE". After you delete this key, you can right-click the vault from the adminstration tool then Create local view should show up. You'll want to move or delete the old vault view folder, which is now "Yellow", if you are going to re-create the vault view in the same location.

              • Re: Deleted desktop.ini file
                Lee CS Young

                Note that this method will not allow one to check in files that are checked out on the client machine, as EPDM believes it's a different computer because the viewid will change.

                  • Re: Deleted desktop.ini file
                    Eric Endlich

                    Thats correct. If you don't have any files checked out on that computer I would just delete the registry key and re-create the vault view. If you do have files checked out you could use the other method or, after re-creating the vault view, you would have to use the admin user account to undo the check out on any files that were still checked out in this vault view prior to deleting the desktop.ini file, which would cause you to lose any changes made after the check out (if any were made). However, once you do the undo check out, you could re-check out the same file and overwrite that file with the file from the old, now "Yellow", vault view folder location.

                • Re: Deleted desktop.ini file
                  Joseph Lewinski

                  Yep, recreating the vault view was the easiest (for me) way to go.


                  1. Delete the registry entry (ShellRoot REG_SZ C:\Vaults\xxx_Vault).
                  2. Delete the offending folder in the Vaults directory (xxx_Vault)
                  3. Create a new local Vault View using the View Setup program from the Start Menu.


                  Worked like a charm.  Bear in mind that I had NO checked-out files to deal with.  If there WERE checked-out files, I believe the first reply be Lee CS Young would have been the way to go.


                  Thanks all!