From: Eric Biggers Date: Sun, 19 May 2013 21:56:49 +0000 (-0500) Subject: imagex_update(): Acquire capture privileges on Windows X-Git-Tag: v1.4.1~90 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=56ba8c06fa16282e9d89e0c8c88ec1d69c20d4d3 imagex_update(): Acquire capture privileges on Windows --- diff --git a/programs/imagex.c b/programs/imagex.c index 0a1f77b0..601ad01c 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -3079,15 +3079,23 @@ imagex_update(int argc, tchar **argv) } } +#ifdef __WIN32__ + win32_acquire_capture_privileges(); +#endif + /* Execute the update commands */ ret = wimlib_update_image(wim, image, cmds, num_cmds, update_flags, imagex_progress_func); if (ret) - goto out_free_cmds; + goto out_release_privs; /* Overwrite the updated WIM */ ret = wimlib_overwrite(wim, write_flags, num_threads, imagex_progress_func); +out_release_privs: +#ifdef __WIN32__ + win32_release_capture_privileges(); +#endif out_free_cmds: free(cmds); out_free_cmd_file_contents: