Created
July 28, 2019 11:22
-
-
Save UCyborg/1a26de2a49bbc247f8c54edd6aef5528 to your computer and use it in GitHub Desktop.
Downloads debug symbols required by Aero Glass if it doesn't have the latest information about internal DWM functions.
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
Const WindowsFolder = 0 | |
Const SystemFolder = 1 | |
Const TempFolder = 2 | |
Dim objShell, regPath | |
Set objShell = WScript.CreateObject("WScript.Shell") | |
regPath = Array("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot10",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot10",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot81",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot81",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot8",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\WindowsDebuggersRoot8",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{277BA0F1-D0BB-4D73-A2DF-6B60C91E1533}_is1\InstallLocation",_ | |
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aero Glass for Win8.1+_is1\InstallLocation") | |
Dim num, dbgPath | |
num = 0 | |
On Error Resume Next | |
Do While (num < 6) | |
dbgPath = objShell.RegRead(regPath(num)) | |
If Not IsEmpty(dbgPath) Then | |
Exit Do | |
Else | |
dbgPath = objShell.RegRead(regPath(num + 1)) | |
If Not IsEmpty(dbgPath) Then | |
Exit Do | |
End If | |
End If | |
num = num + 2 | |
Loop | |
On Error GoTo 0 | |
If IsEmpty(dbgPath) Then | |
MsgBox "Path to Debugging Tools not found.", 16, "Error" | |
WScript.Quit 0 | |
End If | |
Dim strArch | |
If objShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") = "AMD64" Then | |
strArch = "x64" | |
Else | |
strArch = "x86" | |
End If | |
Dim objFSO | |
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
If Not objFSO.FileExists(dbgPath & strArch & "\symchk.exe") Then | |
MsgBox "symchk.exe not found.", 16, "Error" | |
WScript.Quit 0 | |
End If | |
Dim AGPath | |
On Error Resume Next | |
AGPath = objShell.RegRead(regPath(6)) | |
If IsEmpty(AGPath) Then | |
AGPath = objShell.RegRead(regPath(7)) | |
End If | |
If IsEmpty(AGPath) Then | |
Dim objApp, objFolder | |
Set objApp = CreateObject("Shell.Application") | |
Set objFolder = objApp.BrowseForFolder(0, "Please select AeroGlass installation folder.", 513, 17) | |
If Not (objFolder Is Nothing) Then | |
AGPath = objFolder.Self.path & "\" | |
Else | |
WScript.Quit 0 | |
End If | |
End If | |
On Error GoTo 0 | |
Dim tempPath, systemPath | |
tempPath = objFSO.GetSpecialFolder(TempFolder) & "\DWMDlls" | |
On Error Resume Next | |
objFSO.CreateFolder tempPath | |
systemPath = objFSO.GetSpecialFolder(SystemFolder) | |
objFSO.CopyFile systemPath & "\ApplicationFrame.dll", tempPath & "\" | |
On Error GoTo 0 | |
objFSO.CopyFile systemPath & "\dwmcore.dll", tempPath & "\" | |
objFSO.CopyFile systemPath & "\uDWM.dll", tempPath & "\" | |
objShell.Run """" & dbgPath & strArch & "\symchk.exe"_ | |
& """" & " " & """" & tempPath & """"_ | |
& " /s SRV*" & """" & AGPath & "symbols\" & "*http://msdl.microsoft.com/download/symbols" & """", 1, True | |
objFSO.DeleteFolder tempPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I keep getting "Path of debugging tools not found"!! Please help!