Disabling Windows Shared Folder C$ ADMIN$

For Windows Server: 
  1. open regedit
  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\
  3. Create or modify AutoShareServer (REG_DWORD) with values 0
For Windows XP - Windows 10 version 1803 (x86 and x64):
  1. open regedit
  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\
  3. Create or modify AutoShareWks (REG_DWORD) with values 0