Back up and Restore Share Permissions not working

0

Screenshot – Computer Management, Registry Editor, Explorer, etc.
Before migration I’m trying to save and restore shares on a Windows machine, but it seems not to be working at all.

Both TechNet’s how to article How to Back Up and Restore NTFS and Share Permissions and TenForums’ Tutorial How to Backup and Restore Network Shares and Permissions in Windows describe the same method.

I have some shares on my volumes (I'm not talking about those built-in with $) and can see them in Computer Management – Shared Folders – Shares (on Windows 7) or in Share and Storage Management (Windows 2008 R2) both in VM and Workstation.

I decided to test on host Windows 7 host with the same results – I'm unable to restore shares from a backup .reg file.

How to reproduce:

  1. Create folder “1111” somewhere on your drive.
  2. Share it with everyone full access. It will be visible in Computer Management – Shares as “1111” share and in regedit under path:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares
    
  3. Make a regedit export of the above path and save as shares-backup.reg.
  4. Stop sharing this folder in Computer Management – Shares or directly on 1111 folder’s Properties/sharing/advanced sharing. Share disappears from Computer Management – Shares and from registry as expected.
  5. Now restore backup from saved .reg.  In my case 1111 entry appeared in regedit (as was previously visible before stop sharing) but is not restored in Computer Management – Shares.  The same is seen in folder 1111 share tab under advanced – there is no checkbox selected – but should be after restoring from backup.

What is the reason of this? I’m doing above as user who belongs to Administrators group, Workgroup if it’s important to investigation. I thought that this will be my way to preserve lots of shares on machine while migrating process/reinstalling but just now cannot rely on this...

I've made new tests on Windows 10 – same story... Looking at this strange pattern, it looks like Windows stores info about shares not only in this registry path but also keeps it somewhere else...but where?

mattin

Posted 2019-12-01T17:07:12.097

Reputation: 43

The TenForums tutorial says to reboot after restoring from the .reg backup.   Did you do that? – G-Man Says 'Reinstate Monica' – 2019-12-02T04:59:06.887

yes - same result – mattin – 2019-12-02T16:49:39.587

No answers