[python-win32] com_error creating VSS shadow copy (running as windows service)
Gerardo García Urtiaga
gerardo.garcia at ggusoft.com
Mon Mar 26 05:02:58 EDT 2018
Hello,
We have an application that launch a VSS (volume shadow copy), when the
application is running as administrator user, the shadow copy is made
correctly, but when the application is running as windows service the
application has a crash:
The instance's SvcRun() method failed
Traceback (most recent call last):
File "site-packages\win32\lib\win32serviceutil.py", line 835, in SvcRun
File "backsec-service.py", line 29, in SvcDoRun
File "backsec-service.py", line 36, in main
File "backsec.py", line 877, in runBackups
File "backsec.py", line 528, in doFullBackup
File "backsec.py", line 515, in doVss
File "backsec.py", line 490, in vssCreate
File "site-packages\win32com\client_*init*_.py", line 72, in GetObject
File "site-packages\win32com\client_*init*_.py", line 87, in Moniker
com_error: (-2147221020, 'Sintaxis no v\xe1lida', None, None)
%2: %3
The method "vssCreate" is this:
def vssCreate(self,unidad="c:\\"): if os.name == "nt":
wmi=win32com.client.GetObject("winmgmts:\\\\.\\root\\cimv2:Win32_ShadowCopy")
createmethod = wmi.Methods_("Create") createparams =
createmethod.InParameters createparams.Properties_[1].value=unidad results
= wmi.ExecMethod_("Create",createparams) return
results.Properties_[1].value return []
Thanks in advance
-------------------------------------------------------------
*Gerardo García U.*
GGUSOFT - Servicios de consultoría de IT
Email: gerardo.garcia at ggusoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20180326/bc865847/attachment-0001.html>
More information about the python-win32
mailing list