Open a command prompt (Windows console), and type
echo %HOMEPATH%
; you will find out that this environment variable does not include the drive. Eg., on my system, it returns
\Users\Account
.
You could try
strBaseFolder = "C:\" + homePath + "\AppData\Local\Temp"
and see whether it solves your problem.