bsharath
asked on
Hta file to search the computer and user in the specific seat
Hi,
I always update the Ads Computers location and Users Office box with the location.
So when it comes to finding who is seated there it becomes difficult.Any way i have a Hta file that has a box where in i can type the Seat (Location) data and it gets both the user and the computer in the specific seat.
When seat no enered i need to get the users and computers all possible details on the screen
If they are not found then i can assume they are free seats and allot to some one.
In the last a 2 boxes one for computer and other for User which can fetch all the users and computer seat no's with all possible details to a excel..
If required i can even check them on th excel...
Regards
Sharath
I always update the Ads Computers location and Users Office box with the location.
So when it comes to finding who is seated there it becomes difficult.Any way i have a Hta file that has a box where in i can type the Seat (Location) data and it gets both the user and the computer in the specific seat.
When seat no enered i need to get the users and computers all possible details on the screen
If they are not found then i can assume they are free seats and allot to some one.
In the last a 2 boxes one for computer and other for User which can fetch all the users and computer seat no's with all possible details to a excel..
If required i can even check them on th excel...
Regards
Sharath
ASKER
Yes Rob exactly corect...
ASKER
Rob these are some Questions that have not been commented till end...Can you please have a look and see if you can help on this... Sorry to trouble you so much... I am not able to help reducing asking questions as there is so much requirment for such solutions as man power here is so limited and so much jobs to do.And easy ways to do a job as you provide is so useful to us that we are able to manage with such less man power with working time also reduced.
https://www.experts-exchange.com/questions/22898775/Login-script-to-get-all-possible-details-from-the-machine.html
https://www.experts-exchange.com/questions/22893275/Add-Administrator-to-the-defalt-shares-in-the-remote-machine.html
https://www.experts-exchange.com/questions/22911941/Create-Users-and-Contact-with-1-script.html
https://www.experts-exchange.com/questions/22908282/Login-script-that-can-update-the-today's-installed-softwares-to-a-csv-file-with-the-sheetname-to-todays-date.html
https://www.experts-exchange.com/questions/22912145/Ads-to-update-just-what-is-mentioned-in-the-excel.html
https://www.experts-exchange.com/questions/22898775/Login-script-to-get-all-possible-details-from-the-machine.html
https://www.experts-exchange.com/questions/22893275/Add-Administrator-to-the-defalt-shares-in-the-remote-machine.html
https://www.experts-exchange.com/questions/22911941/Create-Users-and-Contact-with-1-script.html
https://www.experts-exchange.com/questions/22908282/Login-script-that-can-update-the-today's-installed-softwares-to-a-csv-file-with-the-sheetname-to-todays-date.html
https://www.experts-exchange.com/questions/22912145/Ads-to-update-just-what-is-mentioned-in-the-excel.html
ASKER
Hope you will undersatnd...:-)
OK Sharath, I'll have a look when I get a chance....perhaps tomorrow....
Is the Seat Number is the Location field of a Computer Object, or the Office location of a User object, and is there any more data in that same field, or is it just a number?
Regards,
Rob.
Is the Seat Number is the Location field of a Computer Object, or the Office location of a User object, and is there any more data in that same field, or is it just a number?
Regards,
Rob.
ASKER
For the Computers its the Location tab
For the Users its the office tab
So when the location entered in the HTa it has to query the above two fields and get all the rest data
For the Users its the office tab
So when the location entered in the HTa it has to query the above two fields and get all the rest data
ASKER
Rob can look on this please..
Get some error in this code
https://www.experts-exchange.com/questions/22929011/Need-some-additions-in-this-code-User-creation.html
Get some error in this code
https://www.experts-exchange.com/questions/22929011/Need-some-additions-in-this-code-User-creation.html
Sharath, this should work for Users details, but I need to think about how to combine users details and computer details......would you happy for me to use a radio button, and you select whether your search is on a computer, or on a user? While still complicated, that would be the easiest......
<head>
<title>User and Computer Information</title>
<HTA:APPLICATION
APPLICATIONNAME="User and Computer Information"
BORDER="thin"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>
</head>
<script language="VBScript">
' Global variables
Dim arrRows
Sub Window_OnLoad
intWidth = 800
intHeight = 600
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 2) - (intWidth / 2)),((Screen.Height / 2) - (intHeight / 2))
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi lity = "Hidden"
btnPreviousEvent.Style.Vis ibility = "Hidden"
btnNextEvent.Style.Visibil ity = "Hidden"
btnLastEvent.Style.Visibil ity = "Hidden"
End Sub
Sub Default_Buttons
If Window.Event.KeyCode = 13 Then
btn_submit.Click
End If
End Sub
Sub Submit_Form
txt_name.Value = ""
txt_loginname.Value = ""
txt_email.Value = ""
txt_empid.Value = ""
txt_designation.Value = ""
txt_extensionno.Value = ""
txt_mobileno.Value = ""
txt_manager.Value = ""
txt_department.Value = ""
span_currentrecord.InnerHT ML = "0"
span_totalrecords.InnerHTM L = "0"
Set adoCommand = CreateObject("ADODB.Comman d")
Set adoConnection = CreateObject("ADODB.Connec tion")
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open "Active Directory Provider"
adoCommand.ActiveConnectio n = adoConnection
' Search entire Active Directory domain.
Set objRootDSE = GetObject("LDAP://RootDSE" )
strDNSDomain = objRootDSE.Get("defaultNam ingContext ")
strBase = "<LDAP://" & strDNSDomain & ">"
strFilter = "(&(objectCategory=person) (objectCla ss=user)(p hysicalDel iveryOffic eName=" & txt_seatnumsearch.Value & "))"
'strFilter = "(&(objectClass=computer)( cn=" & strComputer & "))"
' Comma delimited list of attribute values to retrieve.
strAttributes = "cn,samAccountName,mail,de scription, Title,Tele phoneNumbe r,Mobile,M anager,Dep artment"
' Construct the LDAP syntax query.
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
adoCommand.CommandText = strQuery
adoCommand.Properties("Pag e Size") = 100
adoCommand.Properties("Tim eout") = 30
adoCommand.Properties("Cac he Results") = False
' Run the query.
Set adoRecordset = adoCommand.Execute
' Enumerate the resulting recordset.
strDetails = ""
If Not adoRecordset.EOF Then
Do Until adoRecordset.EOF
If strDetails = "" Then
strDetails = Replace(adoRecordset.Field s("cn").Va lue, "CN=", "") &_
"|TD|" & adoRecordset.Fields("samAc countName" ).Value &_
"|TD|" & adoRecordset.Fields("mail" ).Value &_
"|TD|" & Join(adoRecordset.Fields(" descriptio n").Value) &_
"|TD|" & adoRecordset.Fields("Title ").Value &_
"|TD|" & adoRecordset.Fields("Telep honeNumber ").Value &_
"|TD|" & adoRecordset.Fields("Mobil e").Value
If IsNull(adoRecordset.Fields ("Manager" ).Value) = False Then
strDetails = strDetails & "|TD|" & Replace(Split(adoRecordset .Fields("M anager").V alue, ",")(0), "CN=", "")
Else
strDetails = strDetails & "|TD|"
End If
strDetails = strDetails & "|TD|" & adoRecordset.Fields("Depar tment").Va lue
Else
strDetails = strDetails & "|TR|" & Replace(adoRecordset.Field s("cn").Va lue, "CN=", "") &_
"|TD|" & adoRecordset.Fields("samAc countName" ).Value &_
"|TD|" & adoRecordset.Fields("mail" ).Value &_
"|TD|" & Join(adoRecordset.Fields(" descriptio n").Value) &_
"|TD|" & adoRecordset.Fields("Title ").Value &_
"|TD|" & adoRecordset.Fields("Telep honeNumber ").Value &_
"|TD|" & adoRecordset.Fields("Mobil e").Value
If IsNull(adoRecordset.Fields ("Manager" ).Value) = False Then
strDetails = strDetails & "|TD|" & Replace(Split(adoRecordset .Fields("M anager").V alue, ",")(0), "CN=", "")
Else
strDetails = strDetails & "|TD|"
End If
strDetails = strDetails & "|TD|" & adoRecordset.Fields("Depar tment").Va lue
End If
adoRecordset.MoveNext
Loop
Else
MsgBox "No records were found"
End If
' Clean up.
adoRecordset.Close
Set adoRecordset = Nothing
adoConnection.Close
If strDetails <> "" Then
arrRows = ""
arrRows = Split(strDetails, "|TR|")
If UBound(arrRows) < 0 Then
span_currentrecord.InnerHT ML = "0"
span_totalrecords.InnerHTM L = "0"
Else
arrData = Split(arrRows(0), "|TD|")
txt_name.Value = arrData(0)
txt_loginname.Value = arrData(1)
txt_email.Value = arrData(2)
txt_empid.Value = arrData(3)
txt_designation.Value = arrData(4)
txt_extensionno.Value = arrData(5)
txt_mobileno.Value = arrData(6)
txt_manager.Value = arrData(7)
txt_department.Value = arrData(8)
span_currentrecord.InnerHT ML = "1"
span_totalrecords.InnerHTM L = UBound(arrRows) + 1
End If
Else
span_currentrecord.InnerHT ML = "0"
span_totalrecords.InnerHTM L = "0"
End If
If strDetails = "" Then
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi lity = "Hidden"
btnPreviousEvent.Style.Vis ibility = "Hidden"
btnNextEvent.Style.Visibil ity = "Hidden"
btnLastEvent.Style.Visibil ity = "Hidden"
ElseIf UBound(arrRows) = 0 Then
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi lity = "Hidden"
btnPreviousEvent.Style.Vis ibility = "Hidden"
btnNextEvent.Style.Visibil ity = "Hidden"
btnLastEvent.Style.Visibil ity = "Hidden"
Else
btnFirstEvent.Disabled = False
btnPreviousEvent.Disabled = False
btnNextEvent.Disabled = False
btnLastEvent.Disabled = False
btnFirstEvent.Style.Visibi lity = "Visible"
btnPreviousEvent.Style.Vis ibility = "Visible"
btnNextEvent.Style.Visibil ity = "Visible"
btnLastEvent.Style.Visibil ity = "Visible"
End If
End Sub
Sub Get_Event
arrData = Split(arrRows(span_current record.Inn erHTML - 1), "|TD|")
txt_name.Value = arrData(0)
txt_loginname.Value = arrData(1)
txt_email.Value = arrData(2)
txt_empid.Value = arrData(3)
txt_designation.Value = arrData(4)
txt_extensionno.Value = arrData(5)
txt_mobileno.Value = arrData(6)
txt_manager.Value = arrData(7)
txt_department.Value = arrData(8)
End Sub
Sub First_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM L < 1 Then
MsgBox "There are no records to display"
ElseIf span_currentrecord.InnerHT ML = 1 Then
MsgBox "You are already viewing the first record."
Else
span_currentrecord.InnerHT ML = 1
Get_Event
End If
End If
End Sub
Sub Previous_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If span_currentrecord.InnerHT ML > 1 Then
span_currentrecord.InnerHT ML = span_currentrecord.InnerHT ML - 1
Get_Event
ElseIf span_currentrecord.InnerHT ML = 1 Then
MsgBox "You are already viewing the first record."
ElseIf txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
Else
MsgBox "There are no records to display"
End If
End If
End Sub
Sub Next_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM L = 0 Then
MsgBox "There are no records for to display"
ElseIf span_currentrecord.InnerHT ML = span_totalrecords.InnerHTM L Then
MsgBox "You are already viewing the last record."
Else
span_currentrecord.InnerHT ML = span_currentrecord.InnerHT ML + 1
Get_Event
End If
End If
End Sub
Sub Last_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM L = 0 Then
MsgBox "There are no records to display"
ElseIf span_currentrecord.InnerHT ML = span_totalrecords.InnerHTM L Then
MsgBox "You are already viewing the last record."
Else
span_currentrecord.InnerHT ML = span_totalrecords.InnerHTM L
Get_Event
End If
End If
End Sub
</script>
<body STYLE="font:14 pt arial; color:white;filter:progid: DXImageTra nsform.Mic rosoft.Gra dient
(GradientType=1, StartColorStr='#000033', EndColorStr='#0000FF')" onkeypress='vbs:Default_Bu ttons'>
<table width='90%' height = '100%' align='center' border='0'>
<tr>
<td align='center' colspan="2">
<h3>User and Computer Information</h3><br>
</td>
</tr
<tr>
<td align="right">
Enter a Seat Number:
</td>
<td>
<input type="text" maxlength="6" size="10" id="txt_seatnumsearch" name="txt_seatnumsearch">
     < input type="button" value="Submit" name="btn_submit" onClick="vbs:Submit_Form">
