本帖最后由 虫子樱桃 于 2011-11-6 17:48 编辑
au3应该不需要你所谓的组件什么的吧!但是也把判断组件的东西发出来,哈哈
判断netframework组件
检查/%windir%/System32/下面是否含有MSCOREE.DLL文件如果有就所名已经安装了FM
注册表读取HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy下可以检查到机器上安装了那些版本的FM
1..NET Framework
.NET Framework2.0
键:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
值:Install = 1
.NET Framework3.0
键:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0]
值:Install = 1
.NET Framework3.5
键:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
值:Install = 1
2.Service Pack(以2.0 SP1为例)
键:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
值:SP = 1
3.语言包(以简体中文为例)
键:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\2052]
值:Install = 1
c等运行库:
VC2005
=======@echo off
set "HKLMU=HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall"
::::: 判断系统是否已经安装了 Visual C++ 2005 (包括所有版本) <a href="http://yusky.mehttp://yusky.me/">http://yusky.me</a> By:Yusky
::::: 代码能实现判断X86、X64、IA64各版本的Visual C++ 2005,正确率99%除非微软发布新版本Visual C++ 2005
::::: 有就跳过安装Visual C++ 2005,没有则先安装。
reg query %HKLMU%{A49F249F-0C91-497F-86DF-B2585E8E76B7}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 Redistributable X86
reg query %HKLMU%{7299052B-02A4-4627-81F2-1818DA5D550D}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable X86
reg query %HKLMU%{837b34e3-7c30-493c-8f6a-2b0f04e2912c}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable ATL Security Update X86
reg query %HKLMU%{6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 Redistributable X64
reg query %HKLMU%{071C9B48-7C32-4621-A0AC-3F809523288F}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable X64
reg query %HKLMU%{6CE5BAE9-D3CA-4B99-891A-1DC6C118A5FC}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable ATL Security Update X64
reg query %HKLMU%{03ED71EA-F531-4927-AABD-1C31BCE8E187}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 Redistributable IA64
reg query %HKLMU%{0F8FB34E-675E-42ED-850B-29D98C2ECE08}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable IA64
reg query %HKLMU%{85025851-A784-46D8-950D-05CB3CA43A13}>nul 2>nul&&set VC2005=Microsoft Visual C++ 2005 SP1 Redistributable ATL Security Update IA64
if defined VC2005 (echo %VC2005% 已安装!&ping -n 3 127.1>nul) else (goto 2005Install)
:::::这里你要做的事
goto:eof
:2005Install
:::::这里还可以精确判断何种版本的Visual C++ 2005,该不该更新到最新的。
:::::最新的Visual C++ 2008是Microsoft Visual C++ 2005 SP1 Redistributable ATL Security Update ***
:::::各版本下载地址 http://www.microsoft.com/downloads/details.aspx?FamilyID=766a6af7-ec73-40ff-b072-9112bab119c2&DisplayLang=zh-cn
echo 正在安装 Microsoft Visual C++ 2005 Redistributable
vcredist_x86.exe /q
goto:eof
VC2008
======@echo off
set "HKLMU=HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall"
::::: 判断系统是否已经安装了 Visual C++ 2008 (包括所有版本) bbs.bathome.net By:FastSLZ
::::: 代码能实现判断X86、X64、IA64各版本的Visual C++ 2008,正确率99%除非微软发布新版本Visual C++ 2008
::::: 有就跳过安装Visual C++ 2008,没有则先安装。
reg query %HKLMU%{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 Redistributable X86
reg query %HKLMU%{9A25302D-30C0-39D9-BD6F-21E6EC160475}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable X86
reg query %HKLMU%{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable ATL Security Update X86
reg query %HKLMU%{350AA351-21FA-3270-8B7A-835434E766AD}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 Redistributable X64
reg query %HKLMU%{8220EEFE-38CD-377E-8595-13398D740ACE}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable X64
reg query %HKLMU%{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable ATL Security Update X64
reg query %HKLMU%{2B547B43-DB50-3139-9EBE-37D419E0F5FA}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 Redistributable IA64
reg query %HKLMU%{5827ECE1-AEB0-328E-B813-6FC68622C1F9}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable IA64
reg query %HKLMU%{977AD349-C2A8-39DD-9273-285C08987C7B}>nul 2>nul&&set VC2008=Microsoft Visual C++ 2008 SP1 Redistributable ATL Security Update IA64
if defined VC2008 (echo %VC2008% 已安装!&ping -n 3 127.1>nul) else (goto 2008Install)
:::::这里你要做的事
goto:eof
:2008Install
:::::这里还可以精确判断何种版本的Visual C++ 2008,该不该更新到最新的。
:::::最新的Visual C++ 2008是Microsoft Visual C++ 2008 SP1 Redistributable ATL Security Update ***
:::::各版本下载地址 http://www.microsoft.com/downloads/details.aspx?FamilyID=2051a0c1-c9b5-4b0a-a8f5-770a549fd78c&DisplayLang=zh-cn
echo 正在安装 Microsoft Visual C++ 2008 Redistributable
vcredist_2008_x86.exe /q
goto:eof
使用方法:
VC2005和VC2008使用方法一样
1.新建文本文档,打开
2.将什么VC2005运行库代码复制到里面
3.在第16行下面添加以下代码“Run Vcredist_x86.exe”
自己整理的,很乱,希望对楼主有帮助 |