cmd - Invoking 64-bit console from 32-bit python -
i'm attempting write script gather output of few basic windows commands set of files, , finding vssadmin commands frustrating. command relatively simple
os.system('vssadmin list writers>> x:\foo\vss.txt')
the problem i'm writing in python 32-bit , want make sure function on 64-bit windows. when executing this, return is:
vssadmin 1.1 - volume shadow copy service administrative command-line tool (c) copyright 2001-2005 microsoft corp.
error: volume shadow copy service component encountered unexpected error. check application event log more information.
can invoke 64-bit command line 32-bit python , decide whether invoke bit-depth detecting function, or there more elegant solution?
follow-up: using mbu jumping off point found following command trick:
os.system('%systemroot%\\sysnative\\cmd.exe /c vssadmin list writers > x:\\foo\\vss.txt')
under windows 2008 or newer can launch c:\windows\sysnative\vssadmin.exe
. under windows 2003 hotfix needed, can create filesystem junction reach 64-bit system file 32-bit applications. details see answer this question. while launching 64-bit cmd.exe 32-bit cmd.exe, rules stay same applications.
Comments
Post a Comment