Bienvenido a Tecnohackers

Tecnohackers » Programacion » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript.
 » 

Generador de Códigos de WMIC



Autor Tema: Generador de Códigos de WMIC  (Leído 2164 veces)

Conectado zolo

  • Consigliere
  • Master
  • *****
  • Mensajes: 22377
  • Un Mes, Un Año o Toda Una Vida, Da Igual, Estare
Generador de Códigos de WMIC
« en: Junio 04, 2012, 07:33:46 pm »
guión del Generador de WMCI, recuerdo guardarlo en extensión * HTA, despues de haberlo Editado en bloque de las Naciones Unidas de Notas..
 quedaria:
 
wmigen.hta
 
<html>
<head>
<title> WMI Code Generator </ title>
<HTA: APLICACIÓN
ID = "WMIGen"
VERSION = "5.10"
ApplicationName = "Generador de código de WMI"
SCROLL = "yes"
SINGLEINSTANCE = "yes"
WindowState = " maximizar "
>
<style type="text/css">
<-
a {color: blue;}
p {color: negro; font-size: 80%;}
botón {width: 12em; margin: 3px 3px 1em. 1em;}
. Roja {color: red;}
{color blanco. blanco;}
->
</ style>
</ head>
 
LANGUAGE="VBScript"> <script
'Variable para establecer filtros de clases que se muestran
"Si es True, todas las clases se muestran
'Si es False entonces sólo WIN32_ * Las clases se muestran
"la línea de comandos modificador / WIN32 establece a false
blnShowAllClasses Dim
blnShowAllClasses = True
 
'Variable para establecer filtros para Win32_Perf * clases
"Si es True entonces las clases * Win32_Perf se incluyen
'Si es False entonces las clases * Win32_Perf están excluidos
"modificador de la línea de comandos / NOPERF establece a false
blnShowPerfClasses Dim
blnShowPerfClasses = True
 
'Objetos de Internet Explorer para contener las páginas de ayuda de MSDN
Dim objIEHelp
Sub ButtonState (blnCodeButtonsEnabled)
CodeLabel.InnerHTML = "Código:"
Code.title = "Después de pulsar el" Generar Código "botón, el código generado para ver las propiedades disponibles y sus valores de seleccionado de la clase de WMI y el lenguaje de secuencias de comandos se muestra aquí "
Si blnCodeButtonsEnabled Luego
CopyCodeButton.Disabled = True
CopyCodeButton.Title = ""
ClearCodeButton.Disabled = True
ClearCodeButton.Title = ""
RunCodeButton.Disabled = True
RunCodeButton.Title = ""
GenerateCodeButton. Desactivado = False
GenerateCodeButton.Title = "Pulse este botón para generar el código que muestra las propiedades y sus valores para el seleccionado de clase WMI, en el lenguaje de programación seleccionado"
Else
CopyCodeButton.Disabled = False
CopyCodeButton.Title = "Pulse este botón para copiar el código generado en el portapapeles "
ClearCodeButton.Disabled = False
ClearCodeButton.Title = "Pulse este botón para borrar el código generado"
RunCodeButton.Disabled = False
RunCodeButton.Title = "Pulse este botón para ejecutar el generado (VBScript)"
GenerateCodeButton personas discapacitadas. = True
GenerateCodeButton.Title = ""
End If
End Sub
 
Sub CheckUpdate ()
'puntero del ratón para el Cambio de reloj de arena, mientras que la comprobación de actualización
Document.Body.Style.Cursor = "espera"
 
strLatestVer = TextFromHTML ("You are not allowed to view links. Register or Login")
lenLatestVer = Len (strLatestVer)
Si lenLatestVer = 4 Y
= strCurrentVer WMIGen.Version
Si strLatestVer <strCurrentVer Luego
Update.InnerHTML = "<p class = "" Blanco ""> Usted parece estar utilizando una versión no válida ("& strCurrentVer _
& ") del generador de código de WMI. <br> La última versión válida es" _
y strLatestVer & "y está disponible" _
y "<a href=""You are not allowed to view links. Register or Login"" class=""Red""> aquí </ a>. </ p>"
End If
Si strLatestVer> strCurrentVer Luego
Actualizar . innerHTML = "<p class=""White""> Estás usando la versión" y strCurrentVer _
& "del generador de código de WMI. <br> una actualización a la versión" _
y strLatestVer y "está disponible" _
& "< a href = "" You are not allowed to view links. Register or Login "" class = "" Rojo ""> aquí </ a>. </ p> "
End If
End If
 
"Cambiar el puntero del ratón de nuevo a los valores de
Document.Body.Style.Cursor = "default"
End Sub
Sub CheckWindowSize ()
= myWidth document.body.clientWidth
myHeight = document.body.clientHeight
largeBoxWidth = CInt (myWidth / 9)
smallBoxWidth = CInt ( (largeBoxWidth - 5) / 2)
smallBoxHeight = CInt (myHeight / 100)
codeBoxRows = CInt (myHeight / 50)
Si smallBoxHeight <6 = 6 Entonces smallBoxHeight
Si codeBoxRows <15 Entonces codeBoxRows = 15
 
Code.Cols = largeBoxWidth
Code.Rows = codeBoxRows
Properties.size = smallBoxHeight
Methods.size = smallBoxHeight
WMIClasses.size = smallBoxHeight
End Sub
Sub ClearCode ()
Code.Value = ""
Es cierto ButtonState
End Sub
Sub CopyCode ()
= strCode Code.Value
Document.ParentWindow.ClipboardData.SetData "texto", strCode
End Sub
Sub CreateIEHelp ()
On Error Resume Next
objIEHelp.Close
On Error Goto 0
Conjunto objIEHelp = Nothing
Set objIEHelp = CreateObject ("InternetExplorer.Application")
objIEHelp.Navigate "acerca de: en blanco "
objIEHelp.AddressBar = 1
= 1 objIEHelp.MenuBar
objIEHelp.StatusBar = 1
= 1 objIEHelp.ToolBar
objIEHelp.Top = 0
= 0 objIEHelp.Left
objIEHelp.Width = 800
= 600 objIEHelp.Height
objIEHelp.TheaterMode = 0
objIEHelp.Visible = 1
End Sub
CreateLine función (strProperty)
'Esta subrutina se divide una cadena en palabras diferentes:
"SCSILogicalUnit" se convertirá en "SCSI de unidad lógica"
 
On Error Resume Next
 
Dim i, j, k, strPropDescr, strLowc, strCaps, strPad, CHRA, ChrB
 
strPropDescr = strProperty
strCaps = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
strPad = ""
strLowc = LCase (strCaps)
 
i = 0
Do
i = i + 1
j = i + 1
Si j> = Len (strPropDescr) Then Exit Do
chra = Mid (strPropDescr, i, 1)
ChrB = Mid (strPropDescr, j, 1)
If InStr (strLowc, CHRA)> 0 y InStr (strCaps, ChrB)> 0 Then
strPropDescr = Izquierda (strPropDescr, i) & "" & Mid (strPropDescr, j)
i = i + 2
j = i + 1
End If
Loop
 
Si Len (strPropDescr)> 2 A continuación,
i = 0
Do
i = i + 1
j = i + 1
k = i + 2
Si k> = Len (strPropDescr) Then Exit Do
chra = Mid (strPropDescr, i, 1)
= ChrB Medio (strPropDescr, j, 1)
CHRC = Mid (strPropDescr, k, 1)
If InStr (strCaps, CHRA)> 0 y InStr (strCaps, ChrB)> 0 y InStr (strLowc, CHRC)> 0 Then
strPropDescr = Izquierda ( strPropDescr, i) & "" & Mid (strPropDescr, j)
i = i + 3
j = i + 1
k = i + 2
End If
Loop
End If
 
CreateLine = Izquierda (strPropDescr y strPad, 31) & ":"
End Function
Sub FillClassDropDown ()
'algoritmo de burbuja tipo encontrado en el repositorio de secuencias de comandos de Microsoft
'You are not allowed to view links. Register or Login hey1122.mspx
 
ArrOptions Dim ()
= 0 intSize
 
"Cambiar el cursor de reloj de arena durante la carga de la clase WMI lista
Document.Body.Style.Cursor = "espera"
 
Establecer objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root \ cimv2")
colClasses Set = objWMIService.SubClassesOf
 
'Guarde la lista de clases en una matriz
para cada objClass En colClasses
de mostrar sólo Win32_ * Clases / Win32, si se usó
Si la izquierda (UCase (objClass.Path_.Class), 6) = "WIN32_" O blnShowAllClasses Entonces
'Skip Win32_Perf * clases si / NOPERF se usó
Si la izquierda (UCase (objClass.Path_.Class), 10) <> "WIN32_PERF" O blnShowPerfClasses Entonces
'Skip WMI systemm propiedades que comienzan con un subrayado doble
Si la izquierda (objClass.Path_.Class, 2) < > "__" Entonces
ReDim Preserve (arrOptions intSize)
arrOptions (intSize) = objClass.Path_.Class
intSize intSize = + 1
End If
End If
End If
Next
 
"Ordenar las clases
For i = (UBound (arrOptions) - 1) a 0 Step -1
Para j = 0 para i
Si UCase (arrOptions (j))> UCase (arrOptions (j + 1)) Luego
strHolder arrOptions = (j + 1)
arrOptions (j + 1) = arrOptions j)
arrOptions (j) = strHolder
End If
Next
Next
 
'Llenar la lista de clases
For i = 0 To UBound (arrOptions)
Establecer objNewOption document.createElement = ("opción")
If CInt (i / 2) <> (i / 2) A continuación
objNewOption.style.backgroundcolor = "# f0f0f0"
End If
objNewOption.Text = arrOptions i)
Si i = 0 Entonces objNewOption.Selected = True
WMIClasses.options.Add (objNewOption)
Siguiente
 
"Cambiar el cursor de nuevo a por defecto
Document.Body.Style.Cursor = "default"
 
HandleClassChange
End Sub
Sub gethelp ()
'Comprueba que la clase se selecciona
para cada objOption En WMIClasses.options
Si objOption.Selected = True Then
strClass = Trim (objOption.Text)
End If
Next
'Comprobar que la propiedad se ha seleccionado, en su caso
strMember = " "
Por cada objOption En Properties.options
Si objOption.Selected = True Then
strMember = "+" & Trim (objOption.Text) y "+ propiedad"
End If
Next
'Comprobar que el método seleccionado, en su caso
por cada una objOption en Métodos. opciones
Si objOption.Selected = True Then
strMember = "+" & Trim (objOption.Text) y "+ método"
End If
Next
 
Las técnicas de búsqueda de Google aprendido de
'You are not allowed to view links. Register or Login
strURLHelp = "You are not allowed to view links. Register or Login =" _
y _ strClass
y strMember _
& "y el sitio = msdn.microsoft.com y btnI = 745 y PWS = 0 "
On Error Resume Next
strURLHelp objIEHelp.Navigate
If Err.Number Luego
CreateIEHelp
objIEHelp.Navigate strURLHelp
End If
On Error GoTo 0
objIEHelp.Visible = 1
End Sub
Sub HandleClassChange ()
arrMethods Dim () , arrProperties ()
Dim, intMethods intProperties
 
"Purgar la lista de métodos
para cada objOption en Methods.options
objOption.RemoveNode
Siguiente
arrMethods ReDim (0)
= 0 intMethods
 
"Purgar la lista de propiedades
por cada una de objOption Properties.options
objOption.RemoveNode
Siguiente
arrProperties ReDim (0)
= 0 intProperties
 
"Cambiar el cursor de reloj de arena durante la carga de la clase 'los miembros de las listas de
Document.Body.Style.Cursor = "espera"
 
Para cada objOption En WMIClasses.Options
Si objOption.Selected = True Then
strClass = objOption.Text
objWMIService Set = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Set objClass = objWMIService.Get (strClass)
 
'Guarde la lista de métodos en un array
For Each objMethod En objClass.Methods_
ReDim Preserve arrMethods (intMethods)
arrMethods (intMethods) = objMethod.Name
intMethods intMethods = + 1
Siguiente
 
