Actually -
I needed to look back at my post here when I upgraded to the newest version, and to a new server.
The file that I changed was: it-compdetail.aspx
My changed file is as follows:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
runat="Server"
id="dscomputers"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.Web301comp"
CurrentPage='<%# IIf((Request.QueryString("dscomputers_CurrentPage") <> Nothing), Request.QueryString("dscomputers_CurrentPage"), 0) %>'
PageSize="25"
Debug="true"
><Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@comp" Value='<%# request("comp") %>' Type="VarChar" Direction="Input" />
</Parameters></MM:DataSet>
<MM:DataSet
runat="Server"
id="dswol"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.web30getWOL"
Debug="true"
>
<Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@comp" Value='<%# request("comp") %>' Type="VarChar" Direction="Input" />
</Parameters>
</MM:DataSet>
<MM:DataSet
runat="Server"
id="dsasset"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.web30getasset"
Debug="true"
>
<Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@vendor" Value='<%# dscomputers.FieldValue("Vendor", nothing) %>' Type="VarChar" Direction="Input" />
</Parameters>
</MM:DataSet>
<MM:DataSet
runat="Server"
id="dwActiveDirectory"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Lansweeper") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_Lansweeper") %>'
CommandText="dbo.Web30GetAD"
Debug="true"
>
<Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
<Parameter Name="@comp" Value='<%# request("comp") %>' Type="VarChar" Direction="Input" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<link href="css/ls.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/computerbig.gif" width="50" height="50" hspace="4" /></td>
<td><table border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="lijntje"><font size="4"><strong><%=request("comp")%> (<%# dscomputers.FieldValue("Description", Container) %>)</strong></font></td>
</tr>
<tr>
<td><span class="bigt" >Action screen </span></td>
</tr>
</table></td>
</tr>
</table>
<%server.execute("inc-comptitel.aspx?" & request.ServerVariables("QUERY_STRING"))%>
<table border="0" cellspacing="4" cellpadding="0">
<tr>
<td rowspan="5" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td><%server.execute("actions.aspx?" & request.ServerVariables("QUERY_STRING") & "&domain=" & dscomputers.FieldValue("Domain", nothing) & "&username=" & dscomputers.FieldValue("username", nothing) & "&userdomain=" & dscomputers.FieldValue("userdomain", nothing) & "&tag=" & dscomputers.FieldValue("tag", nothing) )%></td>
</tr>
</table><br /></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<% Dim tel As Integer
Dim mycolumn As System.Data.DataColumn
Dim myrow As System.Data.DataRow
myrow = dscomputers.DefaultView.Table.Rows(0)
tel = 1%>
<% For Each mycolumn In dscomputers.DefaultView.Table.Columns%>
<%if lcase(mycolumn.Caption) <> "notscanned" and lcase(mycolumn.Caption) <> "lastseen" and lcase(mycolumn.Caption)<> "username" and lcase(mycolumn.Caption)<> "userdomain" and lcase(mycolumn.Caption)<> "displayname" then%>
<tr <%if (tel mod 2) = 0 then%>class="ne"<%end if%>>
<td align="right" class="lijntje"><strong><%=mycolumn.Caption %>:</strong> </td>
<td class="lijntje"><%=myrow(mycolumn.Caption)%> </td>
</tr>
<%tel = tel + 1%>
<%end if%>
<%next%>
</table></td>
<td valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr>
<td align="right" class="lijntje"><strong>Last seen:</strong> </td>
<td class="lijntje"><%# dscomputers.FieldValue("Lastseen", Container) %></td>
</tr>
<tr class="ne">
<td align="right" class="lijntje"><strong>Domain:</strong> </td>
<td class="lijntje"><%# dscomputers.FieldValue("Userdomain", Container) %> </td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Username:</strong> </td>
<td class="lijntje"><%# dscomputers.FieldValue("Username", Container) %> </td>
</tr>
<tr class="ne">
<td colspan="2" align="center" valign="top" class="lijntje"><a href="default.aspx?item=userdetail&username=<%# dscomputers.FieldValue("Username", Container) %>&userdomain=<%# dscomputers.FieldValue("userdomain", Container) %>"><img src="smallthumb.aspx?user=<%# dscomputers.FieldValue("Username", Container) %>&domain=<%# dscomputers.FieldValue("Userdomain", Container) %>&size=150" border="0" class="picbox"></a></td>
</tr>
<tr >
<td colspan="2" align="center" valign="top" class="lijntje"><a href="default.aspx?item=userdetail&username=<%# dscomputers.FieldValue("Username", Container) %>&userdomain=<%# dscomputers.FieldValue("userdomain", Container) %>"><%# dscomputers.FieldValue("Displayname", Container) %></a></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<tr >
<td width="16" class="lijntje"><img src="icons/AD.gif" width="16" height="16" /></td>
<td width="100%" class="lijntje"><strong>Active Directory information</strong></td>
</tr>
<tr>
<td colspan="2" class="lijntje"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
<tr class="ne">
<td align="right" class="lijntje"><strong>FQDN:</strong> </td>
<td class="lijntje"><%# dwActiveDirectory.FieldValue("DNSHostname", Container) %> </td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Description:</strong> </td>
<td width="100%" class="lijntje"><%# dwActiveDirectory.FieldValue("Description", Container) %> </td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>Location:</strong> </td>
<td width="100%" class="lijntje"><%# dwActiveDirectory.FieldValue("Location", Container) %> </td>
</tr>
<tr class="ne" >
<td align="right" class="lijntje"><strong>Company:</strong> </td>
<td width="100%" class="lijntje"><%# dwActiveDirectory.FieldValue("Company", Container) %> </td>
</tr>
<tr >
<td align="right" class="lijntje"><strong>OU:</strong> </td>
<td class="lijntje"><%# dwActiveDirectory.FieldValue("OU", Container) %> </td>
</tr>
<tr class="ne" >
<td align="right" class="lijntje"><strong>Comments:</strong> </td>
<td class="lijntje"><%# dwActiveDirectory.FieldValue("Comment", Container) %> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr><%if dsasset.recordcount <> 0 then%>
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<%tel=1%>
<tr <%if (tel mod 2) = 0 then%>class="ne"<%end if%>>
<td class="lijntje"><img src="icons/people.gif" width="16" height="16" /></td>
<td class="lijntje"><strong>Vendor support link</strong></td>
</tr>
<%
tel = 2%>
<% For Each myrow In dsasset.DefaultView.Table.Rows%>
<tr <%if (tel mod 2) = 0 then%>class="ne"<%end if%>>
<td width="16" class="lijntje"><img src="icons/assettag.gif" width="16" height="16" /></td>
<% If (myrow("vendor") = "HP") Or (myrow("vendor") = "Hewlett-Packard") Then%>
<td class="lijntje"><a href="<%=replace(myrow("assetlink"),"{model}",dscomputers.FieldValue("Model", nothing))%>" target="_blank"><%=myrow("vendor")%> : <%# dscomputers.FieldValue("Model", Container) %></a></td>
<% Else%>
<td class="lijntje"><a href="<%=replace(myrow("assetlink"),"{assettag}",dscomputers.FieldValue("Tag", nothing))%>" target="_blank"><%=myrow("vendor")%> : <%# dscomputers.FieldValue("Tag", Container) %></a></td>
<% End If %>
</tr>
<%tel = tel + 1%>
<%next%>
</table></td>
</tr>
</table></td>
</tr><%end if%>
<%if dswol.recordcount <> 0 then%><tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF" class="borderbox">
<%tel=1%>
<tr <%if (tel mod 2) = 0 then%>class="ne"<%end if%>>
<td class="lijntje"><img src="icons/network.gif" width="16" height="16" /></td>
<td class="lijntje"><strong>Network Wake On Lan </strong></td>
<td class="lijntje"><strong>Mac Address </strong></td>
</tr>
<%
tel = 2%>
<% For Each myrow In dswol.DefaultView.Table.Rows%>
<tr <%if (tel mod 2) = 0 then%>class="ne"<%end if%>>
<td width="16" class="lijntje"><img src="icons/device.gif" width="16" height="16" /></td>
<td class="lijntje"><a href="javascript:runApp('\\\\stingray\\Support\\Private\\IT Programs\\LSTools\\wol.exe <%=replace(myrow("macaddress"),":","")%>','true');"><%=myrow("description")%></a> </td>
<td class="lijntje"><%=myrow("macaddress")%> </td>
</tr>
<%tel = tel + 1%>
<%next%>
</table></td>
</tr>
</table></td>
</tr><%end if%>
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="box">
<tr>
<td valign="top"><%server.execute("compindashboard.aspx?" & request.ServerVariables("QUERY_STRING"))%></td>
<td valign="top"><%server.execute("scannedpc.aspx?" & request.ServerVariables("QUERY_STRING"))%></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
The specific Change was made to:
<% If (myrow("vendor") = "HP") Or (myrow("vendor") = "Hewlett-Packard") Then%>
<td class="lijntje"><a href="<%=replace(myrow("assetlink"),"{model}",dscomputers.FieldValue("Model", nothing))%>" target="_blank"><%=myrow("vendor")%> : <%# dscomputers.FieldValue("Model", Container) %></a></td>
<% Else%>
<td class="lijntje"><a href="<%=replace(myrow("assetlink"),"{assettag}",dscomputers.FieldValue("Tag", nothing))%>" target="_blank"><%=myrow("vendor")%> : <%# dscomputers.FieldValue("Tag", Container) %></a></td>
<% End If %>
Since the HP Laptops & Servers use the {model} instead of the {assettag} the IF / Else clause was added to query the DB for the {model} of "HP" or "Hewlett-Packard".
In the DB itself, I added the following two lines for HP (tsysassetlinks)
Hewlett-Packard http://h20180.www2.hp.com/apps/Lookup?h_pagetype=s-001&lang=en&cc=us&h_lang=en&h_cc=en&&h_query={model}
HP http://h20180.www2.hp.com/apps/Lookup?h_pagetype=s-001&lang=en&cc=us&h_lang=en&h_cc=en&&h_query={model}
HP uses a really confusing search pattern that formats the link returned from the search to something unusable to Lansweeper's search.
I have a few IBM servers that I wasn't able to figure out how to actually search for. Any ideas on that? If IBM uses the model tag as well, you should just be able to add
If (myrow("vendor") = "HP") Or (myrow("vendor") = "Hewlett-Packard") Or (myrow("vendor") = "IBM") Or (myrow("vendor") = "Lenovo")
To the first If Statement
Hope this helps.
-Kyle