2 * applywim.c - A simple program to extract all images from a WIM file to a
9 int main(int argc, char **argv)
15 fprintf(stderr, "Usage: applywim WIM DIR\n");
20 /* Initialize the library. */
21 ret = wimlib_global_init(0);
25 /* Open the WIM file. */
26 ret = wimlib_open_wim(argv[1], 0, &wim, NULL);
28 goto out_wimlib_global_cleanup;
30 /* Extract all the images. */
31 ret = wimlib_extract_image(wim, WIMLIB_ALL_IMAGES, argv[2], 0, NULL);
33 /* Free the WIM file */
36 out_wimlib_global_cleanup:
37 /* Finalize the library */
38 wimlib_global_cleanup();