-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
405 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.lnk | ||
.pdb | ||
.locked | ||
.vshost.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Const CSIDL_COMMON_PROGRAMS = &H17 | ||
Const CSIDL_PROGRAMS = &H2 | ||
|
||
Set args = WScript.Arguments | ||
verbCommand = args.Item(0) | ||
lnkFolder = args.Item(1) | ||
lnkFilename = args.Item(2) | ||
|
||
verbPinStart = | ||
|
||
' Default | ||
' shell32.dll | ||
' 5381 - Pin to Start Men&u | ||
' 5382 - Unpin from Start Men&u | ||
' 5386 - Pin to Tas&kbar | ||
' 5387 - Unpin from Tas&kbar | ||
|
||
verbName = "Pin to Taskbar" | ||
If verbCommand = "/pinStart" Then verbName = "Pin to Start Menu" | ||
If verbCommand = "/pinTaskbar" Then verbName = "Pin to Taskbar" | ||
If verbCommand = "/unpin" AND InStr(lnkFolder, "StartMenu") > 0 Then verbName = "Unpin from Start Menu" | ||
If verbCommand = "/unpin" AND InStr(lnkFolder, "TaskBar") > 0 Then verbName = "Unpin from Taskbar" | ||
|
||
WScript.Echo lnkFolder & " | " & lnkFilename & " | " & verbName & " || " | ||
|
||
Set objShell = CreateObject("Shell.Application") | ||
Set objFolder = objShell.Namespace(lnkFolder) | ||
Set objFolderItem = objFolder.ParseName(lnkFilename) | ||
Set colVerbs = objFolderItem.Verbs | ||
For Each objVerb in colVerbs | ||
If Replace(objVerb.name, "&", "") = verbName Then objVerb.DoIt | ||
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.