JSI Tip 0971. How do I reset the permissions on the Users directory?

Jerold Schulman

January 4, 1999

1 Min Read
ITPro Today logo


If you need to reset the permissions on the Users directory, you can use JSIUPERM.bat, as long as the usersfolder name is the same as their UserName.

To use JIUPERM.bat:

JSIUPERM Folder

Example:

JSIUPERM c:Users

You will need to create a c:yes.txt at a CMD.EXE prompt by typing:

 C: 

 copy CON YES.TXT 

 y 

JSIUPERM.bat contains:

@echo offif "%1"

"" goto syntaxIf not exist %1 goto syntaxcacls %1 /G Administrators:F SYSTEM:F < c:yes.txtsetlocalset fold=%1set fold=%fold:"=%for /F "tokens=*" %%i in ('dir "%1" /b /ad') do call :UPERM "%%i"endlocalgoto end:syntax@echo Syntax JSIUPERM Drive:ParentFoldergoto end:UPERMset user=%1set user=%user:"=%if /i %1

"default" goto dfltcacls "%fold%%user%" /T /G Administrators:F SYSTEM:F %1:F < c:yes.txtgoto end:dfltcacls "%fold%%user%" /T /G Administrators:F SYSTEM:F < c:yes.txt:end


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like