'Guarde la lista de propiedades de una matriz
por cada una objProperty En objClass.Properties_
ReDim Preserve arrProperties (intProperties)
arrProperties (intProperties) = objProperty.Name
intProperties intProperties = + 1
Siguiente
 
Si IsArray (arrMethods) A continuación,
'Ordenar la lista de métodos
For i = (UBound (arrMethods) - 1) a 0 Step -1
Para j = 0 para i
Si UCase (arrMethods (j))> UCase (arrMethods (j + 1) ) Luego
strHolder arrMethods = (j + 1)
arrMethods (j + 1) = arrMethods j)
arrMethods (j) = strHolder
End If
Next
Next
 
'Llenar la lista de métodos
i = 0
For Each strOption en arrMethods
Establecer objNewOption document.createElement = ("opción")
If CInt (i / 2) <> (i / 2) A continuación
objNewOption.style.backgroundcolor = "# f0f0f0"
End Si
objNewOption.Text = strOption
Methods.options.Add (objNewOption)
i = i + 1
Next
End If
 
Si IsArray (arrProperties) A continuación,
'Ordenar la lista de propiedades
For i = (UBound (arrProperties) - 1) a 0 Step -1
Para j = 0 para i
Si UCase (arrProperties (j))> UCase (arrProperties (j + 1) ) Luego
strHolder arrProperties = (j + 1)
arrProperties (j + 1) = arrProperties j)
arrProperties (j) = strHolder
End If
Next
Next
 
'Llenar la lista de propiedades
i = 0
For Each strOption en arrProperties
Establecer objNewOption document.createElement = ("opción")
If CInt (i / 2) <> (i / 2) A continuación
objNewOption.style.backgroundcolor = "# f0f0f0"
End Si
objNewOption.Text = strOption
Properties.options.Add (objNewOption)
i = i + 1
Next
End if
End If
Siguiente
 
"Cambiar el cursor de nuevo a por defecto
Document.Body.Style.Cursor = "default"
 
Code.Value = ""
Es cierto ButtonState
End Sub
Sub HandleLanguageChange ()
ButtonState verdadero
Code.Value = ""
End Sub
Sub EjecutarCódigo ()
Dim colItems, objItem, objOption, objProperty, objWMIService
Dim strClass, strCode, strProperty
 
"Cambiar el puntero del ratón a la de reloj de arena mientras se ejecuta el código
Document.Body.Style.Cursor = "esperar"
Code.Value = ". . . Espere por favor. . . "
CodeLabel.InnerHTML = "Resultado:"
 
Para cada objOption En WMIClasses.Options
Si objOption.Selected = True Then
strClass = objOption.Text
End If
Siguiente
 
Establecer objWMIService = GetObject ("winmgmts :/ /" y strComputer)
colItems Set = objWMIService.InstancesOf (strClass)
 
On Error Resume Next
 
Para cada objItem En colItems
Para Cada objProperty En objItem.Properties_
strProperty = objProperty.Name
strCode = strCode y CreateLine (strProperty) & ""
Si IsArray (objItem.Properties_.Item (strProperty, 0)) Luego
strCode = strCode y Join (objItem . Properties_.Item (strProperty, 0); "")
Else
strCode = strCode y objItem.Properties_.Item (strProperty, 0)
End If
strCode = strCode & vbCrLf
Next
strCode = strCode & vbCrLf
Next
 
On Error Goto 0
 
Code.Value = strCode
Code.title = "Después de pulsar el" Generar Código "de nuevo el botón, el código generado para ver las propiedades disponibles y sus valores para el seleccionado de clase WMI y el lenguaje de secuencias de comandos se muestra aquí una vez más"
CopyCodeButton.Title = "Pulse este botón para copiar el resultado al portapapeles"
ClearCodeButton.Title = "Pulse este botón para borrar el resultado de"
RunCodeButton.Disabled = True
RunCodeButton.Title = ""
GenerateCodeButton.Disabled = False
GenerateCodeButton.Title = "Pulse este botón para generar el código que muestra las propiedades y sus valores para el seleccionado de clase WMI, en el lenguaje de programación seleccionado "
"Cambiar el puntero del ratón de nuevo a por defecto
Document.Body.Style.Cursor = "default"
End Sub
Sub ShowCode ()
'Cambiar el ratón puntero al reloj de arena mientras se ejecuta el código
Document.Body.Style.Cursor = "esperar"
 
Para cada objOption En WMIClasses.Options
Si objOption.Selected = True Then
strClass = objOption.Text
End If
Siguiente
 
Seleccione el asunto CodeLanguage.Value
caso "por lotes"
ShowBatchCode strClass
caso "CSharp"
ShowCSharpCode strClass
caso "JScript"
ShowJScriptCode strClass
caso "KiXtart"
ShowKiXtartCode strClass
caso "ObjectRexx"
ShowObjectRexxCode strClass
caso "Perl"
ShowPerlCode strClass
caso "PowerShell"
ShowPowerShellCode strClass
caso "Python "
ShowPythonCode strClass
caso "Ruby"
ShowRubyCode strClass
caso "VBDotNET"
ShowVBDotNETCode strClass
caso "VBScript"
ShowVBScriptCode strClass
End Select
 
