赞
踩
你是不是在运行的某个程序的时候经常遇到这个问题?是不是很烦?发现有好多文件都是这个情况?
单个文件可以修改文件属性,选择解除锁定就可以了;
那么问题来了,很多很多很多很多个文件点起来不要命了么?
不要担心,聪明的我们肯定会想办法;同时我还发现如果文件或升级补丁有这个属性cmd无法正常执行;
这不如下文章帮忙解释并描述了这个问题
https://docs.microsoft.com/zh-cn/sysinternals/downloads/streams
The NTFS file system provides applications the ability to create alternate data streams of information. By default, all data is stored in a file's main unnamed data stream, but by using the syntax 'file:stream', you are able to read and write to alternates. Not all applications are written to access alternate streams, but you can demonstrate streams very simply. First, change to a directory on a NTFS drive from within a command prompt. Next, type 'echo hello > test:stream'. You've just created a stream named 'stream' that is associated with the file 'test'. Note that when you look at the size of test it is reported as 0, and the file looks empty when opened in any text editor. To see your stream enter 'more < test:stream' (the type command doesn't accept stream syntax so you have to use more).
NT does not come with any tools that let you see which NTFS files have streams associated with them, so I've written one myself. Streams will examine the files and directories (note that directories can also have alternate data streams) you specify and inform you of the name and sizes of any named streams it encounters within those files. Streams makes use of an undocumented native function for retrieving file stream information.
Usage: streams [-s] [-d]
Parameter | Description |
---|---|
-s | Recurse subdirectories. |
-d | Delete streams. |
Streams takes wildcards e.g. 'streams *.txt'. |
Streams
Runs on:
Client: Windows Vista and higher
Server: Windows Server 2008 and higher
Nano Server: 2016 and higher
那么看看我是怎么处理问题的;
@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
title SoftWare upgrade to 10.0.1 and patch hot fix
cd /d "%~dp0"
echo.&echo.&echo now upgrade ? &echo.&echo press enter continue or close this window.
pause >nul
rem md log
if not exist .\log (echo.&echo.&echo make log directory & md log 2>&1 >nul ) else (echo.&echo.&echo log directory exist)
ping 127.0.0.1 -n 3 >nul
streams64.exe -s -d .\
rem install KB2999226
echo.&echo.&echo install Windows patch KB2999226
start /w wusa .\Windows6.1-KB2999226-x64.msu /quiet /norestart
if %errorlevel% ==0 ( echo Windows patch KB2999226 install complete. ) else (
if %errorlevel% ==2359302 ( echo.&echo Windows patch KB2999226 already installed. ) else (
if %errorlevel% ==2 ( echo.&echo not have admin level install patch.press enter exit &pause >nul &exit ) else ( echo.&echo Windows patch KB2999226 install fail.&echo have error,press enter exit &pause >nul &exit))
)
rem install SoftWare 10.0.1
ping 127.0.0.1 -n 3 >nul
echo.&echo.&echo SoftWare 10.0.1
start /w .\install.exe
if %errorlevel% ==0 ( echo.&echo Equitrac Office install complete. ) else ( echo.&echo install failed. &echo have error,press enter exit & pause >nul &exit )
rem install hot fix
ping 127.0.0.1 -n 3 >nul
echo.&echo.&echo install hot fix
ping 127.0.0.1 -n 3 >nul
echo.&echo install hot fix DCE
start /w .\hotfix\hotfix0.msp /quiet /norestart /log .\log\DCE_fx.log
if %errorlevel% ==0 ( echo DCE hotfix install complete. ) else (echo DCE hotfix install failed. )
ping 127.0.0.1 -n 3 >nul
echo.&echo install hot fix DRE
start /w .\hotfix\hotfix1.msp /quiet /norestart /log .\log\DRE_fx.log
if %errorlevel% ==0 ( echo DRE hotfix install complete. ) else (echo DRE hotfix install failed. )
ping 127.0.0.1 -n 3 >nul
echo.&echo install hot fix DCS
start /w .\hotfix\hotfix2.msp /quiet /norestart /log .\log\DCS_fx.log
if %errorlevel% ==0 ( echo DCS hotfix install complete. ) else (echo DCS hotfix install failed. )
ping 127.0.0.1 -n 3 >nul
echo.&echo install hot fix SLP
start /w .\hotfix\hotfix3.msp /quiet /norestart /log .\log\SLP_fx.log
if %errorlevel% ==0 ( echo SLP hotfix install complete. ) else (echo SLP hotfix install failed. )
ping 127.0.0.1 -n 3 >nul
echo.&echo.&echo Start application list
ping 127.0.0.1 -n 3 >nul
appwiz.cpl
ping 127.0.0.1 -n 3 >nul
echo.&echo install computle,press enter open log directory and exit
pause >nul
echo.&echo open log directory
ping 127.0.0.1 -n 3 >nul
start .\log
exit
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。