heimahack 发表于 2009-9-2 22:37:45

谁有自动安装系统补丁的AU3源码.

为什么我用XP定制不完全攻略上的系统补丁自动安装源码编译的AU3程序出错?

难道是我的AU3编译程序版本有问题?

谁能给我一个可以正常静默安装系统补丁的AU3源码.我用来做手工封装用.谢谢了.

有的朋友加我QQ.48169715
谢谢大家.

imlx2010 发表于 2010-3-7 13:07:35

au3:
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\Update.ico
#AutoIt3Wrapper_outfile=hotfix.exe
#AutoIt3Wrapper_Res_File_Add=hotfix.bat
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
ToolTip(@CR&""&"   正在安装系统补丁中··· ···请稍后   "&""&@CR,@DesktopWidth-480,@DesktopHeight-100)
RunWait ("hotfix.bat", "", @sw_hide)

bat:
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
FOR %%i IN (Hotfix\*.EXE) DO %%i /quiet /norestart /n

按上述代码建立au3和bat文件,补丁文件至于、hotfix文件夹下即可

imlx2010 发表于 2010-3-7 13:11:21

这是编译后成品

不太好

lizhongbo 发表于 2010-3-13 23:41:15

#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ico\update.ico
#AutoIt3Wrapper_outfile=update.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=2008-05
#AutoIt3Wrapper_Res_Description=番茄花园更新程序
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=http://www.tomatolei.com
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#NoTrayIcon


$g_szVersion = "TomatoUpdate"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)

ToolTip("正在安装 Windows 更新补丁,请稍后……", @DesktopWidth - 300, @DesktopHeight - 120, "安装提示", 1, 1)

;IE7
if FileExists(@WindowsDir & "\temp\ie7\ie7.exe") then RunWait( @WindowsDir & "\temp\ie7\IE7.EXE /quiet /norestart")
sleep(1000)
FileDelete(@WindowsDir & "\temp\ie7\ie7.exe")

;WINDOWS UPDATE
FileInstall(".\buding\WUA.exe", @WindowsDir & "\temp\WUA.exe", 1)
RunWait( @WindowsDir & "\temp\WUA.exe /quiet")
sleep(1000)
FileDelete( @WindowsDir & "\temp\WUA.exe")

FileInstall(".\buding\KB892130.exe", @WindowsDir & "\temp\KB892130.exe", 1)
RunWait( @WindowsDir & "\temp\KB892130.exe /quiet")
sleep(1000)
FileDelete( @WindowsDir & "\temp\KB892130.exe")

ToolTip("正在安装 Directx 9.0c 更新库 2008年06月,请稍后……", @DesktopWidth - 300, @DesktopHeight - 120, "安装提示", 1, 1)
;DIRECTX
FileInstall(".\SOFT\DC9.0C_200806.exe", @WindowsDir & "\temp\DC9.0C_200806.exe", 1)
RunWait( @WindowsDir & "\temp\DC9.0C_200806.exe /S")
sleep(1000)
FileDelete( @WindowsDir & "\temp\DC9.0C_200806.exe")


;修复鼠标方案
$C = FileExists(@WindowsDir & "\Cursors\blue B")
if $C = 1 then       
       
        FileInstall( ".\reg\Cursors.reg", @WindowsDir & "\temp\Cursors.reg", 1)
        RunWait( "REGEDIT /S " & @WindowsDir & "\temp\Cursors.reg")
        FileDelete( @WindowsDir & "\temp\Cursors.reg")

EndIf




;开始菜单-禁止第一次进入系统时弹出开始面板
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "StartMenuInit", "REG_DWORD", "00000002")
RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "StartButtonBalloonTip", "REG_DWORD", "00000002")

志在行走 发表于 2010-3-19 20:00:41

#include<File.au3>
$FileList=_FileListToArray(@ScriptDir & "\hotfix","*.exe",1)
For $i=3 To 1 Step -1
    ToolTip(@cr&" 共"&$filelist&"个系统补丁,"&$i&"秒后开始安装"&@cr,@desktopwidth-260,@desktopheight-100)
    Sleep(1000)
Next
For $i=1 To $FileList
    ToolTip(@cr&" 正在安装"&$filelist[$i]&"("&$i&"/"&$filelist&")"&@cr,@desktopwidth-280,@DesktopHeight-100)
    RunWait(@ScriptDir&"\hotfix\"& $filelist[$i] &" " &"/quiet /nobackup /norestart")
    Next
ToolTip(@CR&" 系 统 补 丁 安 装 完 毕 !"&@CR, @DesktopWidth-260,@desktopHeight-100)
Sleep(3000)

man0703 发表于 2010-3-25 20:22:26

好多代碼...都帶回家研究備用學習了~~

devilma 发表于 2010-3-25 23:09:38

对win7有效吗?

hxming 发表于 2010-6-13 22:37:46

W7的该怎么写?

aa900031 发表于 2010-6-15 11:18:45

我以前也有作过
还不错用勒

nuts26173802 发表于 2010-6-25 21:10:36

此贴必火,先占位支持了,谢谢分享
页: [1]
查看完整版本: 谁有自动安装系统补丁的AU3源码.