'Cambiar el puntero del ratón de nuevo a los valores de
Document.Body.Style.Cursor = "default"
Code.title = "Después de pulsar el botón de" Ejecutar WMI Code ', el generado (VBScript) se ejecutará, y el resultado se muestra a continuación "
End Sub
Sub ShowBatchCode (MyClass)
strCode = "@ ECHO OFF" _
& vbCrLf _
& ":: consulta WMI para enumerar todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& ":: Este lote archivo se genera utilizando el generador de código de WMI, Versión "y WMIGen.Version _
& vbCrLf _
& ":: You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "SI" "% ~ 1 "" == "" "" ("_
& vbCrLf _
& vbTab & "el conjunto de nodos =%% ComputerName" _
& vbCrLf _
& ") ELSE (" _
& vbCrLf _
& vbTab & "el conjunto de nodos =% ~ 1 "_
& vbCrLf _
& ")" _
& vbCrLf & vbCrLf _
& "Wmic.exe / Nodo:" "Nodo%%" "/ Salida: Camino STDOUT" y miClase y "Get / Formato: LISTA DE" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowCSharpCode (MyClass)
Const wbemCIMTypeSint16 = 2 'Firmado entero de 16 bits
Const wbemCIMTypeSint32 = 3 'Firmado entero de 32 bits
Const wbemCIMTypeReal32 = 4 '32-bit número real
Const wbemCIMTypeReal64 = 5 '64 -bit número real
Const wbemCIMTypeString = 8 'String
Const wbemCIMTypeBoolean = 11 'Valor booleano
Const wbemCIMTypeObject = 13 'CIM objeto
Const wbemCIMTypeSint8 = 16 'Entero de 8 bits sin signo
Const wbemCIMTypeUint8 = 17 'sin signo de 8 bits sin signo
Const wbemCIMTypeUint16 = 18 'sin firmar entero de 16 bits
Const wbemCIMTypeUint32 = 19 'sin signo de 32 bits sin signo
Const wbemCIMTypeSint64 = 20 'Firmado entero de 64 bits
Const wbemCIMTypeUint64 'sin signo de 64 bits = 21
Const wbemCIMTypeDatetime = 101 'valor fecha / hora
= 102 Const wbemCIMTypeReference "La referencia a un objeto CIM
Const wbemCIMTypeChar16 = 103 '16-bit de carácter
 
Establecer objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Set objClass = objWMIService.Get (MyClass)
 
strCode = "/ / consulta WMI para enumerar todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "/ / Este código C # se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
& "/ / You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "using System;" _
& vbCrLf _
& "con System.Management;" _
& vbCrLf _
& "Utilización de System.Linq; "_
& vbCrLf & vbCrLf _
& "espacio de nombres" y miClase y "_Query" _
& vbCrLf _
& "{" _
& vbCrLf _
& vbTab & "WMIQuery clase pública" _
& vbCrLf _
& vbTab & "{ "_
& vbCrLf _
& vbTab & vbTab & "public static void Main ()" _
& vbCrLf _
& vbTab & vbTab & "{" _
& vbCrLf _
& vbTab & vbTab & vbTab & "probar" _
& vbCrLf _
& vbTab & vbTab & vbTab & "{" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "buscador ManagementObjectSearcher = new ManagementObjectSearcher (" "\ root \ cimv2" "", "SELECT * FROM" & miClase & "" ") ; "_
& vbCrLf & vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "foreach (ManagementObject queryObj en searcher.Get ())" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "{" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & vbTab & vbTab & vbTab & vbTab
Si objProperty.IsArray = True Then
intCIMType = objProperty.CIMType
strCIMType = "cadena"
Si intCIMType <8 Entonces strCIMType = "UInt16"
Si intCIMType> 15 Y intCIMType <100 Luego strCIMType = "UInt16"
strCode = strCode y "si (queryObj [" "" & objProperty.Name & "" "] == null)" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "{" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.WriteLine (" "" & CreateLine (objProperty.Name) & "{0}" ", queryObj [" "" y objProperty.Name & "" "]);" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "}" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "si no" _
y vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "{" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & strCIMType y "[] arrProperty = (" & strCIMType y "[]) ( queryObj ["" "& objProperty.Name &" ""]); "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.Write (" "" & CreateLine (objProperty.Name) y "" ");" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.WriteLine (String.Join (" "," ", arrProperty.Select (CAP => cap.ToString () .) ToArray ())); "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "}" _
& vbCrLf
Else
strCode strCode = & "Console.WriteLine (" "" & CreateLine (objProperty.Name) & "{0}" ", queryObj [" "" & objProperty.Name & "" "]);" & vbCrLf
End If
Next
strCode = strCode & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.WriteLine () ; "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "}" _
& vbCrLf _
& vbTab & vbTab & vbTab & "}" _
& vbCrLf _
& vbTab & vbTab & vbTab & "catch (ManagementException e)" _
& vbCrLf _
& vbTab & vbTab & vbTab & "{" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Console.OpenStandardError ();" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Consola . WriteLine ("" Se produjo un error al consultar WMI: "" + e.Message); "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Console.OpenStandardOutput ();" _
& vbCrLf _
& vbTab & vbTab & vbTab & "}" _
& vbCrLf _
& vbTab & vbTab & "}" _
& vbCrLf _
& vbTab & "}" _
& vbCrLf _
& "}" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowJScriptCode (MyClass)
'IsArray y Join () la funcionalidad de "prestado" de Scriptomatic 2,0
'
objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Set objClass = objWMIService.Get (MyClass)
 
strCode = "/ / consulta WMI para enumerar todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "/ / Este código JScript se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
& "/ / You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "var wbemFlagReturnImmediately = 0 × 10," _
& vbCrLf _
& "var = 0 wbemFlagForwardOnly × 20," _
& vbCrLf & vbCrLf _
& "= objArgs WScript.Arguments," _
& vbCrLf _
& "si (objArgs.length == 1) {" _
& vbCrLf _
& "var strComputer = objArgs
  • " _

& vbCrLf _
+ "} else {" _
& vbCrLf _
& "var strComputer =" "." "" _
& vbCrLf _
& "}" _
& vbCrLf & vbCrLf _
& "var objWMIService = GetObject (" "winmgmts :/ /" "+ strComputer + "" / root/cimv2 ""); "_
& vbCrLf _
& "var colItems objWMIService.ExecQuery = (" "SELECT * FROM" & miClase & "" "" "WQL" ", wbemFlagReturnImmediately | wbemFlagForwardOnly); "_
& vbCrLf & vbCrLf _
& "var = Enumerador enumItems nueva (colItems);" _
& vbCrLf _
& "for (;! enumItems.atEnd (); enumItems.moveNext ()) {" _
& vbCrLf _
& "var objItem enumItems.item = (); "_
& vbCrLf & vbCrLf
 
