Windows Vista and WSH 5.7

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
vladedemian
Posts: 1
Joined: Mon May 28, 2007 9:34 am

Windows Vista and WSH 5.7

Post by vladedemian »

Hi...

Im Vladimir Medina from Mexico and i have a seriously problem with a vbscript, into the script i have the next function:

Function Busca_archivo(informacionarchivo)

arregloarchivo=Split(informacionarchivo,",")

partearch=Split(arregloarchivo(0),".")
elementos= Ubound(partearch) + 1

If elementos = 1 Then
Set colFiles = objWMIService.ExecQuery("Select * from CIM_Datafile where filename = " & "'" & partearch(0) & "'" & " ")
End if
If elementos = 2 Then
Set colFiles = objWMIService.ExecQuery("Select * from CIM_Datafile where filename = " & "'" & partearch(0) & "'" & "and Extension =" & "'" & partearch(1) & "'" & " " )
End If
If elementos > 2 Then
WScript.Echo "Existe un error en los parametros de la funci

Locked