Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using advapi32.dll to install a service
Message
De
20/09/2006 21:37:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01155465
Message ID:
01155794
Vues:
24
Hey Hugo,

I'm having a bit of a problem interpreting the documentation for the parameter list.

Here's what I'm trying to do:

m.lnResult = m.loservicem.create("Netrics Search Server", "Netrics Search Server", "c:\program files\netrics\netricsd-3.3.11-ET-eval.exe", 16, 1, "Automatic", .f., "", "", "", "", "")

I'm getting a "OLE IDispatch exception code 0 from SWbemObjectEx: Type mismatch" error.

Have you or anybody else any idea what I've done wrong?

Thanks for your help.

>Frank,
>
>OK, let me start again :)
>
>I've never created a service, but to get you started you can do something like:
>
>
>loLocator		= CREATEOBJECT('WBEMScripting.SWBEMLocator')
>loWMI			= loLocator.ConnectServer()
>loServiceM		= loWMI.Get('Win32_Service')
>lnResult		= loServiceM.Create({Parameter List})
>
>
>Where {Parameter List} you can read from here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/create_method_in_class_win32_service.asp hopefully you won't need the last two :)
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform