<div dir="ltr"><p>Hello,</p>
<p>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:</p>
<p>The instance's SvcRun() method failed<br>
Traceback (most recent call last):<br>
File "site-packages\win32\lib\win32serviceutil.py", line 835, in SvcRun<br>
File "backsec-service.py", line 29, in SvcDoRun<br>
File "backsec-service.py", line 36, in main<br>
File "backsec.py", line 877, in runBackups<br>
File "backsec.py", line 528, in doFullBackup<br>
File "backsec.py", line 515, in doVss<br>
File "backsec.py", line 490, in vssCreate<br>
File "site-packages\win32com\client_<em>init</em>_.py", line 72, in GetObject<br>
File "site-packages\win32com\client_<em>init</em>_.py", line 87, in Moniker<br>
com_error: (-2147221020, 'Sintaxis no v\xe1lida', None, None)<br>
%2: %3</p>
<p>The method "vssCreate" is this:</p>
<p><code>def vssCreate(self,unidad="c:\\"): if <a href="http://os.name">os.name</a> == "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 []</code></p>
<p>Thanks in advance</p><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br>-------------------------------------------------------------<br><span style="color:rgb(68,68,68)"><b>Gerardo GarcĂa U.</b></span><br><span style="color:rgb(68,68,68)"><span style="background-color:rgb(255,255,255)"><br></span></span><span style="color:rgb(68,68,68)"><span style="background-color:rgb(255,255,255)"><font size="1">GGUSOFT - Servicios de consultorĂa de IT<br></font></span></span><span style="color:rgb(68,68,68)"><span style="background-color:rgb(255,255,255)"><font size="1">Email: <a href="mailto:gerardo.garcia@ggusoft.com" target="_blank">gerardo.garcia@ggusoft.com</a></font></span></span></div></div></div></div></div></div></div>
</div>