I have the following code that I need to use to switch windows 7 themes between standard and high contrast. The IF runs fine but it will not run the ELSE condition, can someone please point out the error of my ways?
IF ((Get-ItemProperty -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes").CurrentTheme = "%SystemRoot%\resources\Ease of Access Themes\hcblack.theme")
{
C:\scripts\Themetool.exe changetheme "c:\Windows\resources\Themes\MyTheme.theme"
}
ELSE {
C:\scripts\Themetool.exe changetheme "C:\Windows\resources\Ease of Access Themes\hcblack.theme"
}