当前位置:   article > 正文

msu文件无法运行_安装程序遇到报错?无法验证发布者?无法使用脚本直接调用?...

msu文件无法运行

你是不是在运行的某个程序的时候经常遇到这个问题?是不是很烦?发现有好多文件都是这个情况?

 9bad1acd7de3cd304745ef3e01192faa.png

单个文件可以修改文件属性,选择解除锁定就可以了;

c292be6047884c14feab6c8abf00f070.png

那么问题来了,很多很多很多很多个文件点起来不要命了么?

不要担心,聪明的我们肯定会想办法;同时我还发现如果文件或升级补丁有这个属性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.

Using Streams

Usage: streams [-s] [-d]

ParameterDescription
-sRecurse subdirectories.
-dDelete streams.
Streams takes wildcards e.g. 'streams *.txt'.

52bb34b83d96c26fd8951c5143b0c0eb.png  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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/626733
推荐阅读
相关标签
  

闽ICP备14008679号