Skip navigation

Q: Is there an easy way to back up and restore the share permissions defined on a Windows XP or Windows Vista system?

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.reg
To restore the permissions in the shares.reg file from the command line, type
reg import shares.reg
TAGS: Security
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish