Skip navigation

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

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

To use JIUPERM.bat:

JSIUPERM <Drive:>\Folder



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

 copy CON YES.TXT   <press the enter key> 
 y   <press the enter key> 
    <Press CTRL+Z> 

JSIUPERM.bat contains:

@echo off
if "%1"

"" goto syntax If not exist %1 goto syntax cacls %1 /G Administrators:F SYSTEM:F < c:\yes.txt setlocal set fold=%1 set fold=%fold:"=% for /F "tokens=*" %%i in ('dir "%1" /b /ad') do call :UPERM "%%i" endlocal goto end :syntax @echo Syntax JSIUPERM Drive:\ParentFolder goto end :UPERM set user=%1 set user=%user:"=% if /i %1

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

Hide 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.