</td>
</tr>
<tr>
<td align='center' colspan="2">
<table>
<tr>
<td>
User Name:
</td>
<td>
<input type="text" maxlength="30" size="40" id="txt_name" name="txt_name">
</td>
</tr>
<tr>
<td>
Login Name:
</td>
<td>
<input type="text" maxlength="30" size="40" id="txt_loginname" name="txt_loginname">
</td>
</tr>
<tr>
<td>
Email Address:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_email" name="txt_email">
</td>
</tr>
<tr>
<td>
Emp ID:
</td>
<td>
<input type="text" maxlength="6" size="10" id="txt_empid" name="txt_empid">
</td>
</tr>
<tr>
<td>
Designation:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_designation" name="txt_designation">
</td>
</tr>
<tr>
<td>
Extension No:
</td>
<td>
<input type="text" maxlength="4" size="10" id="txt_extensionno" name="txt_extensionno">
</td>
</tr>
<tr>
<td>
Mobile Number:
</td>
<td>
<input type="text" maxlength="14" size="20" id="txt_mobileno" name="txt_mobileno">
</td>
</tr>
<tr>
<td>
Manager:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_manager" name="txt_manager">
</td>
</tr>
<tr>
<td>
Department:
</td>
<td>
<input type="text" maxlength="30" size="50" id="txt_department" name="txt_department">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<br>Showing record 
<span id="span_currentrecord">
0
</span>
 of 
