Q: Is there an easy way to back up and restore the share permissions defined on a Windows XP or Windows Vista system?
March 11, 2009
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_MACHINESYSTEMCurrentControlSetServicesLanmanServerShares 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 HKLMSYSTEMCurrentControlSetServicesLanmanServerShares shares.reg
To restore the permissions in the shares.reg file from the command line, type
reg import shares.reg
About the Author
You May Also Like