take owner ship

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
bloodlust8
Junior Member
Junior Member
Posts: 35
Joined: 2006-09-11, 14:58 UTC

take owner ship

Post by *bloodlust8 »

I'm using some total commander internal commands and have set them as shortcut keys.

Configure>>options>>Misc

I've noticed that the following commands don't work any more in Vista 2.

cm_EditPermissionsInfo
cm_EditAuditInfo
cm_AdministerServer

I am running as administrator but none of them work. Am I forgetting todo something or is the another retarded Vista feature?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3897
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Am I forgetting todo something or is the another retarded Vista feature?
Well, you are right - MS has removed the dialog, which is called by TC by this command ...
#5767 Personal license
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

in Vista 2
And please stop talking about Vista 2. There are no such OS. Windows Vista, Windows 7, Windows 8, no Windows Vista 2.

BTW I made a buttonbar with frequently used buttons with permissions manage commands using batch file that calls Windows' icacls.exe: e.g. add permissions for Users, reset permissions, set permissions as for program files dir (Users read-only, Administrators full access) etc.

Code: Select all

@echo off
if -%1==- echo Parameters: %%WL mode & goto done
set ua_mode_f=
set ua_mode_d=

if -%2==-ua_list goto ua_list
if -%2==-ua_grant_users_f goto ua_grant_users_f
if -%2==-ua_inheritance_e goto ua_inheritance_e
if -%2==-ua_inheritance_r goto ua_inheritance_r
if -%2==-ua_reset goto ua_reset
if -%2==-ua_reset_t goto ua_reset_t
if -%2==-ua_remove_users goto ua_remove_users
if -%2==-ua_deny_all_rd goto ua_deny_all_rd
if -%2==-ua_set_program_files goto ua_set_program_files
echo Wrong mode specified.
goto done


:ua_list
set ua_info=List permissions
title %ua_info%
echo %ua_info%...
set ua_mode_f=
set ua_mode_d=
goto ua_process_all

:ua_grant_users_f
set ua_info=Add full permissions for Users
title %ua_info%
echo %ua_info%...
set ua_mode_f=/grant "Users:(F)"
set ua_mode_d=/grant "Users:(OI)(CI)(F)"
goto ua_process_all

:ua_inheritance_e
set ua_info=Enable permissions inheritance
title %ua_info%
echo %ua_info%...
set ua_mode_f=/inheritance:e
set ua_mode_d=%ua_mode_f%
goto ua_process_all

:ua_inheritance_r
set ua_info=Disable inheritance and remove inherited permissions
title %ua_info%
echo %ua_info%...
set ua_mode_f=/inheritance:r
set ua_mode_d=%ua_mode_f%
goto ua_process_all

:ua_reset
set ua_info=Reset permissions to inherited
title %ua_info%
echo %ua_info%...
set ua_mode_f=/reset
set ua_mode_d=%ua_mode_f%
goto ua_process_all

:ua_reset_t
set ua_info=Reset permissions to inherited (recursive)
title %ua_info%
echo %ua_info%...
echo.
echo Caution! Recursive operation will be performed.
pause
set ua_mode_f=/reset /t
set ua_mode_d=%ua_mode_f%
goto ua_process_all

:ua_remove_users
set ua_info=Remove special permissions for Users
title %ua_info%
echo %ua_info%...
set ua_mode_f=/remove Users
set ua_mode_d=%ua_mode_f%
goto ua_process_all

:ua_set_program_files
set ua_info=Set standard program files permissions
title %ua_info%
echo %ua_info%...
set ua_mode_f=/inheritance:r /remove Administrators /remove Users /grant "Administrators:(F)" /grant "Users:(RX)"
set ua_mode_d=/inheritance:r /remove Administrators /remove Users /grant "Administrators:(OI)(CI)(F)" /grant "Users:(OI)(CI)(RX)"
goto ua_process_all

:ua_deny_all_rd
set ua_info=Forbid reading contents for Everyone
title %ua_info%
echo %ua_info%...
set ua_mode_f=/deny "Everyone:(RD)"
set ua_mode_d=%ua_mode_f%
goto ua_process_all


:ua_process_all:
echo.
for /f "usebackq delims=" %%f in (`type %1`) do call :ua_process_single "%%f"
set ua_mode_f=
set ua_mode_d=
goto done

:ua_process_single
if "%~n1"=="" (icacls.exe "%~1\" %ua_mode_d% | find ":") else (icacls.exe "%~1" %ua_mode_f% | find ":")
goto :EOF


:done
echo.
pause
Every function may be called using buttonbar button with parameters %WL and function name e.g.:

Code: Select all

button3=TOTALCMD.exe,31
cmd3=%COMMANDER_PATH%\Sudo.exe %SystemRoot%\System32\cmd.exe /c %COMMANDER_PATH%\ModifyUserAccess.bat
param3=%WL ua_list
iconic3=0
menu3=List permissions
button4=
iconic4=0
button5=TOTALCMD.exe,27
cmd5=%COMMANDER_PATH%\Sudo.exe %SystemRoot%\System32\cmd.exe /c %COMMANDER_PATH%\ModifyUserAccess.bat
param5=%WL ua_grant_users_f
iconic5=0
menu5=Add full permissions for Users
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, unfortunately MS has removed these dialogs. They recommend to use the "Properties" dialog instead, at least on the "Pro" and higher versions of Windows: Alt+Enter.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

...which is still too dumb or lazy to process more than one selected item...
Post Reply