找回密码
 加入
搜索
查看: 3387|回复: 10

[AU3基础] [已解决]求助,批处理转换成AU代码!(感谢:cfanpc)

  [复制链接]
发表于 2016-8-21 21:08:01 | 显示全部楼层 |阅读模式
本帖最后由 fybhwsx 于 2016-8-29 10:00 编辑

这是一个百度云的绿化批处理,我想转换成直接执行1~4的AU3代码!或者把卸载代码和选择代码删除,改成直接执行1~4的批处理。哦,还不知道AU怎么以管理员身份运行批处理?
@ECHO OFF&PUSHD %~DP0 &TITLE 绿化和卸载
mode con cols=40 lines=20
color A
Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&Pause >nul&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
:Menu
Cls
@ echo.
@ echo.      菜 单 选 项
@ echo.
@ echo.     绿化[必须] → 请输入1
@ echo.
@ echo.     创建桌面图标 → 请输入2
@ echo.
@ echo.     注册浏览器加速下载 → 请输入3
@ echo.
@ echo.     注册右键上传备份 → 请输入4
@ echo.
@ echo.     卸载 → 请输入5
@ echo.
set /p xj=     输入数字按回车:
if /i "%xj%"=="1" Goto Install
if /i "%xj%"=="2" Goto Establish
if /i "%xj%"=="3" Goto Addjs
if /i "%xj%"=="4" Goto Backup
if /i "%xj%"=="5" Goto Uninstall
@ echo.
echo      选择无效,请重新输入
ping -n 2 127.1>nul 
goto menu
:Install
@ echo.
ECHO    正在安装中..请稍等..
taskkill /f /im BaiduYunGuanjia.exe>NUL 2>NUL
del /f AppSettingApp.dat  >NUL 2>NUL
rd/s/q "%tmp%\bdyunguanjiaskinres" 2>NUL
rd/s/q "%AppData%\BaiduYunGuanjia" 2>NUL
rd/s/q "%AppData%\Baidu\BaiduYunGuanjia"2>NUL
regsvr32 /s npYunWebDetect.dll
reg delete "HKCU\Software\Baidu\BaiduYunGuanjia" /f >NUL 2>NUL
reg delete "HKCR\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
goto Install2
:Establish
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\百度云管家.lnk""):b.TargetPath=""%~dp0BaiduYunGuanjia.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
goto fanhui
:Addjs
regsvr32 /s npYunWebDetect.dll
goto fanhui
:Backup
@ echo.
echo    正在注册中..请稍等..
if exist "%WinDir%\SysWOW64" regsvr32 /s YunShellExt64.dll
if not exist "%WinDir%\SysWOW64" regsvr32 /s YunShellExt.dll
goto fanhui
:Uninstall
@ echo.
echo    正在卸载中..请稍等.
taskkill /f /im BaiduYunGuanjia*>NUL 2>NUL
regsvr32 /s /u YunShellExt.dll
regsvr32 /s /u npYunWebDetect.dll
del /f AppSettingApp.dat  >NUL 2>NUL
del /f CompleteTaskRecodFile >NUL 2>NUL
rd/s/q "%tmp%\bdyunguanjiaskinres" 2>NUL
rd/s/q "%AppData%\BaiduYunGuanjia" 2>NUL
rd/s/q "%AppData%\BaiduYunKernel" 2>NUL
rd/s/q "%AppData%\Baidu\BaiduYunGuanjia"2>NUL
if exist "%WinDir%\SysWOW64" regsvr32 /s /u YunShellExt64.dll
reg delete "HKCU\Software\Baidu\BaiduYunGuanjia" /f >NUL 2>NUL
reg delete "HKCR\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}" /f>NUL 2>NUL
goto Uninstall2
:fanhui
@ ECHO.
ECHO    设置完成..
ping -n 2 127.8>nul
goto menu
:Install2
@ ECHO.
ECHO    安装完成..
ping -n 2 127.8>nul
goto menu
:Uninstall2
@ ECHO.
ECHO    卸载完成..
ping -n 2 127.8>nul
goto menu
 楼主| 发表于 2016-8-27 07:05:31 | 显示全部楼层
什么情况啊,论坛这几天都打不开?
发表于 2016-8-27 08:15:27 | 显示全部楼层
编译选项的第二个标签,有一个请求执行等级 可以选择管理员权限运行
#PRE_Res_requestedExecutionLevel=requireAdministrator
发表于 2016-8-27 09:09:45 | 显示全部楼层
我也来看了,打不开论坛
发表于 2016-8-27 09:10:09 | 显示全部楼层
我也来看了,打不开论坛
 楼主| 发表于 2016-8-27 16:53:08 | 显示全部楼层
编译选项的第二个标签,有一个请求执行等级 可以选择管理员权限运行
#PRE_Res_requestedExecutionLevel=re ...
xiezhuoyi 发表于 2016-8-27 08:15



    谢谢,有学一招。但我还是想改成AU代码直接执行1~4步骤,大侠们出手啊,感谢!
发表于 2016-8-27 22:31:04 | 显示全部楼层
回复 1# fybhwsx
发表于 2016-8-28 18:53:28 | 显示全部楼层
#NoTrayIcon
$check="BaiduYunGuanjia.exe"
If  Not FileExists(@ScriptDir&$check) Then 
        MsgBox(16,"温馨提示","当前目录没有检测到百度云主程序,程序即将退出!")
        Exit
EndIf
$bdpid="BaiduYunGuanjia.exe"
If ProcessExists($bdpid) Then 
        ProcessClose($bdpid)
endif
If FileExists(@ScriptDir&"\AppSettingApp.dat") Then 
        FileDelete(@ScriptDir&"\AppSettingApp.dat")
        DirCreate(@TempDir&"\bdyunguanjiaskinres")
        DirCreate(@AppDataDir&"\BaiduYunGuanjia")
        DirCreate(@AppDataDir&"\Baidu\BaiduYunGuanjia")
EndIf
Run(@ComSpec & " /c " & 'regsvr32 /s npYunWebDetect.dll', "", @SW_HIDE);注册DLL
RegDelete("HKCU\Software\Baidu\BaiduYunGuanjia")
RegDelete("HKCR\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
RegDelete("HKCU\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
RegDelete("HKLM\SOFTWARE\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64")
RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
RegDelete("HKLM\SOFTWARE\Wow6432Node\Classes\CLSID\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
RegDelete("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{679F137C-3162-45da-BE3C-2F9C3D093F64}")
剩下的你自己写 没时间写
 楼主| 发表于 2016-8-29 08:38:42 | 显示全部楼层
回复 9# cfanpc


    谢谢!谢谢!这就够了,等我完成后续再来改标题。。。。
发表于 2016-8-29 08:46:14 | 显示全部楼层
不错,学习了!
 楼主| 发表于 2016-8-29 11:44:04 | 显示全部楼层
把百度云管家分享给大家,据说是不限速!!有需要的下吧:
链接: http://pan.baidu.com/s/1jI0Nyei 密码: 56mk
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-22 15:31 , Processed in 0.089792 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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