Skip to content

Commit 332e00e

Browse files
committed
Update Get-ProcessTree.ps1
1 parent 404fbf6 commit 332e00e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Scripts/Get-ProcessTree/Get-ProcessTree.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<#
1+
<#
22
.SYNOPSIS
33
Shows a process history tree with data extracted from a MemProcFS-Analyzer process overview CSV
44
.EXAMPLE
@@ -7,8 +7,9 @@
77
.AUTHOR
88
Dominik Schmidt @ https://github.com/DaFuqs
99
.VERSION
10-
1.4
10+
1.5
1111
.VERSION_HISTORY
12+
1.5: - Load PresentationCore if env does not load it automatically
1213
1.4: - Nodes to not expand / subtract on double click anymore. This action is already used for opening the properties window
1314
1.3: - Use a compiled version of DamerauLevenshteinDistance for increased performance
1415
- Orphaned processes get that listed in the "Suspicious" tag
@@ -144,12 +145,11 @@ Param (
144145
[switch] $NoSuspiciousChecks
145146
)
146147

147-
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
148-
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
149-
[void][System.Reflection.Assembly]::LoadWithPartialName("PresentationFramework")
150-
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
151-
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows")
152-
148+
Add-Type -AssemblyName "System.Windows"
149+
Add-Type -AssemblyName "System.Windows.Forms"
150+
Add-Type -AssemblyName "System.Drawing"
151+
Add-Type -AssemblyName "PresentationFramework"
152+
Add-Type -AssemblyName "PresentationCore"
153153

154154
# querying the entries of the csv file
155155
$csvEntries = @(Import-CSV -Path $CSVPath -Delimiter "`t")

0 commit comments

Comments
 (0)