running vssadmin from a program

505 views Asked by At

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.

1

There are 1 answers

1
Y_N On

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