如果是锁定到任务栏,你要用代码处理,用代码把exe锁定到任务栏。
http://foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=46572&skin=0
下面是win8系统的方法:
全局代码
Public Function LockApp(isLock As Boolean, appPath As String) As Boolean
Dim shell As New Shell32.Shell()
Dim folder As Shell32.Folder = shell.[NameSpace](System.IO.Path.GetDirectoryName(appPath))
Dim app As Shell32.FolderItem = folder.ParseName(System.IO.Path.GetFileName(appPath))
Dim sVerb As String = iif(isLock, "固定到任务栏(&K)", "从任务栏取消固定(&K)")
For Each Fib As Shell32.FolderItemVerb In app.Verbs()
msgbox(fib.name)
If Fib.Name = sVerb Then
Fib.DoIt()
Return True
End If
Next
Return False
End Function
调用代码参考
LockApp(true, "C:\Windows\notepad.exe")