脚本:FpConfig(FinePlus配置程序)
优质
小牛编辑
128浏览
2023-12-01
引用FpConfig.nsi的内容:
#程序属性 !define PRODUCT_NAME "FpConfig(FinePlus配置程序)" !define PRODUCT_VERSION "0.6.0.0" !define PRODUCT_WEB_SITE "http://www.jeffio.cn" #版本信息 VIProductVersion "${PRODUCT_VERSION}" VIAddVersionKey "CompanyName" "Jeffio" VIAddVersionKey "FileDescription" "FinePlus Config" VIAddVersionKey "LegalCopyright" "Copyright (C) 2007-2008" VIAddVersionKey "FileVersion" ${PRODUCT_VERSION} #压缩设置 SetCompressor /SOLID lzma SetCompressorDictSize 32 SetDatablockOptimize on SetCompress auto #预先载入文件 ReserveFile "Ini\fp1.ini" # 预先打包文件,方便安装加速释放 ReserveFile "Ini\fp2.ini" # 预先打包文件,方便安装加速释放 ReserveFile "Ini\FinePlus.ini" # 预先打包文件,方便安装加速释放 ReserveFile "Res\topline.bmp" # 预先打包文件,方便安装加速释放 ReserveFile "Exe\colorselector.exe" # 预先打包文件,方便安装加速释放 ReserveFile "${NSISDIR}\Plugins\FindProcDLL.dll" # 预先打包文件,方便安装加速释放 ReserveFile "${NSISDIR}\Plugins\System.dll" # 预先打包文件,方便安装加速释放 #头文件 !include "MUI.nsh" !include "UsefulLib.nsh" !include "LogicLib.nsh" !include "FileFunc.nsh" !include "WordFunc.nsh" #界面相关 !define MUI_UI_HEADERIMAGE "Res\modern_headerbmp.exe" !define MUI_ABORTWARNING !define MUI_ABORTWARNING_TEXT "确定退出 ${PRODUCT_NAME}?" !define MUI_ICON "Res\FinePlus.ico" !define MUI_CUSTOMFUNCTION_GUIINIT OnMyGUIInit !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_LEFT Page custom fp1 # 自定义页面 Page custom fp2 fp3 # 自定义页面 #相关宏 ;!insertmacro GetFileVersion ;!insertmacro VersionCompare !insertmacro GetBaseName !insertmacro MUI_LANGUAGE "SimpChinese" # 设置安装界面语言 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS #程序设置 Name "FpConfig(FinePlus配置程序)" OutFile "FpConfig.exe" Caption "FpConfig(FinePlus配置程序)" XPStyle on BrandingText "FpConfig编译时间:${__DATE__}" Section SectionEnd #查找进程 ;Function FindProcDLL ; FindProcDLL::FindProc "QQ.exe" ; StrCmp $R0 0 +3 ; MessageBox MB_YESNO "检测到QQ正在运行中,设置将无法生效,建议关闭QQ后再运行本程序。是否继续?$\r$\n$\r$\nFinePlus由morning编写" IDYES NoAbort1 ; Abort ; NoAbort1: ; FindProcDLL::FindProc "RavMonD.exe" ; StrCmp $R0 0 +3 ; MessageBox MB_YESNO "检测到您的系统开启了瑞星杀毒的安全监控,请关闭瑞星杀毒的账号保险柜功能,否则可能无法正常使用FinePlus。$\r$\n$\r$\n设置账号保险柜方法:打开 「开始」菜单\程序\瑞星杀毒软件下载版\瑞星工具 中的账号保险柜,去掉QQ的勾选项按确定即可。$\r$\n$\r$\n是否继续?" IDYES NoAbort2 ; Abort ; NoAbort2: ; FindProcDLL::FindProc "Kav.exe" ; StrCmp $R0 0 +3 ; MessageBox MB_YESNO "检测到您的系统开启了卡巴斯基的安全监控,请把FinePlus加入信任列表,否则可能无法正常使用FinePlus。$\r$\n$\r$\n是否继续?" IDYES NoAbort3 ; Abort ; NoAbort3: ; FindProcDLL::FindProc "bot.exe" ; StrCmp $R0 0 +3 ; MessageBox MB_YESNO "检测到您的系统开启了微点主动防御软件的安全监控,请把FinePlus加入信任列表,否则可能无法正常使用FinePlus。$\r$\n$\r$\n是否继续?" IDYES NoAbort4 ; Abort ; NoAbort4: ;FunctionEnd #程序执行前操作 Function .onInit #安装程序互斥检测 ;System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' ;Pop $R0 ;StrCmp $R0 0 +3 ;MessageBox MB_OK|MB_ICONEXCLAMATION "FpConfig已经在运行中,请不要重复运行。" ;Abort InitPluginsDir File /oname=$PLUGINSDIR\fp1.ini "Ini\fp1.ini" ; 释放文件 File /oname=$PLUGINSDIR\fp2.ini "Ini\fp2.ini" ; 释放文件 File /oname=$PLUGINSDIR\FinePlus.ini "Ini\FinePlus.ini" ; 释放文件 File /oname=$PLUGINSDIR\colorselector.exe "Exe\colorselector.exe" ; 释放文件 ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0402" WriteINIStr "$PLUGINSDIR\ziti.exe.ini" "Dec" "1" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0302" WriteINIStr "$PLUGINSDIR\chuantongip.exe.ini" "Dec" "1" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0406" WriteINIStr "$PLUGINSDIR\beijing.exe.ini" "Dec" "1" "$0" ReadINIStr $1 "$EXEDIR\FinePlus.ini" "FinePlus" "0406" StrCmp $1 "15835261" 0 +2 WriteINIStr "$PLUGINSDIR\beijing.exe.ini" "Dec" "1" "8233201" IfFileExists "$EXEDIR\FinePlus.dll" PathGood MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST "请把配置程序复制到 FinePlus 程序所在文件夹下运行。$\r$\n$\r$\nFinePlus由morning编写" Abort PathGood: FindProcDLL::FindProc "QQ.exe" StrCmp $R0 0 +3 MessageBox MB_YESNO "检测到QQ正在运行中,设置可能将无法立即生效,强烈建议关闭QQ后再运行本程序。$\r$\n是否继续?$\r$\n$\r$\nFinePlus由morning编写" IDYES NoAbort Abort NoAbort: IfFileExists "$EXEDIR\FinePlus.ini" Path CopyFiles $PLUGINSDIR\FinePlus.ini $EXEDIR\FinePlus.ini Path: #检测FinePlus.dll的版本号,低于一定版本号将不能使用 ; ${GetFileVersion} "$EXEDIR\FinePlus.dll" $R0 ; ${VersionCompare} "$R0" "0.3.0.8" $0 ; ${If} $0 == 0 ; ${ElseIf} $0 == 1 ; ${Else} ; MessageBox MB_YESNO "只支持最新版本的FP,您的版本太低$\r$\n$\r$\n是否访问最新版本下载页面?$\r$\n$\r$\nFinePlus由morning编写" IDYES true IDNO false ; true: ; ExecShell "open" "http://www.jeffio.cn/read.php/69.htm" ; false: ; Abort ; ${EndIf} #第二页操作 ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0504" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 27" "State" "$0" StrCmp $0 "" 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 27" "State" "9" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0304" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 6" "State" "$0" StrCmp $0 "" 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 6" "State" "9" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0101" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 13" "State" "有" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0101" StrCmp $0 2 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 13" "State" "不干涉" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0305" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 28" "State" "左对齐" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0305" StrCmp $0 2 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 28" "State" "右对齐" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0108" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 9" "State" "'$0'" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0204" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 14" "State" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0301" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 16" "State" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0401" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 18" "State" "'$0'" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0408" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 20" "State" "'$0'" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0501" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 22" "State" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0303" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 1" "State" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0503" WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 3" "State" "$0" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0202" StrCmp $0 8 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 7" "State" "优化速度" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0202" StrCmp $0 300 0 +2 WriteINIStr "$PLUGINSDIR\fp2.ini" "Field 7" "State" "优化内存" #第一页操作 #读取注册表 ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 14" "State" "$0QQ.exe" StrCmp $0 "" 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 14" "State" "请选择您的QQ.exe位置" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $0 "$0FinePlus.ini" "WorkerDll" "Enable" StrCmp $0 0 0 +2 WriteIniStr "$PLUGINSDIR\fp1.ini" "Field 54" "State" "暂停 QQ完美助手" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $0 "$0FinePlus.ini" "WorkerDll" "Enable" StrCmp $0 1 0 +2 WriteIniStr "$PLUGINSDIR\fp1.ini" "Field 54" "State" "启用 QQ完美助手" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" IfFileExists "$0FinePlus.ini" Good WriteIniStr "$PLUGINSDIR\fp1.ini" "Field 54" "State" "删除 QQ完美助手" Good: #读取INI配置文件 ; ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0001" ; WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 8" "State" "$0" ; StrCmp $0 "" 0 +2 ; WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 8" "State" "请选择您的QQ.exe位置" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "020a" StrCmp $0 0 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 3" "State" "无功能" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "020a" StrCmp $0 2 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 3" "State" "复制IP" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0002" WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 15" "State" "$0" StrCmp $0 "" 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 15" "State" "请选择您的QQWry.Dat位置" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "010a" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 49" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0607" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 47" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0100" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 17" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0102" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 18" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0103" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 19" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0105" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 20" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0107" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 21" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0200" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 22" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0201" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 23" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0203" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 24" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0205" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 25" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0206" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 26" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0207" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 27" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0208" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 28" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0209" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 29" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0600" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 30" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0601" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 31" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0602" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 32" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0603" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 33" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0604" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 34" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0605" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 35" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0606" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 36" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0104" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 43" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0300" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 46" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0400" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 45" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0500" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 44" "State" "1" ReadINIStr $0 "$EXEDIR\FinePlus.ini" "FinePlus" "0409" StrCmp $0 1 0 +2 WriteINIStr "$PLUGINSDIR\fp1.ini" "Field 52" "State" "1" FunctionEnd #第一页属性 Function fp1 InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\fp1.ini" ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 7" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 10" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 16" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 6" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 5" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 8" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 4" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 2" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp1.ini "Field 1" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ;!insertmacro MUI_HEADER_TEXT "FinePlus配置程序" "请对FinePlus进行基础设置【第一页/共二页】" InstallOptions::show ; 显示自定义页面 FunctionEnd #第二页属性 Function fp2 InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\fp2.ini" ReadINIStr $R1 $PLUGINSDIR\fp2.ini "Field 2" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp2.ini "Field 4" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp2.ini "Field 5" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp2.ini "Field 8" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ReadINIStr $R1 $PLUGINSDIR\fp2.ini "Field 33" "HWND" CreateFont $R2 "宋体" 9 700 SendMessage $R1 ${WM_SETFONT} $R2 0 ; !insertmacro MUI_HEADER_TEXT "FinePlus配置程序" "请对FinePlus进行高级设置,推荐高级用户对此进行设置 【第二页/共二页】" InstallOptions::show ; 显示自定义页面 FunctionEnd Function fp3 ;添加在离开函数中 ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Settings" "State" StrCmp $0 0 nextpage StrCmp $0 34 button ; 为控件在INI文件中的序号 StrCmp $0 35 button1 ; 为控件在INI文件中的序号 StrCmp $0 36 button2 ; 为控件在INI文件中的序号 Abort ; Return to the page button: CopyFiles $PLUGINSDIR\colorselector.exe $PLUGINSDIR\ziti.exe Execwait "$PLUGINSDIR\ziti.exe" Abort button1: CopyFiles $PLUGINSDIR\colorselector.exe $PLUGINSDIR\beijing.exe Execwait "$PLUGINSDIR\beijing.exe" Abort button2: CopyFiles $PLUGINSDIR\colorselector.exe $PLUGINSDIR\chuantongip.exe Execwait "$PLUGINSDIR\chuantongip.exe" Abort nextpage: FunctionEnd Function OnMyGUIInit ${GetDlgItemRect} $0 $1 $2 $3 $HWNDPARENT ${IDC_CANCEL} IntOp $2 $3 - $1 IntOp $1 $1 + 3 IntOp $2 $2 - 2 GetFunctionAddress $4 Copy GetFunctionAddress $5 IPUP GetFunctionAddress $6 UPDate ${CreateLink} $HWNDPARENT 6 368 153 $2 "访问我的网站Www.Jeffio.Cn" "http://www.jeffio.cn" ${CreateLink} $HWNDPARENT 320 390 50 $2 "重置设置" $4 ${CreateLink} $HWNDPARENT 250 390 50 $2 "更新IP库" $5 ${CreateLink} $HWNDPARENT 180 390 50 $2 "检测新版" $6 File /oname=$PLUGINSDIR\topline.bmp "Res\topline.bmp" SetBrandingImage "$PLUGINSDIR\topline.bmp" FunctionEnd Function Copy CopyFiles $PLUGINSDIR\FinePlus.ini $EXEDIR\FinePlus.ini MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST "已经恢复为官方默认配置,点击确定将重新启动配置程序。" IDOK IDOK: System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1' Exec "$R0" ;执行重启exe指令 ${GetBaseName} "$R0" $R1 KillProcDLL::KillProc "$R1.exe" FunctionEnd Function IPUP MessageBox MB_YESNO "确定运行IP库升级程序?请确保当前目录存在ShowIP.exe。$\r$\n$\r$\n是否继续?" IDYES NoAbort Abort NoAbort: Exec "$EXEDIR\ShowIP.exe" FunctionEnd Function UPDate MessageBox MB_YESNO "确定查看是否有新版本?请确保目前网络通畅。$\r$\n$\r$\n是否继续?" IDYES NoAbort Abort NoAbort: execshell "open" "http://www.jeffio.cn/read.php/68.htm" FunctionEnd Function Run #快捷方式创建 SetShellVarContext current # 桌面图标 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 38" "State" ${if} $1 == "1" IfFileExists "$EXEDIR\FPSet.exe" lnk1 CreateShortCut "$DESKTOP\腾讯QQ(FinePlus).lnk" "$EXEDIR\FinePlus.exe" "" "" "" "" "" "FinePlus(QQ2007辅助工具)" lnk1: IfFileExists "$EXEDIR\FinePlus.exe" lnk2 CreateShortCut "$DESKTOP\FinePlus设置.lnk" "$EXEDIR\FPSet.exe" "" "" "" "" "" "FinePlus转发方式设置程序" lnk2: ${endif} SetShellVarContext current # 快速启动图标 ReadINIStr $2 "$PLUGINSDIR\fp1.ini" "Field 40" "State" ${if} $2 == "1" IfFileExists "$EXEDIR\FPSet.exe" lnk3 CreateShortCut "$QUICKLAUNCH\腾讯QQ(FinePlus).lnk" "$EXEDIR\FinePlus.exe" "" "" "" "" "" "FinePlus(QQ2007辅助工具)" lnk3: IfFileExists "$EXEDIR\FinePlus.exe" lnk4 CreateShortCut "$QUICKLAUNCH\FinePlus设置.lnk" "$EXEDIR\FPSet.exe" "" "" "" "" "" "FinePlus转发方式设置程序" lnk4: ${endif} SetShellVarContext current # 桌面图标 ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 37" "State" StrCmp $1 1 0 +2 CreateShortCut "$DESKTOP\腾讯QQ.lnk" "$0QQ.exe" SetShellVarContext current # 快速启动图标 ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $2 "$PLUGINSDIR\fp1.ini" "Field 39" "State" StrCmp $2 1 0 +2 CreateShortCut "$QUICKLAUNCH\腾讯QQ.lnk" "$0QQ.exe" #第一页操作 ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 52" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0409" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 17" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0100" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 18" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0102" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 19" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0103" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 20" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0105" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 21" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0107" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 22" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0200" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 23" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0201" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 24" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0203" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 25" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0205" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 26" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0206" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 27" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0207" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 28" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0208" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 29" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0209" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 30" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0600" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 31" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0601" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 32" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0602" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 33" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0603" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 34" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0604" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 35" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0605" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 36" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0606" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 47" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0607" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 49" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "010a" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 43" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0104" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 46" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0300" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 45" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0400" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 44" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0500" "$0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 3" "State" StrCmp $0 "无功能" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "020a" "0" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 3" "State" StrCmp $0 "菜单" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "020a" "1" ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 3" "State" StrCmp $0 "复制IP" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "020a" "2" #第二页操作 ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 13" "State" StrCmp $9 "无" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0101" "0" ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 13" "State" StrCmp $9 "有" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0101" "1" ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 13" "State" StrCmp $9 "不干涉" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0101" "2" ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 9" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0108" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 14" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0204" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 16" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0301" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 18" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0401" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 20" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0408" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 22" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0501" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 1" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0303" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 3" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0503" '"$0"' ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 27" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0504" "$0" ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 6" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0304" "$0" ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 28" "State" StrCmp $9 "居中" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0305" "0" ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 28" "State" StrCmp $9 "左对齐" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0305" "1" ReadINIStr $9 "$PLUGINSDIR\fp2.ini" "Field 28" "State" StrCmp $9 "右对齐" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0305" "2" ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 7" "State" StrCmp $0 "优化速度" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0202" "8" ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 7" "State" StrCmp $0 "平衡" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0202" "45" ReadINIStr $0 "$PLUGINSDIR\fp2.ini" "Field 7" "State" StrCmp $0 "优化内存" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0202" "300" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $2 "$0FinePlus.ini" "WorkerDll" "Enable" StrCmp $2 0 0 +2 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 CopyFiles "$EXEDIR\MSIMG32.dll" "$0MSIMG32.dll" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $2 "$0FinePlus.ini" "WorkerDll" "Enable" StrCmp $2 0 0 +2 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 WriteIniStr "$0FinePlus.ini" "WorkerDll" "Enable" "1" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 WriteIniStr "$0FinePlus.ini" "WorkerDll" "Path" "$EXEDIR\FinePlus.Dll" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" IfFileExists "$0MSIMG32.dll" Path3 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 CopyFiles "$EXEDIR\MSIMG32.dll" "$0MSIMG32.dll" Path3: ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" IfFileExists "$0FinePlus.ini" Path4 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 WriteIniStr "$0FinePlus.ini" "WorkerDll" "Path" "$EXEDIR\FinePlus.Dll" ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "启用 QQ完美助手" 0 +2 WriteIniStr "$0FinePlus.ini" "WorkerDll" "Enable" "1" Path4: ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ReadINIStr $2 "$0FinePlus.ini" "WorkerDll" "Enable" StrCmp $2 1 0 +2 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "暂停 QQ完美助手" 0 +2 WriteIniStr "$0FinePlus.ini" "WorkerDll" "Enable" "0" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" IfFileExists "$0FinePlus.ini" Path1 Path1: ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "删除 QQ完美助手" 0 +2 Delete "$0FinePlus.ini" ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" IfFileExists "$0MSIMG32.dll" Path2 Path2: ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" StrCmp $1 "删除 QQ完美助手" 0 +2 Delete "$0MSIMG32.dll" FunctionEnd Function RefreshShellIcons System::Call 'shell32.dll::SHChangeNotify(l, l, i, i) v (0x08000000, 0, 0, 0)' FunctionEnd #程序执行后操作 Function .onInstSuccess hidewindow Call Run ReadINIStr $2 "$PLUGINSDIR\fp1.ini" "Field 14" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0001" '"$2"' ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 15" "State" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0002" '"$0"' ReadINIStr $2 "$PLUGINSDIR\fp1.ini" "Field 14" "State" StrCmp $2 "请选择您的QQ.exe位置" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0001" '""' ReadINIStr $0 "$PLUGINSDIR\fp1.ini" "Field 15" "State" StrCmp $0 "请选择您的QQWry.Dat位置" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0002" '""' ReadINIStr $0 "$PLUGINSDIR\ziti.exe.ini" "Dec" "1" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0402" "$0" ReadINIStr $0 "$PLUGINSDIR\beijing.exe.ini" "Dec" "1" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0406" "$0" ReadINIStr $1 "$PLUGINSDIR\beijing.exe.ini" "Dec" "1" StrCmp $1 "8233201" 0 +2 WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0406" "15835261" ReadINIStr $0 "$PLUGINSDIR\chuantongip.exe.ini" "Dec" "1" WriteINIStr "$EXEDIR\FinePlus.ini" "FinePlus" "0302" "$0" #判断QQ是否在运行 ; FindProcDLL::FindProc "QQ.exe" $R0 ; ${If} $R0 == 1 #如果在运行执行这一步 ; MessageBox MB_OK "设置完成,重新运行QQ即可生效。" ; MessageBox MB_YesNo "FinePlus由morning编写,是否访问他的论坛?" IDYES go ; Abort ; go: ; ExecShell "open" "http://bbs.ye-soft.net" ; ${else} #否则执行这一步 ; ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" ; ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" ; StrCmp $1 "启用 QQ完美助手" 0 +2 ; MessageBox MB_YesNo "设置完成,是否立即运行QQ?$\r$\n$\r$\nFinePlus由morning编写" IDYES NoAbort ; Abort ; NoAbort: ; Exec "$0QQ.exe" ; ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" ; StrCmp $1 "暂停 QQ完美助手" 0 +2 ; MessageBox MB_OK "设置完成$\r$\n$\r$\nFinePlus由morning编写" ; ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" ; StrCmp $1 "删除 QQ完美助手" 0 +2 ; MessageBox MB_OK "设置完成$\r$\n$\r$\nFinePlus由morning编写" ; ${EndIf} #检测本地配置文件 ReadINIStr $1 "$PLUGINSDIR\fp1.ini" "Field 54" "State" ${If} $1 == "启用 QQ完美助手" #如果在运行执行这一步 ReadRegStr $0 HKLM "SOFTWARE\Tencent\QQ" "Install" MessageBox MB_YesNo "设置完成,是否立即运行QQ?$\r$\n$\r$\nFinePlus由morning编写" IDYES NoAbort Abort NoAbort: Exec "$0QQ.exe" ${else} #否则执行这一步 MessageBox MB_OK "设置完成$\r$\n$\r$\nFinePlus由morning编写" MessageBox MB_YesNo "FinePlus由morning编写,是否访问他的论坛?" IDYES go Abort go: ExecShell "open" "http://bbs.ye-soft.net" ${EndIf} hidewindow Call RefreshShellIcons #删除临时解压目录 RMdir /r "$PLUGINSDIR" FunctionEnd
资源文件点击另存。