标题: [文件操作] 在执行BAT文件时弹出白框! [打印本页]
作者: likai2b 时间: 2015-5-5 02:09 标题: 在执行BAT文件时弹出白框!
在执行一个BAT绿化文件时,弹出一个白框,框的标题开头为vbscript:后面应该是执行代码。但是弹出白框后代码无法执行成功,试了几个BAT文件均出现这种情况,之前还没有,这是怎么回事啊,需要改注册列表么?
作者: CrLf 时间: 2015-5-5 02:57
如果连运行空的 bat 都会弹,那基本上可以确定是这两种情况:
1、bat 文件的关联方式被修改
2、映像劫持
太高端的 api 劫持之类的咱就不考虑了...有那技术没必要拿 bat 做文章
看看这两个命令的输出复制代码
再看看这个注册表路径下有没有 cmd.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Image File ExecutionOptions
作者: gawk 时间: 2015-5-5 09:01
把那个BAT绿化文件的完整代码发出来看看
作者: 522235677 时间: 2015-5-5 09:21
多半是创建快捷方式的vbs代码的问题
作者: likai2b 时间: 2015-5-5 11:11
回复 3# gawk
完整代码如下:
@ECHO OFF&USHD %~DP0 &TITLE 绿化
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
:: 安装前结束相关进程避免清不干净
taskkill /f /im TXP* >NUL 2>NUL
taskkill /f /im QQP* >NUL 2>NUL
taskkill /f /im QQC* >NUL 2>NUL
taskkill /f /im QQ.exe >NUL 2>NUL
:: 开始清理掉后台一些相关残留文件
del/f/q "%tmp%\*.tvl">NUL 2>NUL
del/f/q "%tmp%\*.tsd">NUL 2>NUL
del/f/q "%tmp%\ts*.dat">NUL 2>NUL
del/f/q "%tmp%\QQSa*.exe">NUL 2>NUL
rd/s/q "%AppData%\Tencent\QQ" 2>NUL
rd/s/q "%AppData%\Tencent\Logs"2>NUL
rd/s/q "%AppData%\Tencent\Users"2>NUL
rd/s/q "%AppData%\Tencent\QTalk"2>NUL
rd/s/q "%APPDATA%\Tencent\QQDoctor"2>NUL
rd/s/q "%AppData%\Tencent\DeskUpdate"2>NUL
rd/s/q "%ProgramData%\Tencent\QQProtect"2>NUL
rd/s/q "%AppData%\Tencent\AndroidAssist"2>NUL
rd/s/q "%AppData%\Tencent\QQPhoneManager"2>NUL
rd/s/q "%AppData%\Tencent\QQPhoneAssistant"2>NUL
rd/s/q "%UserProfile%\Documents\Tencent" 2>NUL
rd/s/q "%UserProfile%\My Documents\Tencent"2>NUL
rd/s/q "%UserProFile%\AppData\LocalLow\QQMiniDL"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\QQPet"2>NUL
rd/s/q "%UserProfile%\AppData\Local\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\QQKartLiveUpdate"2>NUL
rd/s/q "%UserProfile%\Documents\Tencent Files\QPlus" 2>NUL
rd/s/q "%UserProfile%\My Documents\Tencent Files\QPlus"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\Tencent\QQProtect"2>NUL
reg delete HKLM\SYSTEM\CurrentControlSet\services\QQProtect /F>NUL 2>NUL
rd/s/q "%UserProfile%\Documents\Tencent Files\All Users\QQ\Misc\OperateFace"2>NUL
rd/s/q "%UserProfile%\My Documents\Tencent Files\All Users\QQ\Misc\OperateFace"2>NUL
:: 注册谷歌、火狐、Opera 快速登陆控件
regsvr32 /s Bin\TXSSO\Npchrome\npactivex.dll
:: 注册SSO核心库、IE及接口快速登陆控件
regsvr32 /s Bin\TXSSO\Bin\SSOCommon.dll
regsvr32 /s Bin\TXSSO\Bin\npSSOAxCtrlForPTLogin.dll
:: 注册中转站上传,群共享、微云上传控件
regsvr32 /s Plugin\Com.Tencent.NetDisk\Bin\QQDisk\Bin\TXFTNActiveX.dll
:: 注册下载助手登陆库控件(注:不传递到系统公用库并注册则打开它无法登陆)
:: 放置视频直播下载库组件(注:不传递到系统公用库会导致无法加载资源安装)
:: if exist Bin\DownloadProxyPS.dll regsvr32 /s Bin\DownloadProxyPS.dll
:: if not exist "%Windir%\SysWOW64" md "%CommonProgramFiles%\Tencent\TXSSO\Bin"2>NUL
:: if exist "%Windir%\SysWOW64" md "%CommonProgramFiles(x86)%\Tencent\TXSSO\Bin"2>NUL
:: if not exist "%Windir%\SysWOW64" xcopy /i/y/e Bin\TXSSO\Bin "%CommonProgramFiles%\Tencent\TXSSO\Bin">NUL 2>NUL
:: if exist "%Windir%\SysWOW64" xcopy /i/y/e Bin\TXSSO\Bin "%CommonProgramFiles(x86)%\Tencent\TXSSO\Bin">NUL 2>NUL
:: if not exist "%Windir%\SysWOW64" regsvr32 /s "%CommonProgramFiles%\Tencent\TXSSO\Bin\SSOLUIControl.dll"
:: if exist "%Windir%\SysWOW64" regsvr32 /s "%CommonProgramFiles(x86)%\Tencent\TXSSO\Bin\SSOLUIControl.dll"
:: if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\TXSSO /f /v version /d "1.2.3.19" >NUL
:: if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\TXSSO /f /v version /d "1.2.3.19" >NUL
:: 设置后台终端设备老图标和防止群图标复发占位文件
md "%AppData%\Tencent\QQ\Misc\CSC\2052\7">NUL 2>NUL
md "%AppData%\Tencent\QQ\Misc\CSC\2052\9">NUL 2>NUL
echo.>"%AppData%\Tencent\QQ\Misc\LogoFile"2>NUL
echo.> "%AppData%\Tencent\QQ\Misc\CSC\2052\7\4"2>NUL
echo.>"%AppData%\Tencent\QQ\Misc\CSC\2052\7\5"2>NUL
echo.> "%AppData%\Tencent\QQ\Misc\CSC\2052\9\18" 2>NUL
Attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\7\4" >NUL 2>NUL
attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\7\5" >NUL 2>NUL
attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\9\18" >NUL 2>NUL
:: 设置安装路劲,安装视频留言和影音播放等组件下载需要
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQ2009 /f /v Install /d "%~dp0\" >NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQ2009 /f /v Install /d "%~dp0\" >NUL
:: 创建安装版本号,企业类型网页会话需要,CRM组件需保留
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQ2009 /f /v version /d "54.09.0.14515.0" >NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQ2009 /f /v version /d "54.09.0.14515.0" >NUL
:UserData
ver|findstr "5\.[0-9]\.[0-9][0-9]*" > nul && (goto WinXP)
ver|findstr "6\.[0-9]\.[0-9][0-9]*" > nul && (goto Win7+)
ver|findstr "10\.[0-9]\.[0-9][0-9]*" > nul && (goto Win7+)
:WinXP
GOTO Menu
:Win7+
:: 生成个人文件夹保存位置配置文件,让Win、Win8或更高版的系统能正常保存自定义路径!
if not exist "%Public%\Documents\Tencent\QQ" md "%Public%\Documents\Tencent\QQ"2>NUL
if not exist "%Public%\Documents\Tencent\QQ\UserDataInfo.ini" echo.>"%Public%\Documents\Tencent\QQ\UserDataInfo.ini"2>NUL
GOTO Menu
:Menu
echo 1.创建桌面QQ
echo 2.显示新移动设备终端图标[自选]
echo 3.显示老移动设备终端图标[默认]
echo 4.关联网页会话协议,表情包,Q音乐收听[自选]
echo 5.禁用网页会话协议,表情包,Q音乐收听[默认]
echo.&echo.
set /p a=输入数字回车:
if "%a%"=="1" Goto DesktopLnk
if "%a%"=="2" Goto NewClientType
if "%a%"=="3" Goto OldClientType
if "%a%"=="4" Goto AssocProtocol
if "%a%"=="5" Goto CancelProtocol
:NewClientType
rd/s/q "%AppData%\Tencent\QQ\Misc\ClientType"2>NUL
rd/s/q "%AppData%\Tencent\QQ\Misc\CSC\2052\9"2>NUL
SET E=完成!&GOTO MSGBOX
:OldClientType
rd/s/q "%AppData%\Tencent\QQ\Misc\ClientType"2>NUL
md "%AppData%\Tencent\QQ\Misc\CSC\2052\9" >NUL 2>NUL
echo.>"%AppData%\Tencent\QQ\Misc\CSC\2052\9\18"2>NUL
attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\9\18">NUL 2>NUL
SET E=完成!&GOTO MSGBOX
:AssocProtocol
if exist Bin\Timwp.dll regsvr32 /s Bin\Timwp.dll
if exist Bin\AppCom.dll regsvr32 /s Bin\AppCom.dll
if exist Bin\TXPFProxy.dll regsvr32 /s Bin\TXPFProxy.dll
if exist Bin\KernelUtil.dll regsvr32 /s Bin\KernelUtil.dll
if exist Bin\QQExternal.exe Bin\QQExternal.exe /SetupRegister
if exist Bin\TXPlatform.bak ren Bin\TXPlatform.bak TXPlatform.exe >NUL 2>NUL
if exist Bin\TXPlatform.exe Bin\TXPlatform.exe /RegServer
SET E=完成!&GOTO MSGBOX
:CancelProtocol
reg delete HKCU\Software\Classes\Tencent /F>NUL 2>NUL
reg delete HKLM\Software\Classes\Tencent /F>NUL 2>NUL
if exist Bin\Timwp.dll regsvr32 /s /u Bin\Timwp.dll
if exist Bin\AppCom.dll regsvr32 /s /u Bin\AppCom.dll
if exist Bin\TXPFProxy.dll regsvr32 /s /u Bin\TXPFProxy.dll
if exist Bin\KernelUtil.dll regsvr32 /s /u Bin\KernelUtil.dll
if exist Bin\TXPlatform.exe Bin\TXPlatform.exe /UnregServer
reg delete HKLM\Software\Wow6432Node\Classes\Tencent /F>NUL 2>NUL
if exist Bin\TXPlatform.exe ren Bin\TXPlatform.exe TXPlatform.bak >NUL 2>NUL
SET E=完成!&GOTO MSGBOX
esktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin"":b.Save:close")&SET E=完成!&GOTO MSGBOX
:MsgBox
if "%1"=="" mshta VBScript:MsgBox("%e%",vbSystemModal,"")(close)& Cls&Goto Menu
作者: likai2b 时间: 2015-5-5 11:48
回复 2# CrLf
assoc命令可用,注册列表里没有发现CMD.EXE
作者: likai2b 时间: 2015-5-5 11:48
回复 4# 522235677
有没有解决方法啊,请教!
作者: likai2b 时间: 2015-5-5 12:00
回复 2# CrLf
BAT关联没有问题,问题是在执行例如新建快捷方式等任务是弹出白框。白框的标题就是执行的代码。点击关闭白框后BAT文件没有执行成功啊。。。。
作者: likai2b 时间: 2015-5-5 16:54
回复 2# CrLf
空白BAT和直接执行的都不弹窗,只有在BAT选择执行的时候才弹窗。
作者: CrLf 时间: 2015-5-5 17:06
本帖最后由 CrLf 于 2015-5-6 02:11 编辑
问题出在- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin"":b.Save:close")&SET E=完成!&GOTO MSGBOX
复制代码
这句执行一半时出错
看下执行以下几句弹出的最大数字是几(1~5之间)?- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):msgbox 1:close")
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):msgbox 2:close")
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":msgbox 3:close")
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin"":msgbox 4:b.Save:close")
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ7.1.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin"":b.Save:msgbox 5:close")
复制代码
作者: likai2b 时间: 2015-5-5 22:37
回复 10# CrLf
谢谢巡查的帮助,我仔细看了,那个只有5个选项。所以取值1到5没什么问题。关键是这些BAT文件不是第一次用了。之前全部都是直接执行,然后弹出个确定完成的小对话框结束。而且不止这一个是这样,我把电脑里所有要在BAT文件里选择执行操作的BAT试了个遍,都是这样的情况。而且查毒了,没病毒。在安全模式下也是这种情况。之前除了电脑安装了一个SQL2000也没装其他东西。一周前还是可以正常运行了。我觉得估计是哪个注册列表出问题了。是CMD配置问题,跟文件语病应该没关系。直接执行的BAT文件和空白BAT文件不会弹出窗口。所以跟关联也没关系。我实在是搞不懂了。。。
作者: gawk 时间: 2015-5-5 22:59
回复 11# likai2b
我把电脑里所有要在BAT文件里选择执行操作的BAT试了个遍,都是这样的情况。
能否再找两个最简单的选择执行的BAT代码发出来看看
作者: CrLf 时间: 2015-5-5 23:02
回复 11# likai2b
我是说执行10楼第二段代码,看返回的数字判断问题出在哪一部分
作者: likai2b 时间: 2015-5-6 01:01
回复 12# gawk
最简单的基本没有,软件绿化哪有简单的。再来个这个:
@Echo Off
Set v=7.2.13.3884
Title 迅雷7JayXon绿色精简版安装卸载工具
Pushd %~dp0
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Set a="HKLM\SOFTWARE\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v&Set b=%SystemRoot%\SysWOW64) Else (Set a="HKLM\SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd" /v&Set b=%SystemRoot%\system32)
Rd "%b%\test_permission_JayXon" 2>nul
Md "%b%\test_permission_JayXon" 2>nul||(Echo 请使用右键管理员身份运行&&ause >nul&&Exit)
Rd "%b%\test_permission_JayXon" 2>nul
ver|Find "6." >nul&&If "%~d0"=="%SystemDrive%" (Set p=%PUBLIC%\Documents\Thunder Network\Thunder\Profiles) Else (Set p=Profiles)
SetLocal EnableDelayedExpansion
:Menu
Cls
If Exist "%b%\Tasklist.exe" Tasklist|Find /i "thunder.exe">nul&&(Echo 请先退出迅雷,按任意键重试&&Pause >nul&&Goto Menu)
If Not "%1"=="" (Set c=%1&Goto Goto)
Echo 1.全新安装
Echo 此模式直接将迅雷安装到当前文件夹,即一般的安装模式
Echo.
Echo 2.更新安装
Echo 此模式会自动检测系统中旧版迅雷的位置并将其卸载,然后将新版安装至旧版迅雷的位置,更新后会保留用户的设置、应用、皮肤等
Echo 如果之前使用的不是本人制作的迅雷版本,请勿使用此模式,无法保证能够正常安装
Echo.
Echo 3.创建桌面快捷方式
Echo.
Echo 4.删除Win7库中的迅雷下载
Echo.
Echo 5.将离线下载添加到左侧我的应用
Echo.
Echo 6.卸载
Echo.
Echo 7.退出
Echo.
Set /p c=请输入数字并按Enter确定:
:Goto
If Not "%c%"=="" Set c=%c:~0,1%
If "%c%"=="1" Goto SetupMenu
If "%c%"=="2" Goto Update
If "%c%"=="3" Goto lnk
If "%c%"=="4" Goto Libraries
If "%c%"=="5" Goto Offline
If "%c%"=="6" Goto Uninstall
If "%c%"=="7" Goto Exit
Goto Menu
:SetupMenu
Cls
If Not "%2"=="" (Set c=%2&Goto Goto2)
Echo 请选择需要安装的项目
Echo 1.BHO、IE右键菜单、专用链、屏蔽上传
Echo 2.BHO、IE右键菜单、屏蔽上传
Echo 3.BHO、专用链、屏蔽上传
Echo 4.BHO、屏蔽上传
Echo 5.仅屏蔽上传
Set /p c=请输入数字并按Enter确定:
:Goto2
If Not "%c%"=="" Set c=%c:~0,1%
If "%c%" LEQ "5" Goto Delete
Goto SetupMenu
:Update
For /f "skip=2 tokens=1,2 delims=:" %%i in ('Reg Query %a% "Path"') Do (Set f=%%i
Set g=%%~dpj
Set f=!f:~-1!!g:~1!)
If "%f%"=="" Goto Error
Set f=%f:"=%
Cd /d "%f%"||Goto Error
Cd ..\
Cls
If "%cd%\"=="%~dp0" (Echo 旧版迅雷与新版迅雷位置相同,请使用全新安装模式,按任意键返回主菜单&&Pause >nul&&Goto Menu)
Echo 将迅雷安装到%cd%
Pause
Goto Uninstall
:Error
Cls
Echo 未检测到迅雷位置,按任意键返回主菜单
Pause >nul
Goto Menu
:Copy
Rd /s /q "Addins\Community" >nul 2>nul
Rd /s /q "Addins\VipService" >nul 2>nul
Rd /s /q "BHO" >nul 2>nul
Rd /s /q "Program" >nul 2>nul
Rd /s /q "Xar" >nul 2>nul
Echo 正在复制文件...
XCopy /e /i /q /y "%~dp0Addins" "%cd%\Addins"
XCopy /e /i /q /y "%~dp0BHO" "%cd%\BHO"
XCopy /e /i /q /y "%~dp0Program" "%cd%\Program"
XCopy /e /i /q /y "%~dp0Skin" "%cd%\Skin"
XCopy /e /i /q /y "%~dp0Xar" "%cd%\Xar"
Copy /y "%~f0" "%cd%"
Call "%cd%\%~nx0" 1
Goto Exit
:BHO
For %%i In (Program\*71.dll) Do If Not Exist "%b%\%%~nxi" (Copy /y "%%i" "%b%\" 2>nul)
BHO\XLNonIESvr.exe -r 360 -silent -setfirst
BHO\XLNonIESvr.exe -r opera -silent -setfirst
BHO\XLNonIESvr.exe -r maxthon -silent -setfirst
BHO\XLNonIESvr.exe -r theworld -silent -setfirst
Regsvr32 /s BHO\ThunderAgent.dll
Regsvr32 /s BHO\XunLeiBHO.dll
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Regsvr32 /s BHO\ThunderAgent64.dll
Regsvr32 /s BHO\XunLeiBHO64.dll)
Reg Add %a% "Path" /d "%~dp0Program\Thunder.exe" /f
Reg Add %a% "dir" /d "%~dp0\" /f
Reg Add %a% "instdir" /d "%~dp0\" /f
Reg Add %a% "addinsdir" /d "%~dp0Addins" /f
Reg Add %a% "Version" /d "%v%" /f
If Not "%c%"=="2" If Not "%c%"=="4" Regsvr32 /s BHO\LinkSimulate.dll
If "%c%" GEQ "3" Goto **
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /ve /d "%~dp0BHO\geturl.htm" /f
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /ve /d "%~dp0BHO\getAllurl.htm" /f
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /v "Contexts" /t REG_DWORD /d "0x000000f3" /f
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /ve /d "%~dp0BHO\OfflineDownload.htm" /f
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f
:**
Md "%AllUsersProfile%\Application Data\Thunder Network\cid_store.dat"
Md "%AllUsersProfile%\Application Data\Thunder Network\emule_upload_list.dat"
Md "%AllUsersProfile%\Application Data\Thunder Network\DownloadLib\pub_store.dat"
Program\Thunder.exe -install -associate:all
Call "%~f0" 5
Set e=安装完成
ver|Find "6." >nul||Goto MsgBox
Md "%PUBLIC%\Thunder Network\cid_store.dat" 2>nul
Md "%PUBLIC%\Thunder Network\emule_upload_list.dat" 2>nul
If "%~d0"=="%SystemDrive%" (XCopy /e /i /q /y Addins "%ProgramData%\Thunder Network\Thunder\Addins" >nul 2>nul&XCopy /e /i /q /y Skin "%PUBLIC%\Documents\Thunder Network\Thunder\Skin" >nul 2>nul)
Goto MsgBox
:Uninstall
BHO\XLNonIESvr.exe -u opera -silent
BHO\XLNonIESvr.exe -u theworld -silent
Regsvr32 /s /u BHO\LinkSimulate.dll
Regsvr32 /s /u BHO\ThunderAgent.dll
Regsvr32 /s /u BHO\XunLeiBHO.dll
Regsvr32 /s /u BHO\ThunderAgent64.dll
Regsvr32 /s /u BHO\XunLeiBHO64.dll
If Exist "BHO\XlBrowserAddin.dll" Regsvr32 /s /u BHO\XlBrowserAddin.dll
If Exist "BHO\XlBrowserAddinKernel.dll" Regsvr32 /s /u BHO\XlBrowserAddinKernel.dll
If Exist "BHO\xlfxctrl.dll" Regsvr32 /s /u BHO\xlfxctrl.dll
If Exist "BHO\UserAgent.dll" Regsvr32 /s /u BHO\UserAgent.dll
Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
If "%c%"=="2" Goto Copy
For /f "skip=2 tokens=1,2 delims=:" %%i in ('Reg Query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Desktop') Do (Set d=%%i
Set d=!d:~-1!:%%j\)
Set d=%d:"=%
Del /f /q "%d:\\=\%迅雷7.lnk" 2>nul
elete
Reg Delete "HKCR\Software\thunder" /f >nul 2>nul
Reg Delete "HKLM\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKLM\Software\Wow6432Node\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /f >nul 2>nul
If Exist "%PUBLIC%" (Rd /s /q "%PUBLIC%\Thunder Network" >nul 2>nul
Rd /s /q "%PUBLIC%\Documents\Thunder Network\XLFX" >nul 2>nul)
Rd /s /q "%TMP%\LiveUD" >nul 2>nul
Rd /s /q "%TMP%\Thunder" >nul 2>nul
Rd /s /q "%TMP%\Thunder Network" >nul 2>nul
Rd /s /q "%TMP%\ThunderLiveUD" >nul 2>nul
Rd /s /q "%TMP%\xltmp" >nul 2>nul
Rd /s /q "%TMP%\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Thunder Network" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Thunder Network" >nul 2>nul
Rd /s /q "%AppData%\Thunder Network" >nul 2>nul
Rd /s /q "%CommonProgramFiles%\Thunder Network" >nul 2>nul
If Exist "%CommonProgramFiles(x86)%" Rd /s /q "%CommonProgramFiles(x86)%\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\AppData\LocalLow\XunLei" >nul 2>nul
Rd /q "%SystemDrive%\TDDOWNLOAD" >nul 2>nul
Rd /s /q "Data" >nul 2>nul
Rd /s /q "Skin\autoskin" >nul 2>nul
Rd /s /q "Skin\recommend" >nul 2>nul
Rd /s /q "%p%\..\Skin\autoskin" >nul 2>nul
Rd /s /q "%p%\..\Skin\recommend" >nul 2>nul
Rd /s /q "%p%\AppleAssistant" >nul 2>nul
Rd /s /q "%p%\icondir" >nul 2>nul
Rd /s /q "%p%\Community\VipAssistant" >nul 2>nul
Rd /s /q "%p%\Community\XMLPaint" >nul 2>nul
Rd /s /q "%p%\MsgSys" >nul 2>nul
Rd /s /q "%p%\platform" >nul 2>nul
Rd /s /q "%p%\pluginpanel" >nul 2>nul
Rd /s /q "%p%\ReportConfig" >nul 2>nul
Rd /s /q "%p%\SkinRecommendIcon" >nul 2>nul
Rd /s /q "%p%\tabres" >nul 2>nul
Rd /s /q "%p%\ThunderAddin" >nul 2>nul
Rd /s /q "%p%\ThunderNavigator" >nul 2>nul
Rd /s /q "%p%\VipService\Scene" >nul 2>nul
Rd /s /q "%p%\XLDaQuan" >nul 2>nul
Rd /s /q "Addins\HideTaskInfoAddin" >nul 2>nul
Rd /s /q "Addins\Update" >nul 2>nul
If Exist "%ProgramData%" (Rd /s /q "%ProgramData%\Thunder Network\Thunder\Addins\Community" >nul 2>nul
Rd /s /q "%ProgramData%\Thunder Network\Thunder\Addins\HideTaskInfoAddin" >nul 2>nul
Rd /s /q "%ProgramData%\Thunder Network\Thunder\Addins\VipService" >nul 2>nul
Del /f /q "%ProgramData%\Thunder Network\Thunder\Addins\addins*.*" >nul 2>nul)
Del /f /q "Addins\addins*.*" >nul 2>nul
Del /f /q "%p%\Community\*.png" >nul 2>nul
Del /f /q "%p%\Community\*.xml" >nul 2>nul
Del /f /q "%p%\Community\welcome.jpg" >nul 2>nul
Del /f /q "%p%\P2pShare\linkdata.xml" >nul 2>nul
Del /f /q "%p%\P2pShare\thumb*.png" >nul 2>nul
Del /f /q "BHO\*.?.?.*.dll" >nul 2>nul
If "%c%" LEQ "4" Goto BHO
If "%c%"=="5" Goto **
Set e=卸载完成
Goto MsgBox
ibraries
Del /f /q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" 2>nul
If Exist "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" (Set e=删除失败) Else (Set e=删除完成)
Goto MsgBox
:Offline
Md "%p%\Download" 2>nul
Copy /y "Program\Download" "%p%\Download" >nul 2>nul
If Exist "%p%\Download\Download" (Set e=添加完成) Else (Set e=添加失败)
Goto MsgBox
:lnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\迅雷7.lnk""):b.TargetPath=""%~dp0Program\Thunder.exe"":b.WorkingDirectory=""%~dp0Program\"":b.Save:close")
Set e=创建快捷方式完成
:MsgBox
If Not "%1"=="" If Not "%1"=="1" Goto Exit
If "%2"=="" mshta VBScript:Msgbox("%e%",vbSystemModal,"")(close)
:Exit
Popd
作者: likai2b 时间: 2015-5-6 01:03
回复 12# gawk
和代码没一点关系,之前运行没有问题。大家别纠结代码了。
作者: gawk 时间: 2015-5-6 08:42
回复 15# likai2b
我只是想知道什么叫做“选择执行操作的BAT”,这样容易找到问题的线索。你不想纠结代码,那就祝你好运吧。
作者: likai2b 时间: 2015-5-6 10:27
回复 16# gawk
从我给的1楼的第二个图片可以明显看出,这些BAT文件进去后一般给几个选项,你通过恢复数字编码选择执行代码
作者: gawk 时间: 2015-5-6 10:36
- @echo off
- REM 这个代码的目的是要说明:弹白框跟“选择执行”没有一毛钱关系,必须看具体代码才能找到问题原因
-
- :Menu
- echo 1.创建桌面QQ
- echo 2.显示新移动设备终端图标[自选]
- echo 3.显示老移动设备终端图标[默认]
- echo 4.关联网页会话协议,表情包,Q音乐收听[自选]
- echo 5.禁用网页会话协议,表情包,Q音乐收听[默认]
- echo.&echo.
- set /p a=输入数字回车:
- if "%a%"=="1" Goto DesktopLnk
- if "%a%"=="2" Goto NewClientType
- if "%a%"=="3" Goto OldClientType
- if "%a%"=="4" Goto AssocProtocol
- if "%a%"=="5" Goto CancelProtocol
-
- :DesktopLnk
- echo 欢迎来到 创建桌面QQ
- goto :end
-
- :NewClientType
- echo 欢迎来到 显示新移动设备终端图标[自选]
- goto :end
-
- :OldClientType
- echo 欢迎来到 显示老移动设备终端图标[默认]
- goto :end
-
- :AssocProtocol
- echo 欢迎来到 关联网页会话协议,表情包,Q音乐收听[自选]
- goto :end
-
- :CancelProtocol
- echo 欢迎来到 禁用网页会话协议,表情包,Q音乐收听[默认]
- goto :end
-
- :end
- pause
复制代码
作者: apang 时间: 2015-5-6 11:25
不用 mshta 还有没有白框?- :DesktopLnk
- >$.vbs echo,Set a=CreateObject("WScript.Shell"):Set b=a.CreateShortcut(a.SpecialFolders("Desktop") ^& "\QQ7.1.lnk"):b.TargetPath="%~dp0Bin\QQ.exe":b.WorkingDirectory="%~dp0Bin":b.Save
- cscript -nologo $.vbs & SET E=完成&GOTO MSGBOX
- :MsgBox
- >$.vbs echo,MsgBox "%e%",vbSystemModal,""
- if "%~1" == "" cscript -nologo $.vbs
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |