暴风影音去广告补丁NSIS代码开放

#7-ZIP打开为空白
!system '>blank set/p=MSCF<nul'
!packhdr temp.dat 'cmd /c Copy /b temp.dat /b +blank&&del blank'

#压缩设置
  SetCompressor /SOLID lzma
  SetCompressorDictSize 32
  SetDatablockOptimize on
  SetCompress auto


#预先载入文件,方便安装加速释放
  Reservefile "Storm.ini"
  ReserveFile "storm.bmp"
  ReserveFile "${NSISDIR}\Plugins\System.dll"
  ReserveFile "${NSISDIR}\Plugins\WaterCtrl.dll"
  ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
#头文件
  !include "MUI.nsh"
  !include "logiclib.nsh"
  !include "WinMessages.nsh"
  !include "UsefulLib.nsh"

#界面相关
  !define MUI_ABORTWARNING
  !define MUI_ABORTWARNING_TEXT "你确定要退出?"
  !define MUI_WELCOMEFINISHPAGE_BITMAP  "storm.bmp"
  !define MUI_ICON "Storm.ico"
	!define MuI_HEADERIMAGE "storm.bmp"
  !define MUI_FINISHPAGE_NOAUTOCLOSE
  !define PRODUCT_NAME "暴风影音 去广告补丁V1.1"
  !define PRODUCT_VERSION "1.1.0.0206"
  !define PRODUCT_PUBLISHER "ChongHom-Hu工作室"
  !define PRODUCT_WEB_SITE "http://weibo.com/bobylive"
  page custom Storm
	page custom Do
  !insertmacro MUI_LANGUAGE "SimpChinese"
  Caption "暴风影音 去广告补丁 V1.1"
  SetDatablockOptimize on
  BrandingText "ChongHom-Hu工作室 ${__DATE__}"
  XPStyle on
#使用自定义UI
  ChangeUI all "default.exe"
  MiscButtonText "" "执行" "" "完成"
#程序设置
  OutFile "Storm KillAd V1.1.exe"



  Section
  SectionEnd


  #函数定义,主功能设置
  Function Storm
    ;设置输出路径且当路径不存在时创建,设定当前的工作目录
    SetOutPath $PluginsDIR
    ;释放文件
    File /oname=$PLUGINSDIR\Storm.ini "Storm.ini"
    File /oname=$PLUGINSDIR\top.bmp "storm.bmp"
    File "waterctrl.dll"

   FindProcDLL::FindProc "Storm.exe"
    StrCmp $R0 1 +3 +1
   FindProcDLL::FindProc "Storm2.exe"
    StrCmp $R0 1 +1 +4
     MessageBox MB_ICONINFORMATION|MB_RETRYCANCEL "安装程序检测到 暴风影音 正在运行!请退出程序重试或取消本次安装!"   IDRetry retry IDCANCEL Cancel
     Retry:
      Goto -5
     Cancel:
      Quit

   ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\storm2" "DisplayIcon"
   ReadRegStr $R5 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\storm2" "DisplayVersion"
   StrCpy $R2 $R1 -9
   WriteINIStr "$PLUGINSDIR\Storm.ini" "Field 5" "State" $R2
   WriteINIStr "$PLUGINSDIR\Storm.ini" "Field 9" "Text" $R5
    installoptions::initdialog /nounload $PluginsDIR\Storm.ini
      System::Call 'user32::LoadImage(i,t,i,i,i,i,) i (0,"storm.bmp",0,0,0,0x2010) .s'
      Pop $R0
      GetDlgItem $R1 $HWNDPARENT   1046
	    System::Call '$PLUGINSDIR\waterctrl::enablewater(i,i,i,i,i,i) i ($HWNDPARENT,0,0,$R0,3,50)'
	    System::Call '$PLUGINSDIR\waterctrl::setwaterparent(i $HWNDPARENT)'
	    System::Call '$PLUGINSDIR\waterctrl::flattenwater()'
    	System::Call '$PLUGINSDIR\waterctrl::waterblob(i,i,i,i) i (70,198,10,1000)'
      installoptions::show
  Functionend
	# DO 这个函数表示按下确定的时候所做的动作
  Function Do
  ReadINIStr $R3 "$PLUGINSDIR\Storm.ini" "Field 5" "State"
  IfFileExists "$R3\Storm.exe" +4 +1
  MessageBox MB_ICONINFORMATION|MB_OK " 你真的安装了暴风影音?我没找到耶。恕我无能为力,实在找不到要破解的东西!(按确定退出)"
	Abort
	Quit
	ReadINIStr $R1 "$PLUGINSDIR\Storm.ini" "Field 7" "State"
  StrCmp $R1 1 +1 killad ;要跳到下面哦
	IfFileExists "$R3\Storm.exe.by" +1 +3
  Delete "$R3\Storm.exe"
  Rename "$R3\Storm.exe.by" "$R3\Storm.exe"
  IfFileExists "$R3\stormpop.exe.by" +1 +3
	RMDir "$R3\stormpop.exe"
	Rename "$R3\stormpop.exe.by" "$R3\stormpop.exe"
  IfFileExists "$R3\StormSkinRes.dll.by" +1 +3
  Delete "$R3\StormSkinRes.dll"
  Rename "$R3\StormSkinRes.dll.by" "$R3\StormSkinRes.dll"
	IfFileExists "$R3\Media\video_style_list.xml.by" +1 +3
	Delete "$R3\Media\video_style_list.xml"
	Rename "$R3\Media\video_style_list.xml.by" "$R3\Media\video_style_list.xml"
	IfFileExists "$R3\Media\stcon.ini.by" +1 +3
  Delete "$R3\Media\stcon.ini"
  Rename "$R3\Media\stcon.ini.by" "$R3\Media\stcon.ini"
  IfFileExists "$R3\StormUpdate.dll.by" +1 +3
  Delete "$R3\StormUpdate.dll"
  Rename "$R3\StormUpdate.dll.by" "$R3\StormUpdate.dll"
  IfFileExists "$R3\Media2.dll.by" +1 +6
  RMDir "$R3\Media2.dll"
  Rename "$R3\Media2.dll.by" "$R3\Media2.dll"
	MessageBox MB_OK|MB_ICONEXCLAMATION "还原 暴风影音 完毕!感谢您的使用"
	Abort
	Quit
	MessageBox MB_OK|MB_ICONEXCLAMATION "很抱歉,还原原版 暴风影音 失败,原因是无法找到备份文件或者您从来没有执行过本补丁,我将会致力在下一个版本跟进这个问题。"
	ExecWait "$R3\Box\Stline.exe /regserver"
	Abort
	Quit

	killad:
	ReadINIStr $R3 "$PLUGINSDIR\Storm.ini" "Field 5" "State"
	ReadINIStr $R2 "$PLUGINSDIR\Storm.ini" "Field 6" "State"  ;第95行要跳到这里
  StrCmp $R2 0 +1 +4
	MessageBox MB_OK|MB_ICONEXCLAMATION "你至少也选一个吧!最基本也要选择“去除暴风影音界面所有广告,屏蔽程序校验,屏蔽广告下载。”"
	Abort
	Quit
	ReadINIStr $R7 "$PLUGINSDIR\Storm.ini" "Field 10" "State"
	StrCmp $R7 1 +1 +3
	Rename "$R3\stormpop.exe" "$R3\stormpop.exe.by"
	CreateDirectory "$R3\stormpop.exe"
	ReadINIStr $R5 "$PLUGINSDIR\Storm.ini" "Field 11" "State"
	StrCmp $R5 1 +1 +3
	ExecWait "$R3\box\Stline.exe /unregserver"
	ExecWait "$R3\box\Stline.exe /exit"
	ReadINIStr $R4 "$PLUGINSDIR\Storm.ini" "Field 12" "State"
	StrCmp $R4 1 +1 +4
	Rename "$R3\StormSkinRes.dll" "$R3\StormSkinRes.dll.by"
	SetOutPath $R3
	File /a StormSkinRes.dll
	ReadINIStr $R4 "$PLUGINSDIR\Storm.ini" "Field 13" "State"
	StrCmp $R4 1 +1 +4
	Rename "$R3\Storm.exe" "$R3\Storm.exe.by"
	SetOutPath $R3
	File /a Storm.exe
	Rename "$R3\Media2.dll" "$R3\Media2.dll.by"
	Rename "$R3\StormUpdate.dll" "$R3\StormUpdate.dll.by"
	CreateDirectory "$R3\Media2.dll"
	SetOutPath $R3
	File /a StormUpdate.dll
	Rename "$R3\Media\stcon.ini" "$R3\Media\stcon.ini.by"
	Rename "$R3\Media\video_style_list.xml" "$R3\Media\video_style_list.xml.by"
	SetOutPath "$R3\Media"
	File /a stcon.ini
	File /a video_style_list.xml
	MessageBox MB_OK|MB_ICONEXCLAMATION "补丁应用完成,感谢使用ChongHom-Hu补丁!"
	Abort
	Quit
  Functionend
  #区段定义
  Section "bobylive"
  sectionend

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值