Teach the FindPackagTest to try creating the appropriate HKLM system package registry value. If it works then add a test to verify that find_package() reads it as expected. Then delete the value to cleanup.