diff --git a/Tests/Data/Notebooks/requirements.txt b/Tests/Data/Notebooks/requirements.txt
index f4919231d8b921d0d68b131b9750f4f5340cc69a..fabac81ff072f616db8465d5e6da23d2dc6ce65f 100644
--- a/Tests/Data/Notebooks/requirements.txt
+++ b/Tests/Data/Notebooks/requirements.txt
@@ -1,4 +1,4 @@
-https://github.com/joergbuchwald/ogs6py/archive/refs/heads/master.zip
+https://github.com/joergbuchwald/ogs6py/archive/0f9e738e2ee469c8bde4204b2151238973417694.zip
 https://github.com/joergbuchwald/VTUinterface/archive/refs/heads/master.zip
 https://github.com/bilke/nb2hugo/archive/e27dc02df2be1ce19e4a6f52d197c2e2a6ca520c.zip
 ipykernel
diff --git a/scripts/cmake/test/NotebookTest.cmake b/scripts/cmake/test/NotebookTest.cmake
index c2e2d51b139fa130261b5304ab6158575e6d2dfb..0d5ad921195293eaf7e4f7f4e6bdcb26c9aa9a44 100644
--- a/scripts/cmake/test/NotebookTest.cmake
+++ b/scripts/cmake/test/NotebookTest.cmake
@@ -1,4 +1,4 @@
-# cmake-lint: disable=C0103
+# cmake-lint: disable=C0103,R0915
 function(NotebookTest)
 
     if(NOT OGS_BUILD_CLI OR NOT OGS_BUILD_TESTING OR NOT OGS_TEST_NOTEBOOKS)
@@ -74,10 +74,24 @@ function(NotebookTest)
         list(APPEND labels large)
     endif()
 
+    if(MSVC AND ${CMAKE_VERSION} VERSION_LESS 3.22)
+        message(
+            WARNING "Notebook tests are disabled on Windows when CMake < 3.22!"
+        )
+        return()
+    endif()
+
+    if(${CMAKE_VERSION} VERSION_LESS 3.22)
+        set(_prop_env ENVIRONMENT PATH=$<TARGET_FILE_DIR:ogs>:$ENV{PATH})
+    else()
+        set(_prop_env ENVIRONMENT_MODIFICATION
+                      PATH=path_list_prepend:$<TARGET_FILE_DIR:ogs>
+        )
+    endif()
+
     set_tests_properties(
         ${TEST_NAME}
-        PROPERTIES ENVIRONMENT
-                   PATH=$<TARGET_FILE_DIR:ogs>:$ENV{PATH}
+        PROPERTIES ${_prop_env}
                    COST
                    ${NotebookTest_RUNTIME}
                    DISABLED
diff --git a/scripts/cmake/test/OgsTestWrapper.cmake b/scripts/cmake/test/OgsTestWrapper.cmake
index 84dee510960774f0908175e4751bce87ebcd19e7..b80b75671a8c4522448ad5399953a2b22650fb17 100644
--- a/scripts/cmake/test/OgsTestWrapper.cmake
+++ b/scripts/cmake/test/OgsTestWrapper.cmake
@@ -7,7 +7,7 @@ execute_process(
 )
 
 if(EXIT_CODE STREQUAL "0")
-    if(NOT DEFINED ENV{CI})
+    if(NOT DEFINED ENV{CI} AND NOT CAT_LOG)
         file(WRITE ${LOG_FILE} "${LOG}")
     endif()
 else()