--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -298,6 +298,10 @@
         {
             psz_home = getenv( "HOME" );
         }
+        if( psz_home == NULL )
+        {
+            psz_home = getenv( "USERPROFILE" );
+        }
 
         /* Cache our keys in ${HOME}/.dvdcss/ */
         if( psz_home )