A: You can back up share permissions by exporting the contents of the Shares registry key. To do so, open regedit, navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares key, right-click the key, and select Export. Then, in the Export Registry File dialog box, type a file name to save the share permissions to a .reg file. To restore the share permissions, double-click the .reg file, which will import the share permissions back into the registry.
You can also back up and restore share permissions from the command line using the Reg (reg.exe) command-line tool. To back up share permissions, type the following at the command line, where shares.reg is the name of the file in which you want to save the share permissions:
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares shares.regTo restore the permissions in the shares.reg file from the command line, type
reg import shares.reg