-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.ps1
More file actions
45 lines (38 loc) · 1.45 KB
/
Copy pathsetup.ps1
File metadata and controls
45 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copies required debugger dll's from Windows SDK install directory.
$ScriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$DebugToolsDir = "${env:ProgramFiles(x86)}\Windows Kits\10\Debuggers\x64"
if (!(Test-Path -Path $DebugToolsDir)) {
Write-Output "Failed to locate Windows debugging tools installation ($DebugToolsDir)"
Write-Output "See here for more information: https://github.com/iilegacyyii/gdbw/wiki/Guide:-Installing-gdbw#guide-installing-gdbw"
return
}
Write-Output "[-] Copying required dlls.."
# dbgcore.dll
if (Test-Path -Path "$DebugToolsDir\dbgcore.dll") {
Copy-Item "$DebugToolsDir\dbgcore.dll" "$ScriptPath\dbgcore.dll"
} else {
Write-Output "Failed to locate dbgcore.dll ($DebugToolsDir\dbgcore.dll)"
return
}
# dbgeng.dll
if (Test-Path -Path "$DebugToolsDir\dbgeng.dll") {
Copy-Item "$DebugToolsDir\dbgeng.dll" "$ScriptPath\dbgeng.dll"
} else {
Write-Output "Failed to locate dbgeng.dll ($DebugToolsDir\dbgeng.dll)"
return
}
# dbghelp.dll
if (Test-Path -Path "$DebugToolsDir\dbghelp.dll") {
Copy-Item "$DebugToolsDir\dbghelp.dll" "$ScriptPath\dbghelp.dll"
} else {
Write-Output "Failed to locate dbghelp.dll ($DebugToolsDir\dbghelp.dll)"
return
}
# symsrv.dll
if (Test-Path -Path "$DebugToolsDir\symsrv.dll") {
Copy-Item "$DebugToolsDir\symsrv.dll" "$ScriptPath\symsrv.dll"
} else {
Write-Output "Failed to locate symsrv.dll ($DebugToolsDir\symsrv.dll)"
return
}
Write-Output "[+] Done!"