Power Builder - Listado de Software Instalado

 
Vista:

Listado de Software Instalado

Publicado por Jorge E (110 intervenciones) el 08/01/2007 16:26:57
saludos.
explico mi caso.
tengo mi proyecto armado para inventario de software y el primer paso en el desarrollo es obtener el software que está instalado en la pc donde se ejecuta el sistema que voy a desarrollar.
Pregunta:
Alguien save como obtener ese listado de software instalado ?
Existe algún archivo externo llámese un .ocx para tal acción ?

me basta obtener el nombre del producto si es posible obtener los demas datos como la vesión, proveedor, etc sería mucho mejor.

acepto todo tipo de sugerencia y ayuda.

Gracias.

Saludos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Listado de Software Instalado

Publicado por Jorge (900 intervenciones) el 08/01/2007 16:56:41
Hola
mira aqui te paso un scrtip usando vbscrip
probalo
Ojala te ayude

Saludos desde Argentina

SetPointer(HourGlass!)
String Maquina
string ls_message

Maquina = "xxx.xxx.xxx.xxx"

OLEObject ole_wsh

ole_wsh = CREATE OLEObject
ole_wsh.ConnectToNewObject("MSScriptControl.ScriptControl")
ole_wsh.Language = "vbscript"
ole_wsh.AddCode('Function rtnSoftwares()~r~n' &
+ 'SoftwareList = "" ~r~n' + &
+ 'strComputer = "'+Maquina+'"~r~n' + &
+ 'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")~r~n' &
+ 'Set colItems = objWMIService.ExecQuery("Select * from Win32_Product")~r~n' &
+ 'For Each objItem in colItems~r~n' &
+ 'SoftwareList = SoftwareList & " , " & objItem.Name & + "(" & _~r~n' &
+ 'objItem.Version & ")"~r~n' &
+ 'Next~r~n' &
+ 'rtnSoftwares = SoftwareList~r~n' &
+ 'End Function')
If Isnull(ole_wsh.Eval("rtnSoftwares")) = True Then
MessageBox("Nulo","")
Else
ls_message = ole_wsh.Eval("rtnSoftwares")
End if

String Replace
String Find
long Start_pos =1

Find = " , "
Replace = "~r~n"

start_pos = Pos(ls_message,Find,Start_Pos)
DO WHILE start_pos > 0
// Replace old_str with new_str.
ls_message = Replace(ls_message, start_pos,Len(find),Replace)
// Find the next occurrence of old_str.
start_pos = Pos(ls_message, Find,start_pos+Len(Replace))
LOOP
mle_1.Text=String(ls_message)
ole_wsh.DisconnectObject()
DESTROY ole_wsh
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar