本代码适合Windows7和Windows10系统通用,不分版本- @echo off
- title Adobe Flash Player更新安装 - BY hzbccy
- mode 80,10
- rem 我代码适合以存在FLASH的电脑安装使用
-
- rd /s /q "C:\vrvtemp">nul 2>nul
- md C:\vrvtemp>nul 2>nul
- rem 思路删除一个目录后在创建一个目录,名字相同保证该目录净空环境
-
- robocopy "\\192.168.1.100\Adobe Flash Player" "C:\vrvtemp" /e
- rem 思路从我自己的NAS网盘中下载文件到本机电脑-使用“robocopy”命令
-
- cls
- set activex32="%windir%\System32\Macromed\Flash\FlashUtil32_34_0_0_192_ActiveX.exe"
- set activex64="%windir%\System32\Macromed\Flash\FlashUtil64_34_0_0_192_ActiveX.exe"
- set ppapi32="%windir%\System32\Macromed\Flash\FlashUtil32_34_0_0_192_pepper.exe"
- set ppapi64="%windir%\System32\Macromed\Flash\FlashUtil64_34_0_0_192_pepper.exe"
- set npapi32="%windir%\System32\Macromed\Flash\FlashUtil32_34_0_0_192_Plugin.exe"
- set npapi64="%windir%\System32\Macromed\Flash\FlashUtil64_34_0_0_192_Plugin.exe"
- rem 思路 提前将FALSH几个文件夹内更新完成必然的文件作为判断,其中的“34_0_0_192”为判断重点
-
-
- :qidian
- if exist "%windir%\SysWOW64" (set activex=%activex64%) else (set activex=%activex32%)
- rem 思路使用“IF”命令判断系统是否为64位,该命令快捷方便,比判断环境要短些,当然有个别电脑肯定会在32位系统里面放个64位系统才有的文件夹,纯属想不通
-
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player ActiveX 34.0.0.192检测安装更新
- IF EXIST "%activex%" (goto panduan2) ELSE (goto anzhuang1)
- rem 这里跟上面一样使用“IF”命令判断,如果纯在变量里的34_0_0_192版本号,则跳过该安装,往下走去一个子程序点进行判断,后续子程序基本一样
-
- exit
-
- :anzhuang1
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player ActiveX 34.0.0.192检测安装更新
- start /wait "" "C:\vrvtemp\Adobe Flash Player ActiveX 34.0.0.192" /silent /norestart
- rem 使用start /wait 并加入改程序的自动参数/silent /norestart 确保其在安装完后才往下一个子程序走
- goto panduan2
-
- :panduan2
- if exist "%windir%\SysWOW64" (set ppapi=%ppapi64%) else (set activex=%ppapi32%)
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player PPAPI 34.0.0.192检测安装更新
- IF EXIST "%ppapi%" (goto panduan3) ELSE (goto anzhuang2)
- exit
-
- :anzhuang2
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player PPAPI 34.0.0.192检测安装更新
- start /wait "" "C:\vrvtemp\Adobe Flash Player PPAPI 34.0.0.192" /silent /norestart
- goto panduan3
-
- :panduan3
- if exist "%windir%\SysWOW64" (set npapi=%npapi64%) else (set activex=%npapi32%)
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player NPAPI 34.0.0.192检测安装更新
- IF EXIST "%npapi%" (exit) ELSE (goto anzhuang3)
- exit
-
- :anzhuang3
- cls
- echo.
- echo.
- echo.
- echo.
- echo Adobe Flash Player NPAPI 34.0.0.192检测安装更新
- start /wait "" "C:\vrvtemp\Adobe Flash Player NPAPI 34.0.0.192" /silent /norestart
- exit
复制代码
|