--- gphoto2-2.5.28/gphoto2/gp-params.c.orig	2025-08-17 11:37:20.980244500 +0200
+++ gphoto2-2.5.28/gphoto2/gp-params.c	2025-08-17 11:38:05.444623100 +0200
@@ -518,7 +518,11 @@
 	}
 	
 	/* Actually run the hook script */
+#ifdef _WIN32
+	retcode = spawnve(_P_WAIT, hook_script, child_argv, child_envp);
+#else
 	retcode = spawnve(hook_script, child_argv, child_envp);
+#endif
 		
 	/* Free all memory */
 	for (i=0; child_envp[i] != NULL; i++) {
