Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running vfp on windows 7 - system info - can't collect
Message
De
26/02/2011 23:42:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01501966
Message ID:
01501982
Vues:
121
I have a little more info that may help:

I issued this from a VFP app I am running:

&& In case the COM's did not release properly, kill them.
lcComputer = '.'
loWMIService = Getobject('winmgmts:' ;
+ '{impersonationLevel=impersonate}!\\' + lcComputer + '\root\cimv2')
lcprocname="ITFCOMLEFT.EXE"
colProcessList = loWMIService.ExecQuery([Select * from Win32_Process where Name="]+lcProcName+["])
For Each loProcess In colProcessList
IF UPPER(loProcess.name) = lcprocname
loProcess.terminate()
endif
NEXT
lcprocname="ITFCOMRGHT.EXE"
colProcessList = loWMIService.ExecQuery([Select * from Win32_Process where Name="]+lcProcName+["])
For Each loProcess In colProcessList
IF UPPER(loProcess.name) = lcprocname
loProcess.terminate()
endif
NEXT

WAIT CLEAR

loWMIService=.NULL.
RELEASE loWMIService
RELEASE colProcessList=.NULL.
RELEASE colProcessList
RELEASE loProcess

VFP generates an error on the "colProcessList = loWMIService.ExecQuery([Select * from Win32_Process where Name="]+lcProcName+["])
" line of code.

colprocessList is an object (can't see what is in it), but it appears the loWMIService may not "understand" the ExecQuery command or something. loProcess does NOT become an object.

Perhaps the '\root\cimv2' is not good or something? I have no idea what '\root\cimv2' means.

John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform