Guest User

Untitled

a guest
Jun 22nd, 2016
1,164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Remove Edge from Taskbar
  2. 'Version 1.0
  3. 'Based on the work by Jörgen Nilsson at http://ccmexec.com/2015/12/removing-the-edge-icon-from-the-taskbar-during-osd/
  4. 'Save contents as a .vbs file in folder C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  5.  
  6.  
  7. On Error Resume Next
  8.  
  9. Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
  10. Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
  11. Set objShell = CreateObject ("WScript.Shell")
  12. Set objFSO = CreateObject("Scripting.FileSystemObject")
  13.  
  14. Const HKEY_CURRENT_USER   = &H80000001
  15.  
  16. 'Set registry entries
  17. FavoritesResolve = "0e,03,00,00,4c,00,00,00,01,14,02,00,00,00,00,00,c0,00," & _
  18.  "00,00,00,00,00,46,83,00,80,00,20,00,00,00,dd,48,5f,09,32,20,d1,01,dd,48,5f," & _
  19.  "09,32,20,d1,01,7f,9c,f4,9b,ff,ba,d0,01,97,01,00,00,00,00,00,00,01,00,00,00," & _
  20.  "00,00,00,00,00,00,00,00,00,00,00,00,6c,01,3a,00,1f,80,c8,27,34,1f,10,5c,10," & _
  21.  "42,aa,03,2e,e4,52,87,d6,68,26,00,01,00,25,00,ef,be,12,00,00,00,92,4f,da,02," & _
  22.  "32,20,d1,01,89,e6,5c,09,32,20,d1,01,89,e6,5c,09,32,20,d1,01,14,00,56,00,31," & _
  23.  "00,00,00,00,00,70,47,b7,2d,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00," & _
  24.  "ef,be,70,47,b7,2d,70,47,b7,2d,2e,00,00,00,2b,6e,01,00,00,00,01,00,00,00,00," & _
  25.  "00,00,00,00,00,00,00,00,00,00,00,bd,75,b2,00,54,00,61,00,73,00,6b,00,42,00," & _
  26.  "61,00,72,00,00,00,16,00,da,00,32,00,97,01,00,00,ea,46,0a,58,20,00,46,49,4c," & _
  27.  "45,45,58,7e,31,2e,4c,4e,4b,00,00,7c,00,09,00,04,00,ef,be,70,47,b7,2d,70,47," & _
  28.  "b7,2d,2e,00,00,00,2c,6e,01,00,00,00,01,00,00,00,00,00,00,00,00,00,52,00,00," & _
  29.  "00,00,00,81,9d,9d,00,46,00,69,00,6c,00,65,00,20,00,45,00,78,00,70,00,6c,00," & _
  30.  "6f,00,72,00,65,00,72,00,2e,00,6c,00,6e,00,6b,00,00,00,40,00,73,00,68,00,65," & _
  31.  "00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,32,00," & _
  32.  "30,00,36,00,37,00,00,00,1c,00,42,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63," & _
  33.  "00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,57,00,69,00,6e,00,64,00,6f,00," & _
  34.  "77,00,73,00,2e,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,00,00,1c," & _
  35.  "00,00,00,ab,00,00,00,1c,00,00,00,01,00,00,00,1c,00,00,00,34,00,00,00,00,00," & _
  36.  "00,00,aa,00,00,00,18,00,00,00,03,00,00,00,88,dd,e5,82,10,00,00,00,57,69,6e," & _
  37.  "64,6f,77,73,00,43,3a,5c,55,73,65,72,73,5c,61,64,6d,69,6e,69,73,74,72,61,74," & _
  38.  "6f,72,5c,41,70,70,44,61,74,61,5c,52,6f,61,6d,69,6e,67,5c,4d,69,63,72,6f,73," & _
  39.  "6f,66,74,5c,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69," & _
  40.  "63,6b,20,4c,61,75,6e,63,68,5c,55,73,65,72,20,50,69,6e,6e,65,64,5c,54,61,73," & _
  41.  "6b,42,61,72,5c,46,69,6c,65,20,45,78,70,6c,6f,72,65,72,2e,6c,6e,6b,00,00,60," & _
  42.  "00,00,00,03,00,00,a0,58,00,00,00,00,00,00,00,65,6b,30,30,30,30,32,00,00,00," & _
  43.  "00,00,00,00,00,00,26,5e,56,48,01,d3,cc,45,99,8f,94,d6,c9,2c,43,da,46,33,00," & _
  44.  "2f,25,8c,e5,11,9b,c7,00,15,5d,c3,ed,2e,26,5e,56,48,01,d3,cc,45,99,8f,94,d6," & _
  45.  "c9,2c,43,da,46,33,00,2f,25,8c,e5,11,9b,c7,00,15,5d,c3,ed,2e,45,00,00,00,09," & _
  46.  "00,00,a0,39,00,00,00,31,53,50,53,b1,16,6d,44,ad,8d,70,48,a7,48,40,2e,a4,3d," & _
  47.  "78,8c,1d,00,00,00,68,00,00,00,00,48,00,00,00,76,4e,b8,49,00,00,00,00,00,00," & _
  48.  "f0,15,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"
  49. objRegistry.SetBinaryValue HKEY_CURRENT_USER ,  "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband", "FavoritesResolve", DecimalNumbers(FavoritesResolve)
  50.  
  51. Favorites = "00,6c,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4," & _
  52.  "52,87,d6,68,26,00,01,00,25,00,ef,be,12,00,00,00,92,4f,da,02,32,20,d1,01,89," & _
  53.  "e6,5c,09,32,20,d1,01,89,e6,5c,09,32,20,d1,01,14,00,56,00,31,00,00,00,00,00," & _
  54.  "70,47,b7,2d,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,70,47,b7," & _
  55.  "2d,70,47,b7,2d,2e,00,00,00,2b,6e,01,00,00,00,01,00,00,00,00,00,00,00,00,00," & _
  56.  "00,00,00,00,00,00,bd,75,b2,00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00," & _
  57.  "00,16,00,da,00,32,00,97,01,00,00,ea,46,0a,58,20,00,46,49,4c,45,45,58,7e,31," & _
  58.  "2e,4c,4e,4b,00,00,7c,00,09,00,04,00,ef,be,70,47,b7,2d,70,47,b7,2d,2e,00,00," & _
  59.  "00,2c,6e,01,00,00,00,01,00,00,00,00,00,00,00,00,00,52,00,00,00,00,00,81,9d," & _
  60.  "9d,00,46,00,69,00,6c,00,65,00,20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65," & _
  61.  "00,72,00,2e,00,6c,00,6e,00,6b,00,00,00,40,00,73,00,68,00,65,00,6c,00,6c,00," & _
  62.  "33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,32,00,30,00,36,00,37," & _
  63.  "00,00,00,1c,00,42,00,00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00," & _
  64.  "73,00,6f,00,66,00,74,00,2e,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,2e," & _
  65.  "00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,00,00,1c,00,00,00,ff"
  66.  objRegistry.SetBinaryValue HKEY_CURRENT_USER ,  "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband", "Favorites", DecimalNumbers(Favorites)
  67.  
  68.  objShell.RegWrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband\FavoritesChanges","10", "REG_DWORD"
  69.  objShell.RegWrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband\FavoritesVersion","2", "REG_DWORD"
  70.  objShell.RegWrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband\FavoritesRemovedChanges","1", "REG_DWORD"
  71.  
  72.  'Restart Explorer
  73. Set colProcess = objWMIService.ExecQuery _
  74. ("Select * from Win32_Process Where Name = 'explorer.exe'")
  75. For Each objProcess in colProcess
  76.     objProcess.Terminate()
  77. Next
  78.  
  79. 'Delete Script
  80. objFSO.DeleteFile(Wscript.ScriptFullName)
  81.  
  82.  
  83. 'Function to convert hex string into binary
  84. Function DecimalNumbers(arrHex)
  85.    arrHexValues = Split(Replace(arrHex, "hex:", ""), ",")
  86.    Dim i, strDecValues
  87.    For i = 0 to Ubound(arrHexValues)
  88.      If isEmpty(strDecValues) Then
  89.        strDecValues = CLng("&H" & arrHexValues(i))
  90.      Else
  91.        strDecValues = strDecValues & "," & CLng("&H" & arrHexValues(i))
  92.      End If
  93.    next
  94.    DecimalNumbers = split(strDecValues, ",")
  95. End Function
RAW Paste Data