Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for resthome.bat

(view source code of resthome.bat as plain text)

  1. @ECHO OFF
  2. :: RestHome,  Version 1.20 for Windows NT 4
  3. :: Written by Rob van der Woude
  4. :: http://www.robvanderwoude.com
  5. :: Locally restore shares of all home directories
  6. :: Modify drive and path if necesary
  7.  
  8. CD /D D:\USERS\HOME
  9. FOR /D %%A IN (*) DO NET SHARE %%A=D:\USERS\HOME\%%A
  10. FOR /D %%A IN (*) DO NET USER %%A /HOMEDIR:\\SERVER\%%A /PROFILEPATH:\\SERVER\D$\USERS\PROFILES\%%A /DOMAIN
  11. :: FOR /D %%A IN (*) DO CACLS D:\USERS\HOME\%%A /T /C /P /G Administrators:F
  12. FOR /D %%A IN (*) DO CACLS D:\USERS\HOME\%%A /T /C /E /G %%A:C
  13.  

page last modified: 2024-04-16; loaded in 0.0182 seconds