X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_vss.c;h=46af4bb14967235eb781ff7bd75fedebbc94ff84;hp=914cd9127267a69b215ea0895b8f28e51b4ce82b;hb=35841ff14ad55b687d8efcfceecd9b05e946f328;hpb=542225070ab6583b6f5915172425cac6e0326d77 diff --git a/src/win32_vss.c b/src/win32_vss.c index 914cd912..46af4bb1 100644 --- a/src/win32_vss.c +++ b/src/win32_vss.c @@ -293,7 +293,7 @@ vss_global_init(void) if (vss_initialized) return true; ERROR("The Volume Shadow Copy Service (VSS) API could not be " - "initialized. Probably it isn't supported on this computer."); + "initialized."); return false; } @@ -408,6 +408,12 @@ request_vss_snapshot(IVssBackupComponents *vss, wchar_t *volume, return true; } +static bool +is_pre_vista(void) +{ + return (GetVersion() & 0xFF) < 6; +} + static bool is_wow64(void) { @@ -503,7 +509,10 @@ vss_create_snapshot(const wchar_t *source, UNICODE_STRING *vss_path_ret, vss_err: ret = WIMLIB_ERR_SNAPSHOT_FAILURE; - if (is_wow64()) { + if (is_pre_vista() && !vss_initialized) { + ERROR("Snapshot mode is only supported on Windows Vista " + "and later!"); + } else if (is_wow64()) { ERROR("64-bit Windows doesn't allow 32-bit applications to " "create VSS snapshots.\n" " Run the 64-bit version of this application "