Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Обсуждение темы "Обмен кнопками" 
Author Message
Flasher



PostPosted: Tue Feb 15, 2011 22:26    Post subject: Reply with quote

Если с перезагрузкой, то так:
Code:
' Отключить иконки, вызов меню и запись на рабочий стол
With CreateObject("WScript.Shell")
P = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\"
.RegWrite P & "ActiveDesktop\NoAddingComponents",1,"REG_DWORD"
.RegWrite P & "ActiveDesktop\NoComponents",1,"REG_DWORD"
.RegWrite P & "Explorer\NoDesktop",1,"REG_DWORD"
End With
Без - так:
Code:
' Запретить запись на Рабочий стол
With CreateObject("WScript.Shell")
Name = Array("%USERPROFILE%\Desktop","%USERPROFILE%\Рабочий стол",_
"%ALLUSERSPROFILE%\Desktop","%ALLUSERSPROFILE%\Рабочий стол","%PUBLIC%\Desktop")
User=.ExpandEnvironmentStrings("%USERNAME%")
  For Each N In Name
    .Run"cacls """&.ExpandEnvironmentStrings(N)&""" /D """&User&""" /E",0,True
    .Run"cacls """&.ExpandEnvironmentStrings(N)&""" /G """&User&""":R /E",0
  Next
End With


Last edited by Flasher on Wed Feb 16, 2011 12:56; edited 1 time in total
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group