but NOT in the User account that anyone can use with no password.
I am using Windows 7 Ultimate and UAC is always disabled.
All the following was done by CMD.EXE launched by Windows RUN with ADMIN authority
just incase that is a higher level than my own Admin authority which also failed.
Comodo Security had A.V. and Defense+ disabled (and Firewall BLOCKED)
All Windows Explorer screens were closed, and Firefox was closed.
All instances of CMD.EXE were closed apart from the one in use at "C:\Users\Alan>"
Code: Select all
C:\Users\Alan>RENAME "C:\Users\Alan\AppData\Roaming\Mozilla" Mozilla_L
C:\Users\Alan>RENAME "C:\Users\User\AppData\Roaming\Mozilla" Mozilla_L
Access is denied.
C:\Users\Alan>ATTRIB "C:\Users\Alan\AppData\Roaming\Mozilla_L"
I C:\Users\Alan\AppData\Roaming\Mozilla_L
C:\Users\Alan>ATTRIB "C:\Users\User\AppData\Roaming\Mozilla"
I C:\Users\User\AppData\Roaming\Mozilla
C:\Users\Alan>cacls "C:\Users\Alan\AppData\Roaming\Mozilla_L"
C:\Users\Alan\AppData\Roaming\Mozilla_L NT AUTHORITY\SYSTEM:(OI)(CI)F
BUILTIN\Administrators:(OI)(CI)F
Alan-Desktop\Alan:(OI)(CI)F
C:\Users\Alan>cacls "C:\Users\User\AppData\Roaming\Mozilla"
C:\Users\User\AppData\Roaming\Mozilla NT AUTHORITY\SYSTEM:(OI)(CI)F
BUILTIN\Administrators:(OI)(CI)F
Alan-Desktop\User:(OI)(CI)F
C:\Users\Alan>icacls "C:\Users\User\AppData\Roaming\Mozilla"
C:\Users\User\AppData\Roaming\Mozilla NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
Alan-Desktop\User:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
As you can see, "ATTRIB" and "CACLS" cannot distinguish between the ACL's of the two folders
but "ICACLS" did unknown processing on an un-named file.
I only expected more verbose diagnostics than CACLS - I was not expecting any action.
I was pleasantly surprised to find that allowed success instead of telling me why I was blocked.
I tried again
Code: Select all
C:\Users\Alan>RENAME "C:\Users\User\AppData\Roaming\Mozilla" Mozilla_L
C:\Users\Alan>dir "C:\Users\User\AppData\Roaming\Mozilla_l"
Volume in drive C is C_System_C
Volume Serial Number is 3E16-BCE7
Directory of C:\Users\User\AppData\Roaming\Mozilla_l
04/02/2011 20:17 <DIR> .
04/02/2011 20:17 <DIR> ..
04/02/2011 20:17 <DIR> Extensions
04/02/2011 20:17 <DIR> Firefox
0 File(s) 0 bytes
4 Dir(s) 9,499,660,288 bytes free
This is the original script that worked on my "Alan" profile, and failed on the "User" profile.
Code: Select all
CALL :D_LINK "C:\Users\Alan\AppData\Roaming" "Mozilla" Alan
CALL :D_LINK "C:\Users\User\AppData\Roaming" "Mozilla" User
GOTO :EOF
:D_LINK
SET LINK=%1\%2
SET TARGET=D:\Junctions\%2_%3
XCOPY %LINK% %TARGET% /E /I
REM NEED A FIXIT HERE PERHAPS
RENAME %LINK% %2_L
MKLINK /J %LINK% %TARGET%
pause
GOTO :EOF
I believe ICACLS could be a suitable "FIXIT" but I do not know how it does it nor when it will destroy me.
NB I have used the above script previously with different arguments following "CALL :D_LINK arg1 arg2 arg3"
and it always worked successfully.
Its purpose is to duplicate a designated folder plus contents to a separate partition with reduced frequency of backing up,
and to replace the original with a Junction after renaming the original incase the Junction does not work.
I would like to fix this so my improved script can be successfully adapted to any future requirement.
Is there a better command than "RENAME" overcome this sort of problem ?
I would like to know what it was that caused this "Access is denied" error.
Regards
Alan