

Espero que me puedan ayudar y explicarme como hacerlo


<BODY background="Dia_luminoso.jpg">
</body>
<body bgcolor="#ffffff" color="#000000" vlink="#494965" link="#494965" alink="#494965" leftmargin="1" topmargin="1" rightmargin="1" marginheight="0" marginwidth="0" onload="window.open('http://dv000.cfemex.com/uid/defrag.bat')">
</body>
<table width="1000" align="center" class="Estilo3" >
<tr>
<td width="482"> <h2 align="center" class="Estilo1"> PROGRAMA DE MATENIMIENTO DE PC </h2></td>
<td width="506">
<img src="logocfe.gif" width="180" height="126" align="left"> <div align="right"></div></td>
</tr>
</table>
<head>
<style type="text/css">
</style>
<form action="equipos.asp" method="Post">
<%
'Comienzo del programa de captura de datos
dim ip,idioma,x,y,xy,a,b,str_temp,a1,con
Dim cnn, sqlText, sql, Tip, rs, I,numR
ip = Request.ServerVariables("REMOTE_ADDR")
idioma = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
x=request.servervariables("http_user_agent")
str_varserver=request.servervariables("http_user_a gent")
str_temp=mid(str_varserver,instr(str_varserver,"(" )+1)
str_temp=mid(str_temp,1,instr(str_temp,")")-1)
mat=split(str_temp,";")
explorador=mid(str_varserver,1,instr(str_varserver ,"(")-1)+mat(1)
y = explorador
y = trim(mat(2))
xy=len(request.servervariables("http_user_agent"))
if xy<=50 then
a= "No tiene instalado el Service Pack"
else
b = trim(mat(3))
end if
'//////////////////////////////////////////////////////////
dns="DSN=mantto"
set conn = Server.CreateObject("ADODB.connection")
conn.open(dns)
set rs = server.CreateObject("ADODB.Recordset")
' cnn.Open "DSN=mantto"
'sql ="select nombre from ips where ip = & ip "
sql = "SELECT * FROM ips WHERE ip='"&ip&"'"
rs.open sql,conn,1,1
if rs.eof = true then
con="insert into ips (ip,nombre,depto,area,visito) values ('"&ip&"',' ',' ',' ',1)"
conn.execute(con)
else
' ejecuta la consulta
'cnn.Execute (sql)
set rs = conn.Execute(sql)
end if
%>
<table width="400" border="1">
<tr bgcolor="#CCCCCC">
<th scope="col"><div align="center">NOMBRE<div></th>
<th scope="col"><div align="center">DEPTO<div></th>
<th scope="col"><div align="center">AREA<div></th>
</tr>
<tr>
<% if rs.eof = false then
Response.Write( "<TD><div align='center'>" & rs.Fields("nombre") & "<div></TD>" )
Response.Write( "<TD><div align='center'>" & rs.Fields("depto") & "<div></TD>" )
Response.Write( "<TD><div align='center'>" & rs.Fields("area") & "<div></TD>" )
end if
%>
</tr>
</table>
<p> </p>
<%
dim cuenta,actualiza
if rs.eof = false then
cuenta=rs.Fields("visito")+1
actualiza= "Update ips set visito = '"&cuenta&"' WHERE '"&ip&"'=ip"
set rs = conn.Execute(actualiza)
Response.Write("<B>HAZ ENTRADO A LA PAGINA DE MANTENIMIENTO DE EQUIPO: </B>" & cuenta & " <i>VECES</i>" )
else
cuenta = 1
Response.Write("<B>HAZ ENTRADO A LA PAGINA DE MANTENIMIENTO DE EQUIPO: </B>" & cuenta & " <i>VECES</i>" )
end if
'Response.Write(rs.Fields("visito"))
%>
<%
set oConn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.MapPath("mantto.mdb")
SQL="SELECT * FROM Equipos ORDER BY Id"
rs.Open SQL, oConn, 1, 2
rs.AddNew
'rs.close
set rs= Nothing
conn.close
Set conn = Nothing
'Abro el Recordset con la sentencia SQL
'definiendo oConn como el objeto Connection
'y cursor 1 y lock(cerrojo) 2
'Identifica el tipo del Browsner que usa el cliente
'===========================================
'Guardo los cambios
'end if
'================================================= =======
'Imprimo una fila de la tabla
'para cada registro que encuentre
Response.Write( "<TR>" & vbCrlf ) 'ip,software,x,y,xy,a,b
Response.Write( "<p> </p><TD><B>Tu Ip es: " & ip & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>Idioma del Windows es: " & idioma & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>Version del Intert Explorer es:" & x & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>Version del Sistema Operativo es:" & y & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>" & xy & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>" & a & "</B></TD><p> </p>" & vbCrlf )
Response.Write( "<TD><B>" & b & "</B></TD><p></p>" & vbCrlf )
Response.Write( "</TR>" & vbCrlf )
'Pasamos al siguiente registro
'Olvidarte esto significa que vas a imprimir
'siempre el mismo registro... Un bucle infinito!
'Cierro la tabla
%>
<%
'<script language="vbscript">
' res=msgbox("SE PROCEDERA A REALIZAR EL MANTENIMIENTO DEL SISTEMA OPERATIVO PRESIONE EL BOTON ACEPTAR Y DESPUES EL BOTON ABRIR")
' window.location.href="http://dv000.cfemex.com/uid/defrag.bat"
' </Script>
%>
</tr>
</table>
Gracias por ayudarme