Share via


Propriété SWbemObjectPath.Relpath

La propriété Relpath de l’objet SWbemObjectPath contient le chemin relatif du chemin d’accès complet.

Pour obtenir une explication de cette syntaxe, consultez Conventions de document pour l’API de script.

Cette propriété est en lecture/écriture.

Syntaxe

SWbemObjectPath.Relpath As String

Valeur de la propriété

Exemples

L’exemple de code VBScript suivant montre la différence entre les données obtenues à partir de SWbemObject.Path_ et SWbemObjectPath.Relpath.

set objWMIService = GetObject ("winmgmts:root/cimv2")

set Processes = objWMIService.ExecQuery( _
    "Select * from win32_process")

For Each Process in Processes
 WScript.Echo Process.Path_ 
 WScript.Echo Process.Path_.Relpath
Next

Spécifications

Condition requise Valeur
Client minimal pris en charge
Windows Vista
Serveur minimal pris en charge
Windows Server 2008
En-tête
Wbemdisp.h
Bibliothèque de types
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemObjectPath
IID
IID_ISWbemObjectPath