
CODE: [Copy to clipboard]这种方式还是保留了system帐户对桌面的写操作,所以有时候还要借助psexec对一些非保留图标进行清除::Disable write to Desktop
rem %systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p admin:R
%systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p administrators:R
%systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p onlyit:R
rem %systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p only:R
%systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p everyone:R
rem %systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p admin:R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p administrators:R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p onlyit:R
rem %systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p only:R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p everyone:R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p "Power Users":R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p Users:R
CODE: [Copy to clipboard]其它已知问题,由于有些软件需要向桌面写图标操作,如果不成功就意外中止,很笨吧这些软件,哈哈所以需要在安装时开启桌面写操作,安装完毕关闭就行了%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p administrators:f
%systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p onlyit:F
for /f "delims=" %%a in ('dir /a /b "%allusersprofile%\桌面\*"') do if /i not "%%a" =="ACDsee.lnk" if /i not "%%a" =="drivers.lnk" if /i not "%%a" =="OA题苑+练习.exe" if /i not "%%a" =="学生.lnk" if /i not "%%a" =="教师.lnk" if /i not "%%a" =="移除U盘.exe" if /i not "%%a" =="自动关机.lnk" if /i not "%%a" =="解除自动关机.lnk" rd /q /s "%allusersprofile%\桌面\%%a" || del /s /q /f "%allusersprofile%\桌面\%%a"
for /f "delims=" %%a in ('dir /a /b "%userprofile%\桌面\*"') do if /i not "%%a" =="pif" if /i not "%%a" =="自动关机.lnk" if /i not "%%a" =="a.cmd" rd /q /s "%userprofile%\桌面\%%a" || del /s /q /f "%userprofile%\桌面\%%a"
%systemroot%\system32\cacls.exe "%userprofile%\桌面" /t /e /p onlyit:R
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p administrators:R
CODE: [Copy to clipboard][ Last edited by dato on 2008-10-29 at 13:12 ]@echo off
call :quiet>nul 2>&1
goto :EOF
:quiet
title 安装netbeans完毕后按任意键继续
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p administrators:f
pause
%systemroot%\system32\cacls.exe "%allusersprofile%\桌面" /t /e /p administrators:r
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |