# powershell script
# 새로 만들 때
New-Item -Path "HKCU:\SOFTWARE\Microsoft\IME\15.0\IMEKR" -Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\IME\15.0\IMEKR" -Name "InputMethod" -Value "1" -PropertyType Dword
# 이미 "InputMethod" 키가 존재할 때
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\IME\15.0\IMEKR" -Name "InputMethod" -Value "1"
# 레지스트리가 없으면 만들고 있으면 바로 설정하는 powershell script
$regPath = "HKCU:\SOFTWARE\Microsoft\IME\15.0\IMEKR"
$propertyName = "InputMethod"
$propertyValue = 1
$propertyType = "DWord"
if (-Not (Test-Path -Path $regPath)) {
Write-Host "$regPath does not exist. creating the path..." -ForegroundColor Yellow
New-Item -Path $regPath -Force | Out-Null
}
New-ItemProperty -Path $regPath -Name $propertyName -Value $propertyValue -PropertyType $propertyType -Force
Write-Host "hangule sebul390 registered: $regPath\\$propertyName = $propertyValue"