Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
CurrentDirectory = objFSO.GetAbsolutePathName(".")
Set oShellSO = CreateObject("WScript.Shell")
If oShellSO.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") = "AMD64" Then  
	shellCommand="msiexec /i " & Chr(34) & CurrentDirectory&"\plugin64.msi" & Chr(34) & " /qb+! targetDIR=" & Chr(34) & CurrentDirectory&"\temp" & Chr(34) & " /l* install.log /norestart"
else
	shellCommand="msiexec /i " & Chr(34) & CurrentDirectory&"\plugin.msi" & Chr(34) & " /qb+! targetDIR=" & Chr(34) & CurrentDirectory&"\temp" & Chr(34) & " /l* install.log /norestart"
end if	
Set oShell=CreateObject("Wscript.Shell")
iReturn=oShell.run(shellCommand,0,true)
If iReturn = 2 Then
	wscript.echo "No debe cancelar la instalación, favor instalar nuevamente " & iReturn
ElseIf iReturn = 3010 Then
	Set objShell=CreateObject("Shell.Application")
	shellCommand="/K netsh wlan add profile filename="&Chr(34)&CurrentDirectory&"/UCSC-Alumnos.xml"&chr(34)&""
	objShell.ShellExecute "cmd.exe", shellCommand, "","runas", 0
	 
	MsgBox "Para terminar con la instalación, favor Reiniciar el Equipo.", vbOKOnly, "Instalación UCSC Wifi"
Else 
	MsgBox "Ha ocurrido un error , favor intentar nuevamente o contactar a soporte, codigo de Error " & iReturn, vbOKOnly, "Instalación UCSC Wifi"
End if
Set WinScriptHost = Nothing