Advertisement
Guest User

Untitled

a guest
Oct 30th, 2017
1,086
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. If WScript.Arguments.Count < 1 Then WScript.Quit
  2. '----------------------------------------------------------------------
  3. Set objFSO = CreateObject("Scripting.FileSystemObject")
  4. objFile = WScript.Arguments.Item(0)
  5. sKey1 = "HKCU\SOFTWARE\Classes\*\shell\{:}\\"
  6. sKey2 = Replace(sKey1, "\\", "\ExplorerCommandHandler")
  7. '----------------------------------------------------------------------
  8. With WScript.CreateObject("WScript.Shell")
  9. KeyValue = WScript.CreateObject("WScript.Shell").RegRead( _
  10. "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" & _
  11. "\CommandStore\shell\Windows.taskbarpin\ExplorerCommandHandler")
  12.  
  13. .RegWrite sKey2, KeyValue, "REG_SZ"
  14.  
  15. With WScript.CreateObject("Shell.Application")
  16. With .Namespace(objFSO.GetParentFolderName(objFile))
  17. .ParseName(objFSO.GetFileName(objFile)).InvokeVerb("{:}")
  18. End With
  19. End With
  20.  
  21. .Run("Reg.exe delete """ & Replace(sKey1, "\\", "") & """ /F"), 0, True
  22. End With
  23. '----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement