Use $env:SYSTEMDRIVE instead of $env:PROGRAMFILES.