Para cada objProperty En objClass.Properties_
Si objProperty.IsArray = True Then
strCode = strCode & vbTab & "try {WScript.Echo (" "" & CreateLine (objProperty.Name) & "" "+ (objItem." y objProperty.Name & ".. toArray ()) join (" "," "));}" _
& vbCrLf _
& vbTab & "catch (e) {WScript.Echo (" "" & CreateLine (objProperty.Name) y "nulo "");} "_
& vbCrLf
Else
". + objItem" strCode = strCode & vbTab & "WScript.Echo (" "" & CreateLine (objProperty.Name) & "" & objProperty.Name & ");" _
y vbCrLf
End If
Next
 
strCode strCode = _
& vbTab & "WScript.Echo (" "" ");" _
& vbCrLf & "}" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowKiXtartCode (MyClass)
Set objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Establecer objClass = objWMIService.Get (MyClass)
 
strCode = "; consulta WMI para enumerar todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "; Esta secuencia de comandos KiXtart se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
+ "; You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "Break On" _
& vbCrLf & vbCrLf _
& "Si $ equipo =" "" "" _
& vbCrLf _
& vbTab & "$ arrKixVer = Split (@ Kix", "." ")" _
& vbCrLf _
& vbTab & "$ KiXVer = 100 * $ arrKixVer
  • + $ arrKixVer [1]" _

& vbCrLf _
& vbTab & " $ equipo = "". "" "_
& vbCrLf _
& vbTab & "Si $ KixVer> 451" _
& vbCrLf _
& vbTab & vbTab & "$ = arrGetCommandLine GetCommandLine (1)" _
& vbCrLf _
& vbTab & vbTab & "LastArg $ = $ arrGetCommandLine [UBound ($ arrGetCommandLine)]" _
& vbCrLf _
& vbTab & vbTab & "Si LastArg $ <>" "@ ScriptDir \ @ scriptName" "" _
& vbCrLf _
& vbTab & vbTab & vbTab & "$ equipo = $ LastArg" _
& vbCrLf _
& vbTab & vbTab & "endif" _
& vbCrLf _
& vbTab & "endif" _
& vbCrLf _
& "endif" _
& vbCrLf & vbCrLf _
& "$ objWMIService = GetObject ( "" winmgmts :/ / "" + $ + ordenador "," / root/cimv2 "") "_
& vbCrLf _
& "$ = $ colItems objWMIService.ExecQuery (" "SELECT * FROM" & miClase & "" "" "WQL" ", 48)" _
& vbCrLf & vbCrLf _
& "Por cada $ objItem En $ colItems" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "? "" "& CreateLine (objProperty.Name) &" "" + "
Si objProperty.IsArray = True Then strCode strCode = & "Ingreso ("
strCode strCode = & "$ objItem." y objProperty.Name
Si objProperty.IsArray = True Luego strCode strCode = & "," "," ")"
= strCode strCode & vbCrLf
Next
 
strCode strCode = _
& vbTab & "?" _
& vbCrLf _
& "Siguiente" _
& vbCrLf & vbCrLf _
& "Salir" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowObjectRexxCode (MyClass)
: "Sobre la base de las muestras de script REXX que se encuentran en el repositorio de scripts
You are not allowed to view links. Register or Login '? Referencia del fabricante = true
'Probado con Open Object Rexx: You are not allowed to view links. Register or Login
Establecer objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Establecer objClass = objWMIService.Get (MyClass)
 
strCode = "/ *" _
& vbCrLf _
& "consulta WMI para enumerar todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "Este Open Object Rexx secuencia de comandos se ha generado utilizando el generador de código de WMI, la versión" y WMIGen.Version _
& vbCrLf _
& "You are not allowed to view links. Register or Login" _
& vbCrLf _
& "* /" _
& vbCrLf & vbCrLf _
& "strComputer Analizar Arg superior." _
& vbCrLf _
& "Si strComputer =" "" "Entonces strComputer =" "" _ "."
& vbCrLf & vbCrLf _
& "objWMIService = ~ OLEObject GetObject (". "winmgmts :/ /" "| | strComputer | |" "/ root/cimv2 "") "_
& vbCrLf & vbCrLf _
& "Do objItem En objWMIService ~ ExecQuery (" "Select * from" & miClase & "" ")" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "Decir" "" & CreateLine (objProperty.Name) & "" "| |"
Si objProperty.IsArray = True Then strCode strCode = & "Traducir ("
strCode = strCode y "objItem ~" y objProperty.Name
Si objProperty.IsArray = True Then strCode strCode = & "," "," "", "0D0A" "x)"
= strCode strCode & vbCrLf
Next
 
strCode strCode = _
& vbTab & "Say" _
& vbCrLf _
& "Final" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowPerlCode (MyClass)
Set objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Establecer objClass = objWMIService.Get (MyClass)
 
