From 33a20fe97dfc8727a0a458b276b96b80bdaff222 Mon Sep 17 00:00:00 2001 From: Wesley Couch Date: Sun, 2 Oct 2016 12:27:42 -0400 Subject: [PATCH] Allow powershell script to be ran from any location and update to powershell copy method Adding in $PSScriptRoot allows this powershell script to be ran from anywhere. Before if you were not in the openssh directory in powershell it wouldn't be able to find ssh-lsa.dll Also switched the copy method to the powershell method of copying files. --- contrib/win32/openssh/install-sshlsa.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/win32/openssh/install-sshlsa.ps1 b/contrib/win32/openssh/install-sshlsa.ps1 index 887dd2c..76a4087 100644 --- a/contrib/win32/openssh/install-sshlsa.ps1 +++ b/contrib/win32/openssh/install-sshlsa.ps1 @@ -1,4 +1,4 @@ -copy .\ssh-lsa.dll $env:windir\system32 +Copy-Item -Path $PSScriptRoot\ssh-lsa.dll -Destination "$env:windir\system32" $subkey = 'SYSTEM\CurrentControlSet\Control\Lsa' $value = 'Authentication Packages' $reg = [Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', 0)