找回密码
 加入
搜索
查看: 2482|回复: 5

这个绿化脚本如何写为一个GUI,用绿化和卸载两个按键执行?

[复制链接]
发表于 2008-6-18 07:45:48 | 显示全部楼层 |阅读模式
绿化脚本如何写为一个GUI,用绿化和卸载两个按键执行?
绿化批处理
@ECHO off
echo.正在进行绿色初始化......
rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\caicai_IN.inf
copy NfRuntime.dll %windir%\system32
regsvr32 /s NfRuntime.dll
卸载批处理
@ECHO off
echo.正在进行注册信息清除......
rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\caicai_IN.inf
del %windir%\system32\NfRuntime.dll
regsvr32 /s /U NfRuntime.dll

此外,导入注册文件(如:caicai.reg)的脚本应该怎么写?




[ 本帖最后由 爬爬虫 于 2008-6-19 10:26 编辑 ]
发表于 2008-6-18 08:56:29 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("谷歌绿化", 187, 72, 710, 715)
$Button1 = GUICtrlCreateButton("绿化", 16, 16, 65, 41, 0)
$Button2 = GUICtrlCreateButton("卸载", 104, 16, 65, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### START Koda GUI section ### Form=

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        Run("rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\caicai_IN.inf")
                        FileCopy("NfRuntime.dll", @WindowsDir & "\system32", 1)
                        Run("regsvr32 /s NfRuntime.dll")
                        MsgBox(0, "恭喜", "已完成绿化")
                Case $Button2
                        Run("rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\caicai_IN.inf")
                        FileDelete(@WindowsDir & "\system32\NfRuntime.dll")
                        Run("regsvr32 /s /U NfRuntime.dll")
                        MsgBox(0, "恭喜", "已完成卸载")
        EndSwitch
WEnd


[ 本帖最后由 qop1830 于 2008-6-18 08:58 编辑 ]
发表于 2008-6-18 09:21:03 | 显示全部楼层
caicai.reg
可以用reg2au3转哈就行了撒
 楼主| 发表于 2008-6-18 13:23:52 | 显示全部楼层
感谢两位楼主的帮助,再问一下该如何加下附件图片中的版权信息和顶部的图片?
发表于 2008-6-19 00:46:33 | 显示全部楼层
自己多动手  很快就会的!    改标题吧!!
发表于 2017-3-16 21:31:54 | 显示全部楼层
回复 5# qop1830


    $Form1 = GUICreate("谷歌绿化", 187, 72)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 13:31 , Processed in 0.071564 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表