strCode = "#! perl "_
& vbCrLf & vbCrLf _
& "# WMI consulta a la lista de todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "# Este script en Perl se ha generado utilizando el generador de código de WMI, Versión" y WMIGen . Versión _
& vbCrLf _
& "# You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "uso Win32 :: OLE ('en');" _
& vbCrLf & vbCrLf _
+ "uso constante de wbemFlagReturnImmediately => 0 × 10," _
& vbCrLf _
& "usar constantes wbemFlagForwardOnly => 0 × 20," _
& vbCrLf & vbCrLf _
& "if ($ ARGV
  • ) {" _

& vbCrLf _
+ vbTab & "computadora de US $ = $ ARGV
  • ;" _

& vbCrLf _
& "} else {" _
& vbCrLf _
& vbTab & "$ equipo =" "". "," _
& vbCrLf _
& "}" _
& vbCrLf & vbCrLf _
& "my $ objWMIService = Win32 :: OLE-> GetObject (" "winmgmts :/ / $ computer/root/CIMV2" ") or die", "no conexión WMI \ n". "," _
y vbCrLf _
& "mi colItems $ = $ objWMIService-> ExecQuery (" "SELECT * FROM" & miClase & "" "" "WQL" ", wbemFlagReturnImmediately | wbemFlagForwardOnly);" _
& vbCrLf & vbCrLf _
& "foreach my $ objItem (en $ colItems) {"_
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "print" "" & CreateLine (objProperty.Name) & "" "".
Si objProperty.IsArray = True Then strCode strCode = & "join (" "," " , (en "
strCode strCode = & "$ objItem-> {" y objProperty.Name y "}"
Si objProperty.IsArray = True Then strCode strCode = & "))"
= strCode strCode & ". "" \ N "", "& vbCrLf
Next
 
strCode strCode = _
& vbTab & "print" "\ n" "," _
& vbCrLf _
& "}" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowPowerShellCode (MyClass)
Set objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Establecer objClass = objWMIService.Get (MyClass)
 
strCode = "# WMI consulta a la lista de todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "# Este script de PowerShell se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
+ "# You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "param ([string] $ strComputer =" "." ")" _
& vbCrLf & vbCrLf _
& "= US $ colItems Get-WmiObject-clase "" "& miClase &" ""-espacio de nombres "," root \ cimv2 ""-computername $ strComputer "_
& vbCrLf & vbCrLf _
& "foreach ($ objItem en $ colItems) {" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "write-host" "" & CreateLine (objProperty.Name) & "" "$ objItem." y objProperty.Name & vbCrLf
Next
 
strCode strCode = _
& vbTab & "write-host" _
& vbCrLf _
& "}" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowPythonCode (MyClass)
'código Python sobre la base de 2,0 Scriptomatic Código generado por el
'You are not allowed to view links. Register or Login
objWMIService Set = GetObject ("winmgmts : {ImpersonationLevel = impersonate} root/cimv2 ")
Set objClass = objWMIService.Get (MyClass)
 
strCode = "#! python "_
& vbCrLf & vbCrLf _
& "# WMI consulta a la lista de todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "# Este script Python se ha generado utilizando el generador de código de WMI, Versión" y WMIGen . Versión _
& vbCrLf _
& "# You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "importación win32com.client" _
& vbCrLf & vbCrLf _
& "strComputer =" "." "" _
& vbCrLf & vbCrLf _
& "objWMIService win32com.client.Dispatch = (" "WbemScripting.SWbemLocator" ")" _
& vbCrLf _
& "= objSWbemServices objWMIService.ConnectServer (strComputer", "root/cimv2" ")" _
& vbCrLf _
& "colItems objSWbemServices.ExecQuery = (" "SELECT * FROM" & miClase & "" ")" _
& vbCrLf & vbCrLf _
& "para objItem en colItems:" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
Si objProperty.IsArray = True Then
strCode = strCode & vbTab & "strlist =" "" "" _
& vbCrLf _
& vbTab & "try:" _
& vbCrLf _
& vbTab & vbTab & "para . objElem en objItem "y objProperty.Name &": "_
& vbCrLf _
& vbTab & vbTab & vbTab & "strlist strlist = +` + `objElem" "" "" _
& vbCrLf _
& vbTab & "con excepción de:" _
& vbCrLf _
& vbTab & vbTab & "strlist strlist = + 'nulo'" _
& vbCrLf _
& vbTab & "print" "" & CreateLine (objProperty.Name) & "" "+ strlist" _
& vbCrLf
Else
strCode = strCode _
& vbTab & "si objItem." y objProperty.Name & "= None:" _
& vbCrLf _
& vbTab & vbTab & "print" "" & CreateLine (objProperty.Name) & "" "+` objItem. "& objProperty.Name y" `" _
& vbCrLf
End If
Next
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowRubyCode (MyClass)
Set objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Establecer objClass = objWMIService.Get (MyClass)
 
strCode = "# WMI consulta a la lista de todas las propiedades y valores de la" y miClase y "clase" _
& vbCrLf _
& "# Este script Ruby se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
+ "# You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "requieren" win32ole '"_
& vbCrLf & vbCrLf _
& "objWMIService WIN32OLE.connect = (" "winmgmts :/ /. "") "_
& vbCrLf _
& "colItems objWMIService.ExecQuery = (" "SELECT * FROM" & miClase & "" ")" _
& vbCrLf & vbCrLf _
& "para objItem en colItems hacer" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "pone" "" & CreateLine (objProperty.Name) & "# {objItem". objProperty.Name y & "}" "" & vbCrLf
Next
 
strCode strCode = _
& vbTab & "pone" _
& vbCrLf _
& "fin" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowVBDotNETCode (MyClass)
Const wbemCIMTypeSint16 = 2 'Firmado entero de 16 bits
Const wbemCIMTypeSint32 = 3 'Firmado entero de 32 bits
Const wbemCIMTypeReal32 = 4 '32-bit número real
Const wbemCIMTypeReal64 = 5 '64 -bit número real
Const wbemCIMTypeString = 8 'String
Const wbemCIMTypeBoolean = 11 'Valor booleano
Const wbemCIMTypeObject = 13 'CIM objeto
Const wbemCIMTypeSint8 = 16 'Entero de 8 bits sin signo
Const wbemCIMTypeUint8 = 17 'sin signo de 8 bits sin signo
Const wbemCIMTypeUint16 = 18 'sin firmar entero de 16 bits
Const wbemCIMTypeUint32 = 19 'sin signo de 32 bits sin signo
Const wbemCIMTypeSint64 = 20 'Firmado entero de 64 bits
Const wbemCIMTypeUint64 'sin signo de 64 bits = 21
Const wbemCIMTypeDatetime = 101 'valor fecha / hora
= 102 Const wbemCIMTypeReference "La referencia a un objeto CIM
Const wbemCIMTypeChar16 = 103 '16-bit de carácter
 
Establecer objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Set objClass = objWMIService.Get (MyClass)
 
strCode = "" consulta WMI para enumerar todas las propiedades y valores de la "y miClase y" clase "_
& vbCrLf _
& "'Esta VB. NET se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
& "'You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "Imports System" _
& vbCrLf _
& "System.Management importaciones" _
& vbCrLf & vbCrLf _
& "Espacio de nombres WMIGen___ "& _ miClase
& vbCrLf _
& vbTab & "WMIGenQuery Public Class" _
& vbCrLf _
& vbTab & vbTab & "sobrecarga Public Shared Function Main () As Integer" _
& vbCrLf _
& vbTab & vbTab & vbTab & "Try" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "buscador As New ManagementObjectSearcher (" "root \ cimv2" "", "SELECT * FROM" & miClase & "" ")" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "arrPropertyInt Dim () Como UInt16" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "arrPropertyStr Dim () As String" _
& vbCrLf & vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Para Cada queryObj Como ManagementObject En searcher.Get () "_
& vbCrLf
 
 
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & vbTab & vbTab & vbTab & vbTab
Si objProperty.IsArray = True Then
intCIMType = objProperty.CIMType
strCIMType = "String"
strArrayPr = "arrPropertyStr"
Si intCIMType <8 Entonces strCIMType = " UInt16 "
Si intCIMType> 15 y intCIMType <100 Luego strCIMType = "UInt16"
Si strCIMType = "UInt16" Entonces strArrayPr = "arrPropertyInt"
strCode strCode = _
& "Si queryObj (" "" & objProperty.Name & "" ") es Nada Entonces "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.WriteLine (" "" & CreateLine (objProperty.Name) & "{0}" ", queryObj (" "" & objProperty . Nombre & "" "))" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "Else" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & strArrayPr & "= queryObj ( "" "& objProperty.Name &" "") "_
& vbCrLf
Si strCIMType = "UInt16" Entonces
strCode strCode = _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "ReDim arrPropertyStr (UBound (arrPropertyInt))" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "For i = 0 To UBound (arrPropertyInt)" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "arrPropertyStr ( i) = CStr (arrPropertyInt (i)) "_
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Siguiente" _
& vbCrLf
End If
strCode strCode = _
& vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & "Console.WriteLine (" "" & CreateLine (objProperty.Name) & "{0}" ", Join (arrPropertyStr," ";" "))" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & vbTab & "End If" _
& vbCrLf
Else
strCode strCode = & "Console.WriteLine (" "" & CreateLine (objProperty.Name) & "{0}" ", queryObj (" "" & objProperty.Name & "" "))" & vbCrLf
End If
Next
strCode strCode = _
& vbTab & vbTab & vbTab & vbTab & "Siguiente" _
& vbCrLf _
& vbTab & vbTab & vbTab & "Catch err Como ManagementException" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Console.OpenStandardError ()" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Console.WriteLine (" "Se produjo un error al consultar WMI:" "& err.Message)" _
& vbCrLf _
& vbTab & vbTab & vbTab & vbTab & "Console.OpenStandardOutput ()" _
& vbCrLf _
& vbTab & vbTab & vbTab & "Prueba Final" _
& vbCrLf _
& vbTab & vbTab & "End Function" _
& vbCrLf _
+ vbTab & "End Class" _
& vbCrLf _
& "End Namespace" _
vbCrLf &
 
Code.Value = strCode
ButtonState Falso
End Sub
Sub ShowVBScriptCode (MyClass)
'IsArray un Join () la funcionalidad de "prestado" de Scriptomatic 2,0
'
objWMIService = GetObject ("winmgmts: {ImpersonationLevel = impersonate} root/cimv2")
Set objClass = objWMIService.Get (MyClass)
 
strCode = "" consulta WMI para enumerar todas las propiedades y valores de la "y miClase y" clase "_
& vbCrLf _
& "'Este código de VBScript se ha generado utilizando el generador de código de WMI, Versión" y WMIGen.Version _
& vbCrLf _
+ "'You are not allowed to view links. Register or Login" _
& vbCrLf & vbCrLf _
& "On Error Resume Next" _
& vbCrLf & vbCrLf _
& "Const wbemFlagReturnImmediately = & H10" _
& vbCrLf _
& "Const wbemFlagForwardOnly = & H20 "_
& vbCrLf & vbCrLf _
& "Si WScript.Arguments.UnNamed.Count = 1 A continuación," _
& vbCrLf _
& vbTab & "strComputer = WScript.Arguments.UnNamed (1)" _
& vbCrLf _
& "Else" _
& vbCrLf _
& vbTab & "strComputer =" "." "" _
& vbCrLf _
& "End If" _
& vbCrLf & vbCrLf _
& "Set objWMIService = GetObject (" "winmgmts :/ /" "y strComputer &" "/ root/cimv2" ")" _
& vbCrLf _
& "colInstances Set objWMIService.ExecQuery = (" "SELECT * FROM" & miClase & "" "" "WQL" ", wbemFlagReturnImmediately + wbemFlagForwardOnly)" _
& vbCrLf & vbCrLf _
& "For Each objInstance En colInstances" _
& vbCrLf
 
Para cada objProperty En objClass.Properties_
strCode = strCode & vbTab & "WScript.Echo" "" & CreateLine (objProperty.Name) & "" "&"
Si objProperty.IsArray = True Then strCode strCode = & "Ingreso ("
strCode = strCode y "objInstance." y objProperty.Name
Si objProperty.IsArray = True Then strCode strCode = & "," "," ")"
= strCode strCode & vbCrLf
Next
 
strCode strCode = _
& vbTab & "WScript.Echo" _
& vbCrLf _
& "Siguiente" _
& vbCrLf
 
Code.Value = strCode
ButtonState Falso
End Sub
TextFromHTML función (URL)
'rutina básica tomada de You are not allowed to view links. Register or Login
'Mejora de la rutina de esperar-hasta-el-listo para HTA por McKirahan de
'
 
Set objIE = CreateObject ("InternetExplorer.Application")
URL objIE.Navigate
Mientras objIE.Busy
Wend
TextFromHTML = objIE.Document.Body.InnerText
objIE.Quit
End Function
Sub Window_OnLoad
AppVersion.InnerHTML = WMIGen.Version
document.title = "WMI Code generador "y WMIGen.Version
ButtonState verdadero
Si InStr (UCase (WMIGen.CommandLine), "/ NOPERF") Luego blnShowPerfClasses = False
If InStr (UCase (WMIGen.CommandLine), "/ WIN32") Luego blnShowAllClasses = False
FillClassDropDown
CheckWindowSize ()
CheckUpdate ()
CreateIEHelp ()
objIEHelp.Visible = 0
End Sub
Sub Window_Onunload
On Error Resume Next
objIEHelp.Quit
objIEHelp Set = Nothing
On Error Goto 0
End Sub
</ script>
 
<Body style = "font: 12 pt Arial; color: blanco; filtro: PROGID: DXImageTransform.Microsoft.Gradient (GradientType = 0, StartColorStr = '# 000000', EndColorStr = '# FFFFFF')" OnResize = "CheckWindowSize () ">
 
<div align="justify">
 
<span id="Update"> </ span>
 
<table border="0" cellspacing="10">
<tr align="center">
<º colspan = "2" title = "Seleccione una clase WMI de esta lista desplegable, a continuación, seleccione un lenguaje de script y pulse el "Generar Código" botón para mostrar el código de la consulta WMI seleccionado y el lenguaje de programación seleccionado en el área de texto inferior "align =" left "> Seleccionar una clase WMI: </ th>
</ tr>
<tr align = "center ">
<td colspan = "2" title = "Seleccione una clase WMI de esta lista desplegable, a continuación, seleccione un lenguaje de script y pulse el botón" Generar Código "botón para mostrar el código de la consulta WMI seleccionado y el lenguaje de programación seleccionado en el área de texto inferior "> <select onchange="HandleClassChange" name="WMIClasses" size="6" style="width: 100%"> </ select> </ td>
</ tr>
<tr align = " Center ">
<th title="Este lista muestra las propiedades disponibles para los seleccionados de WMI class" Propiedades align="justify"> </ td>
<título th = "Esta lista muestra los métodos disponibles para la clase de WMI seleccionado" align = "left"> Métodos: </ th>
</ tr>
<tr align="center">
<td style="width: 50%"> <select id = "Propiedades" title = "Esta lista muestra las propiedades disponibles de la clase seleccionada WMI "size =" 6 "style =" width: 100% "> </ select> </ td>
<td style="width: 50%"> <select id = "Métodos" title = "Este lista muestra los métodos disponibles para la clase seleccionada WMI "size =" 6 "style =" width: 100% "> </ select> </ td>
</ tr>
<tr align="center">
<º id = " CodeLabel "title =" Después de pulsar el "Generar Código" botón, el código generado para ver las propiedades disponibles y sus valores para la clase de WMI seleccionado se muestra aquí "align =" left "> Código: </ th>
<ª alineación = "right"> <input id = "GetHelpButton" onclick = "gethelp" type = "submit" value = "Ayuda" class = "Botón" title = "Pulse este botón para buscar y abrir la página de MSDN relevante para la clase seleccionada , el método y / o la propiedad "> </ td>
</ tr>
<tr align="center">
<td colspan="2"> <textarea id = "Código" rows = "20" cols = "70" de sólo lectura > </ textarea> </ td>
</ tr>
<tr align="justify">
<º colspan = "2" title = "Seleccione un lenguaje de script de la lista desplegable y pulse el botón" Generar Código "botón para muestran el código de la consulta WMI seleccionado y lenguaje de scripting en el área de texto de arriba "align =" left "> Seleccione un lenguaje de script:
nombre <select = "CodeLanguage" id = "CodeLanguage" onchange = "HandleLanguageChange ()" style = " text-align: left; margin-left: 0 ">
<option value="Batch"> lotes </ option>
<option value="CSharp"> C # </ option>
<option value="JScript"> JScript </ option>
<option value="KiXtart"> KiXtart </ option>
<option value="ObjectRexx"> ObjectRexx </ option>
<option value="Perl"> Perl </ option>
<option value="PowerShell"> PowerShell </ option>
<option value="Python"> Python </ option>
<option value="Ruby"> Rubí </ option>
<option value="VBDotNET"> VB. NET </ option>
<= valor de la opción " VBScript "> VBScript </ option>
</ select> </ td>
</ tr>
<tr align="center">
<td colspan="2">
entrada <id = "GenerateCodeButton" onclick = "ShowCode" type = "submit" value = "Generar código" class = "Botón" title = "Pulse este botón para generar el código que muestra las propiedades y sus valores para el seleccionado de clase WMI, en el lenguaje de script seleccionado">
<input id = " RunCodeButton "onclick =" EjecutarCódigo "type =" submit "value =" Ejecutar WMI Code "class =" Botón "title =" Pulse este botón para ejecutar el generado (VBScript) ">
<input id = "ClearCodeButton" onclick = " ClearCode "type =" submit "value =" Borrar "class =" Botón "title =" Pulse este botón para borrar el código generado ">
<input id = "CopyCodeButton" onclick = "CopyCode" type = "submit" value = " Copiar al portapapeles "class =" Botón "title =" Pulse este botón para copiar el código generado en el portapapeles "> </ td>
</ tr>
</ table>
 
<span style="font-size: 12pt"> <p> WMI Code Generator, versión <span id="AppVersion"> 0,00 </ span> </ span> <br>
© 2006 - 2010, Rob van der Woude <br>
<a href="You are not allowed to view links. Register or Login"> You are not allowed to view links. Register or Login </ a> </ p>
 
<p> Basado en el artículo de Microsoft TechNet scriptcenter
<a ojos href="You are not allowed to view links. Register or Login"> secuencias de comandos para el tipo GUI </ a>. < br>
Creado con la ayuda de WBEMTEST, los chicos del scripting de
<a href="You are not allowed to view links. Register or Login"> Scriptomatic </ a> y
<a Helpomatic </ a>
<a herramientas y Adersoft de href="You are not allowed to view links. Register or Login"> HTAEdit </ a>. <br>
función de búsqueda de ayuda sobre la base de
<a href = "You are not allowed to view links. Register or Login . google.com / "> Búsqueda de Google </ a> y se completa con la ayuda de
<a href="You are not allowed to view links. Register or Login"> Search Engine Roundtable </ a>. </ p>
 
</ Div>
 
</ Body>
</ html>



Fuente: cu-32
gratisprogramas.com
« Última modificación: Junio 04, 2012, 07:35:35 pm por zolo »
You are not allowed to view links. Register or Login

Tags:
Tags:

 


SMF 2.0.19 | SMF © 2016, Simple Machines
Paginas Afiliadas
Twitter - FaceBook - Daraxblog
Designed by Smf Personal