找回密码
 加入
搜索
查看: 3114|回复: 8

[AU3基础] 在Win7下,如何将任务栏上的程序快捷方式删除

  [复制链接]
发表于 2012-6-27 23:41:01 | 显示全部楼层 |阅读模式
本帖最后由 antony410 于 2012-6-29 08:55 编辑

我不想用鼠标点击"将此程序从任务栏解锁".
win7 左下角有某个快捷方式,如QQ,我想把它删除。用au3如何写?
发表于 2012-6-29 02:03:10 | 显示全部楼层
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.8.1
Author:         myName

Script Function:
        Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Notrayicon
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("tangyi-Tool", 165, 165, -1, -1)
GUISetBkColor(0x808080)
$Button1 = GUICtrlCreateButton("Xp去除桌面小箭头", 16, 8, 137, 25, $WS_GROUP)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Win7清除任务栏多余图标", 16, 40, 137, 25, $WS_GROUP)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("解决安装SQL挂起问题", 16, 72, 137, 25, $WS_GROUP)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetCursor (-1, 0)
$Button4 = GUICtrlCreateButton("解决office错误报告", 16, 104, 137, 25, $WS_GROUP)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetCursor (-1, 0)
$Label1 = GUICtrlCreateLabel("如有疑问请联系QQ:78398983", 8, 144, 155, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

                Case $Button1
                   RegDelete("HKEY_CLASSES_ROOT\lnkfile","IsShortcut")
                   ProcessClose("explorer.exe")
                   run("explorer.exe",@SW_HIDE)
                   Sleep("2000")
                   MsgBox(0,"提示","恭喜您除去成功")
                  
                Case $Button2
                   RegWrite("HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify","IconStreams","REG_binary","0")
                   RegWrite("HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify","PastIconsStream","REG_binary","0")
                   ProcessClose("explorer.exe")
                   run("explorer.exe",@SW_HIDE)
                   Sleep("2000")
                   MsgBox(0,"提示","恭喜您清除成功")
                Case $Button3
                   RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager","PendingFileRenameOperations")
                   MsgBox(0,"提示","恭喜您修复成功")

                Case $Button4
                   DirRemove ("C:\Documents and Settings\Administrator\Application Data\Microsoft\Templates" )
                   MsgBox(0,"提示","恭喜您修复成功")
        EndSwitch
WEnd
发表于 2012-6-29 02:16:33 | 显示全部楼层
回复 2# tangyi90
这好像不是lz的问题吧,貌似更像是清除通知栏图标记录
 楼主| 发表于 2012-6-29 08:58:08 | 显示全部楼层
回复 2# tangyi90

我是想删除左下角任务栏某个程序的快捷方式,如QQ,用简洁语句如何实现,不想要GUI界面的。
发表于 2012-6-29 10:34:26 | 显示全部楼层
上MSDN查找有关注册表信息
发表于 2012-6-29 11:05:40 | 显示全部楼层
回复 4# antony410
filedelete就行了,忘了那个文件夹名称了,好像是quicklanch,用户配置文件夹里搜搜
 楼主| 发表于 2012-6-29 12:13:04 | 显示全部楼层
回复 6# netegg

我用filedelete删除user文件夹下Quick Launch的qq.lnk,但左下角还是有残留的图标,点击会提示"无法打开此项目,可能已移动,重命名或......"
可能与注册表有关,一清除注册表就全部清理掉左下角的图标了。不能清除指定的那一个*.lnk.比较头晕。
发表于 2012-6-29 12:48:14 | 显示全部楼层
找个监控软件,监控状态下手动删除一次,然后看下改了哪些地方,再转换成代码
发表于 2012-6-29 13:57:13 | 显示全部楼层
本帖最后由 netegg 于 2012-6-29 13:59 编辑

回复 7# antony410
还有几个cache文件(图标缓存文件,印象里是四个,忘了地方了),删完了重启才能生效
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-20 12:11 , Processed in 0.080083 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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