0

I'm trying to run the following command from a c++ program:

system("vssadmin list writers > tmp.txt ");

I'm getting this output:

 "vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool (C) Copyright 2001-2005 Microsoft Corp.

Error: A Volume Shadow Copy Service component encountered an unexpected error. Check the Application event log for more information.

in the event log there are 2 errors: 22 and 8193.

if I run it directly from the command line it works fine.

Thanks.

leppie
  • 115,091
  • 17
  • 196
  • 297
Y_N
  • 11
  • 3

1 Answers1

1

The problem was that I was running a 32 bit application on a 64 bit machine thus windows was redirecting the app to the wrong vssadmin.

http://msdn.microsoft.com/en-us/library/aa384187

http://msdn.microsoft.com/en-us/library/aa365743

Y_N
  • 11
  • 3
  • Thanks. I was pulling my hair out. I have a C# app compiled to "Any CPU" and was getting similar errors. I had to specifically target x64/x86. – eth0 Mar 11 '18 at 00:22