]> wimlib.net Git - wimlib/blobdiff - src/win32_vss.c
vss: note that it's only supported on Vista and later
[wimlib] / src / win32_vss.c
index 914cd9127267a69b215ea0895b8f28e51b4ce82b..46af4bb14967235eb781ff7bd75fedebbc94ff84 100644 (file)
@@ -293,7 +293,7 @@ vss_global_init(void)
        if (vss_initialized)
                return true;
        ERROR("The Volume Shadow Copy Service (VSS) API could not be "
        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;
 }
 
        return false;
 }
 
@@ -408,6 +408,12 @@ request_vss_snapshot(IVssBackupComponents *vss, wchar_t *volume,
        return true;
 }
 
        return true;
 }
 
+static bool
+is_pre_vista(void)
+{
+       return (GetVersion() & 0xFF) < 6;
+}
+
 static bool
 is_wow64(void)
 {
 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;
 
 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 "
                ERROR("64-bit Windows doesn't allow 32-bit applications to "
                      "create VSS snapshots.\n"
                      "        Run the 64-bit version of this application "