<span id="span_totalrecords">
0
</span>
<br>
<input type='button' value='||< First' name='btnFirstEvent' onClick='vbs:First_Event'>        
<input type='button' value='<< Previous' name='btnPreviousEvent' onClick='vbs:Previous_Even t'> &n bsp &n bsp 
<input type='button' value='Next >>' name='btnNextEvent' onClick='vbs:Next_Event'>& nbsp & nbsp & nbsp
<input type='button' value='Last >||' name='btnLastEvent' onClick='vbs:Last_Event'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<head>
<title>User and Computer Information</title>
<HTA:APPLICATION
APPLICATIONNAME="User and Computer Information"
BORDER="thin"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>
</head>
<script language="VBScript">
' Global variables
Dim arrRows
Sub Window_OnLoad
intWidth = 800
intHeight = 600
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 2) - (intWidth / 2)),((Screen.Height / 2) - (intHeight / 2))
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi
btnPreviousEvent.Style.Vis
btnNextEvent.Style.Visibil
btnLastEvent.Style.Visibil
End Sub
Sub Default_Buttons
If Window.Event.KeyCode = 13 Then
btn_submit.Click
End If
End Sub
Sub Submit_Form
txt_name.Value = ""
txt_loginname.Value = ""
txt_email.Value = ""
txt_empid.Value = ""
txt_designation.Value = ""
txt_extensionno.Value = ""
txt_mobileno.Value = ""
txt_manager.Value = ""
txt_department.Value = ""
span_currentrecord.InnerHT
span_totalrecords.InnerHTM
Set adoCommand = CreateObject("ADODB.Comman
Set adoConnection = CreateObject("ADODB.Connec
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open "Active Directory Provider"
adoCommand.ActiveConnectio
' Search entire Active Directory domain.
Set objRootDSE = GetObject("LDAP://RootDSE"
strDNSDomain = objRootDSE.Get("defaultNam
strBase = "<LDAP://" & strDNSDomain & ">"
strFilter = "(&(objectCategory=person)
'strFilter = "(&(objectClass=computer)(
' Comma delimited list of attribute values to retrieve.
strAttributes = "cn,samAccountName,mail,de
' Construct the LDAP syntax query.
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
adoCommand.CommandText = strQuery
adoCommand.Properties("Pag
adoCommand.Properties("Tim
adoCommand.Properties("Cac
' Run the query.
Set adoRecordset = adoCommand.Execute
' Enumerate the resulting recordset.
strDetails = ""
If Not adoRecordset.EOF Then
Do Until adoRecordset.EOF
If strDetails = "" Then
strDetails = Replace(adoRecordset.Field
"|TD|" & adoRecordset.Fields("samAc
"|TD|" & adoRecordset.Fields("mail"
"|TD|" & Join(adoRecordset.Fields("
"|TD|" & adoRecordset.Fields("Title
"|TD|" & adoRecordset.Fields("Telep
"|TD|" & adoRecordset.Fields("Mobil
If IsNull(adoRecordset.Fields
strDetails = strDetails & "|TD|" & Replace(Split(adoRecordset
Else
strDetails = strDetails & "|TD|"
End If
strDetails = strDetails & "|TD|" & adoRecordset.Fields("Depar
Else
strDetails = strDetails & "|TR|" & Replace(adoRecordset.Field
"|TD|" & adoRecordset.Fields("samAc
"|TD|" & adoRecordset.Fields("mail"
"|TD|" & Join(adoRecordset.Fields("
"|TD|" & adoRecordset.Fields("Title
"|TD|" & adoRecordset.Fields("Telep
"|TD|" & adoRecordset.Fields("Mobil
If IsNull(adoRecordset.Fields
strDetails = strDetails & "|TD|" & Replace(Split(adoRecordset
Else
strDetails = strDetails & "|TD|"
End If
strDetails = strDetails & "|TD|" & adoRecordset.Fields("Depar
End If
adoRecordset.MoveNext
Loop
Else
MsgBox "No records were found"
End If
' Clean up.
adoRecordset.Close
Set adoRecordset = Nothing
adoConnection.Close
If strDetails <> "" Then
arrRows = ""
arrRows = Split(strDetails, "|TR|")
If UBound(arrRows) < 0 Then
span_currentrecord.InnerHT
span_totalrecords.InnerHTM
Else
arrData = Split(arrRows(0), "|TD|")
txt_name.Value = arrData(0)
txt_loginname.Value = arrData(1)
txt_email.Value = arrData(2)
txt_empid.Value = arrData(3)
txt_designation.Value = arrData(4)
txt_extensionno.Value = arrData(5)
txt_mobileno.Value = arrData(6)
txt_manager.Value = arrData(7)
txt_department.Value = arrData(8)
span_currentrecord.InnerHT
span_totalrecords.InnerHTM
End If
Else
span_currentrecord.InnerHT
span_totalrecords.InnerHTM
End If
If strDetails = "" Then
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi
btnPreviousEvent.Style.Vis
btnNextEvent.Style.Visibil
btnLastEvent.Style.Visibil
ElseIf UBound(arrRows) = 0 Then
btnFirstEvent.Disabled = True
btnPreviousEvent.Disabled = True
btnNextEvent.Disabled = True
btnLastEvent.Disabled = True
btnFirstEvent.Style.Visibi
btnPreviousEvent.Style.Vis
btnNextEvent.Style.Visibil
btnLastEvent.Style.Visibil
Else
btnFirstEvent.Disabled = False
btnPreviousEvent.Disabled = False
btnNextEvent.Disabled = False
btnLastEvent.Disabled = False
btnFirstEvent.Style.Visibi
btnPreviousEvent.Style.Vis
btnNextEvent.Style.Visibil
btnLastEvent.Style.Visibil
End If
End Sub
Sub Get_Event
arrData = Split(arrRows(span_current
txt_name.Value = arrData(0)
txt_loginname.Value = arrData(1)
txt_email.Value = arrData(2)
txt_empid.Value = arrData(3)
txt_designation.Value = arrData(4)
txt_extensionno.Value = arrData(5)
txt_mobileno.Value = arrData(6)
txt_manager.Value = arrData(7)
txt_department.Value = arrData(8)
End Sub
Sub First_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM
MsgBox "There are no records to display"
ElseIf span_currentrecord.InnerHT
MsgBox "You are already viewing the first record."
Else
span_currentrecord.InnerHT
Get_Event
End If
End If
End Sub
Sub Previous_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If span_currentrecord.InnerHT
span_currentrecord.InnerHT
Get_Event
ElseIf span_currentrecord.InnerHT
MsgBox "You are already viewing the first record."
ElseIf txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
Else
MsgBox "There are no records to display"
End If
End If
End Sub
Sub Next_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM
MsgBox "There are no records for to display"
ElseIf span_currentrecord.InnerHT
MsgBox "You are already viewing the last record."
Else
span_currentrecord.InnerHT
Get_Event
End If
End If
End Sub
Sub Last_Event
If IsArray(arrRows) = False Then
MsgBox "There are no records to display."
Else
If txt_seatnumsearch.Value = "" Then
MsgBox "Please enter an employee id number to search for."
ElseIf span_totalrecords.InnerHTM
MsgBox "There are no records to display"
ElseIf span_currentrecord.InnerHT
MsgBox "You are already viewing the last record."
Else
span_currentrecord.InnerHT
Get_Event
End If
End If
End Sub
</script>
<body STYLE="font:14 pt arial; color:white;filter:progid:
(GradientType=1, StartColorStr='#000033', EndColorStr='#0000FF')" onkeypress='vbs:Default_Bu
<table width='90%' height = '100%' align='center' border='0'>
<tr>
<td align='center' colspan="2">
<h3>User and Computer Information</h3><br>
</td>
</tr
<tr>
<td align="right">
Enter a Seat Number:
</td>
<td>
<input type="text" maxlength="6" size="10" id="txt_seatnumsearch" name="txt_seatnumsearch">
     <
</td>
</tr>
<tr>
<td align='center' colspan="2">
<table>
<tr>
<td>
User Name:
</td>
<td>
<input type="text" maxlength="30" size="40" id="txt_name" name="txt_name">
</td>
</tr>
<tr>
<td>
Login Name:
</td>
<td>
<input type="text" maxlength="30" size="40" id="txt_loginname" name="txt_loginname">
</td>
</tr>
<tr>
<td>
Email Address:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_email" name="txt_email">
</td>
</tr>
<tr>
<td>
Emp ID:
</td>
<td>
<input type="text" maxlength="6" size="10" id="txt_empid" name="txt_empid">
</td>
</tr>
<tr>
<td>
Designation:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_designation" name="txt_designation">
</td>
</tr>
<tr>
<td>
Extension No:
</td>
<td>
<input type="text" maxlength="4" size="10" id="txt_extensionno" name="txt_extensionno">
</td>
</tr>
<tr>
<td>
Mobile Number:
</td>
<td>
<input type="text" maxlength="14" size="20" id="txt_mobileno" name="txt_mobileno">
</td>
</tr>
<tr>
<td>
Manager:
</td>
<td>
<input type="text" maxlength="50" size="70" id="txt_manager" name="txt_manager">
</td>
</tr>
<tr>
<td>
Department:
</td>
<td>
<input type="text" maxlength="30" size="50" id="txt_department" name="txt_department">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<br>Showing record 
<span id="span_currentrecord">
0
</span>
 of 
<span id="span_totalrecords">
0
</span>
<br>
<input type='button' value='||< First' name='btnFirstEvent' onClick='vbs:First_Event'>
<input type='button' value='<< Previous' name='btnPreviousEvent' onClick='vbs:Previous_Even
<input type='button' value='Next >>' name='btnNextEvent' onClick='vbs:Next_Event'>&
<input type='button' value='Last >||' name='btnLastEvent' onClick='vbs:Last_Event'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
ASKER
Rob but this HTA would be to search a detail.
Like when i give the seat as "HC-2F-001"
Then the user detail and the computer which is there has to be displayed only thn it would match.
If you feel it will take too much of time then i have no problem.
You can give me 2 boxes for the search.
Is it possible to give me check boxes as at the same time i can select box boxes so that the HTA can get both details on the same screen.
Rob th characters for seat has to be max 16 char.
Like when i give the seat as "HC-2F-001"
Then the user detail and the computer which is there has to be displayed only thn it would match.
If you feel it will take too much of time then i have no problem.
You can give me 2 boxes for the search.
Is it possible to give me check boxes as at the same time i can select box boxes so that the HTA can get both details on the same screen.
Rob th characters for seat has to be max 16 char.
I understand....the problem is that it's pretty two independant recordsets, and two completely different searches, for the user and computer information. So, let's say you search for "user" details by a seat, then I add the Notes field to the list of info, so you can see the computer name. Then, you'd have to manually click the Computer option to search by, enter the same seat number, and click Search, and then see if the computer that is displayed matches....
Would that be OK? It will still take some time to build, but I can do it.
Regards,
Rob.
Would that be OK? It will still take some time to build, but I can do it.
Regards,
Rob.
ASKER
Ok Rob that's fine...Even this way i can get what i need...Thanks...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Rob GM,
For the user i get all the details quering the seat no.
But for computer when i put the same seat no it says no records.
I made sure that a machine has the same location set to the seat no.But shows no records...
For the user i get all the details quering the seat no.
But for computer when i put the same seat no it says no records.
I made sure that a machine has the same location set to the seat no.But shows no records...
Is the seat number in the location field? And does that field in the AD have only the data you search for?
I have made it search for
*<seatnum>
meaning anything can be written before the text to search for, but not after....
Regards,
Rob.
I have made it search for
*<seatnum>
meaning anything can be written before the text to search for, but not after....
Regards,
Rob.
ASKER
Yes Rob in the Computers properties > Location tab i have the seat no's like this.
FC-7F-001
So when i give this as the search criteria selecting the computer "FC-7F-001" I get nothing.
But there is data in the location tab
FC-7F-001
So when i give this as the search criteria selecting the computer "FC-7F-001" I get nothing.
But there is data in the location tab
That's strange. When I click the Computer radio button to search by, and in my AD I have
FC-7F-001
as the Location, then in the "Enter a seat number" box in the HTA, I put
FC-7F-001
and click Submit, I get my computer name show up......
Seems weird, I can't re-create your problem.....
Rob.
FC-7F-001
as the Location, then in the "Enter a seat number" box in the HTA, I put
FC-7F-001
and click Submit, I get my computer name show up......
Seems weird, I can't re-create your problem.....
Rob.
ASKER
Sorry for the trouble Rob..
I tried so many times and it did not show the machine name.And now when i tried i shows exactly.
Thanks a lot Rob...
I tried so many times and it did not show the machine name.And now when i tried i shows exactly.
Thanks a lot Rob...
Hmmmm....maybe it had to replicate, if you just made the change recently?
Anyway, glad it works for you.
Rob.
Anyway, glad it works for you.
Rob.
ASKER
ASKER
Rob in this Q...
https://www.experts-exchange.com/questions/22898775/Login-script-to-get-all-possible-details-from-the-machine.html
Just a little Tweeking required.It works fine for 1 computer but not for all...Any help...
https://www.experts-exchange.com/questions/22898775/Login-script-to-get-all-possible-details-from-the-machine.html
Just a little Tweeking required.It works fine for 1 computer but not for all...Any help...
https://www.experts-exchange.com/questions/22800311/Need-a-Hta-file-to-query-with-Description-of-all-ADS-users.html
Is that the same information you would want to display, given a seat number?
Regards,
Rob.