Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


AD Telephone Number

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,29606
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> AD Telephone Number
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
 AD Telephone Number - 1/8/2006 11:48:56 PM   
  cjwallace

 

Posts: 491
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Hi Guys. I have a HTA script that will create a user in AD. Some of you will remember it as you gave me lots of help to get it working.

What i am trying to do is enter the users Ext number on the HTA

I have put the parts in question in bold.

Can anyone let me know why this does not work what i have seems right

Many thanks

============================================


<HTML>

<HEAD>

<meta http-equiv="Content-Language" content="en-gb">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<meta name="VI60_defaultClientScript" content="VBScript">

<TITLE>Withers LLP London User Creation Script</TITLE>

<HTA:APPLICATION
ID=
"Corporate"
APPLICATIONNAME=
"Withers LLP User Creation Script"

BORDER=
"thick"

BORDERSTYLE=
"complex"

CAPTION=
"yes"

CONTEXTMENU=
"no"

ICON=
"\\hyperion\itstuff\ActiveDirectoryUserCreation\MainMenu\OtherImages\user.ico"

INNERBORDER=
"yes"

MAXIMIZEBUTTON=
"no"

MINIMIZEBUTTON=
"no"

NAVIGABLE=
"yes"

SCROLL=
"no"

SCROLLFLAT=
"yes"

SHOWINTASKBAR=
"no"

SINGLEINSTANCE=
"no"

SYSMENU=
"Yes"

VERSION=
"4.0"

WINDOWSTATE=
"maximized"/>

<title>
Withers LLP User Account Creation Form</title>

<meta http-equiv=
"Content-Type" content="text/html; charset=windows-1252" />
<link href=
"Cobalt.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--
a {
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
-->

</style>

<SCRIPT Language
="VBScript">

'=================
'Start of Script
'=================
'============================================================
'This section will check to see if the Password folder exist
'============================================================
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists("C:\Program Files\PassDLG") Then
Set objFolder = objFSO.GetFolder("C:\Program Files\PassDLG")
Else
MsgBox "NOTICE:" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "PasswordDialog Software not installed" & Chr(13) & Chr(10) & "Please install from \\Hyperion\itstuff\ActiveDirectoryUserCreation\Software\Password" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "NOTE: The SQL part of this script will FAIL if the software is not installed" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Please see Craig Wallace x6088 with any issues",64, "PLEASE READ , PLEASE READ"
End If
'=================================================================================================
'This section will prompt each run of this script to run the check iManage for a user name notice
'=================================================================================================
MsgBox "NOTICE:" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Before creating any new user for the first time, Please ensure" & Chr(13) & Chr(10) & "you check iManage to ensure the Initials are available before you proceed" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Because of the way this script works you will need to create the Groupwise account first" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Any problems please see the London Systems Team",64, "Alert - PLEASE READ , PLEASE READ"
'================================================================
'This section Will check to see if the iManage initials are free
'================================================================
Sub CheckiManageInitials
Set db = CreateObject("ADODB.Connection")
cnstring = "Provider=SQLOLEDB.1;Password=Waterl00;Persist Security Info=True;User ID=sa;Initial Catalog=Chris;Data Source=10.10.100.62"
db.open cnstring
db.Execute "exec STORED PROCEDURE" & strIManageInitials & " "
End Sub
'=========================================================================
'This section is the code for changing the mouse pointer for the buttons
'=========================================================================
Sub Pointer
document.body.style.cursor = "hand"
End Sub
Sub DefaultCursor
document.body.style.cursor = "default"
End Sub
'=====================================================
'This section will run the main user creation script
'=====================================================
Sub CreateAccount
strUser = TextBox0.Value
If strUser = "" Then
MsgBox "You're missing required user name." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Please enter users Initials, Example cjw",64, "Alert - PLEASE READ , PLEASE READ"
Exit Sub
End If
strFirst = TextBox1.Value
If strFirst = "" Then
MsgBox "You're missing required first name" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Please enter users First Name, Example Craig",64, "Alert - PLEASE READ , PLEASE READ"
Exit Sub
End If
strInitial = TextBox2.Value
strLast = TextBox3.Value
If strLast = "" Then
MsgBox "You're missing required last name" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Please enter users Last Name, Example Wallace",64, "Alert - PLEASE READ , PLEASE READ"
strTelephone = TextBox4.Value
strIManageInitials = TextBox5.Value
Exit Sub
End If
strDisplay = strFirst & ", " & strLast
strCN = strFirst & "\, " & strLast
Const ADS_UF_ACCOUNTDISABLE = 2
Const ADS_PROPERTY_UPDATE = 2
'===================================================================
' This section will create the user & set part of the General Page.
'===================================================================
Set objOU = GetObject("LDAP://OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
Set objUser = objOU.Create("User", "cn=" & strCN)
objUser.Put "sAMAccountName", LCase(strUser)
objUser.Put "userPrincipalName", strUser & "@withers.net"
objUser.SetInfo
objUser.Put "givenName", strFirst
If strInitial <> "" Then
objUser.Put "initials", strInitial
End If
objUser.Put "sn", strLast
objUser.Put "displayName", strDisplay
'=================================================================================
' This section will assign the user a standard password & force a password change
'=================================================================================
objUser.SetPassword "Passw0rd"
objUser.Put "pwdLastSet", 0
intUAC = objUser.Get("userAccountControl")
If intUAC And ADS_UF_ACCOUNTDISABLE Then
objUser.Put"userAccountControl", intUAC Xor ADS_UF_ACCOUNTDISABLE
End If
objUser.SetInfo
'============================
' Address Page Information
'============================
Set objUser = GetObject _
("LDAP://cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objUser.Put "streetAddress", "16 Old Bailey"
objUser.Put "l", "London"
objUser.Put "postalCode", "EC4M 7EG"
objUser.Put "c", "GB"
objUser.SetInfo
'===========================
' General Page Information
'===========================
objUser.Put "physicalDeliveryOfficeName", "London"
objUser.Put "telephoneNumber", strTelephone
objUser.Put "mail", strFirst & "." & strLast & "@withersworldwide.com"
objUser.Put "wWWHomePage", "www.withersworldwide.com"
objUser.SetInfo
'====================================
' Users Office Telephone Information
'====================================
objUser.Put "facsimileTelephoneNumber", "+44 (0)20 7597 6543"
objUser.SetInfo
'===========================
' Organization Information
'===========================
objUser.Put "department", "Corporate"
objUser.Put "company", "Withers LLP - London"
objUser.SetInfo
'========================================================================
'This Section Will Add the user to the Withers standard Security Groups
'========================================================================
Const ADS_PROPERTY_APPEND = 3
Set objGroup = GetObject _
("LDAP://cn=LN London Users,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
Set objGroup = GetObject _
("LDAP://cn=LN Corporate,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
'==================================================
' This section is for the Job Role drop down menu.
'==================================================

'========================================================
'This part is for error control on the drop down menu
'========================================================
If JobRole.Value = 0 Then

MsgBox "Please select an option from the drop-down menu!"
Exit Sub
Else

'==================================
' Configures the user as a Counsel
'==================================
If JobRole.Value = 1 Then

objUser.Put "profilePath", "\\Withers.net\dfsroot\GlobalProfiles\" & strUser & ""

objUser.Put "title", "Counsel"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Counsel")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'=====================================
' Configures the user as a Fee Earner
'=====================================
If JobRole.Value = 2 Then
objUser.Put "profilePath", "\\Withers.net\dfsroot\GlobalProfiles\" & strUser & ""
objUser.Put "title", "Fee Earner"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Fee Earner")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'=====================================
' Configures the user as a Principal
'=====================================
If JobRole.Value = 3 Then
objUser.Put "profilePath", "\\Withers.net\dfsroot\GlobalProfiles\" & strUser & ""
objUser.Put "title", "Principal"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Principal")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet Principal,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If
'==============================
' Configures the user as a PSL
'==============================
If JobRole.Value = 4 Then
objUser.Put "profilePath", "\\Withers.net\dfsroot\GlobalProfiles\" & strUser & ""
objUser.Put "title", "PSL"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London PSL")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If
'=====================================
' Configures the user as a Secretary
'=====================================
If JobRole.Value = 5 Then
objUser.Put "profilePath", "\\LNFS01\Profiles$\" & strUser & ""
objUser.Put "title", "Secretary"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Secretary")
objUser.SetInfo
Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'===================================
' Configures the user as a Trainee
'===================================
If JobRole.Value = 6 Then

objUser.Put "profilePath", "\\LNFS01\Profiles$\" & strUser & ""
objUser.Put "title", "Trainee"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Trainee")
objUser.SetInfo
Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'=======================================
' Configures the user as a Temp Account
'=======================================
If JobRole.Value = 7 Then

objUser.Put "profilePath", "\\LNFS01\Profiles$\" & strUser & ""
objUser.Put "title", "Temporary Account"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Temporary Account")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'===========================================
' Configures the user as a Vacation Account
'===========================================
If JobRole.Value = 8 Then

objUser.Put "profilePath", "\\LNFS01\Profiles$\" & strUser & ""
objUser.Put "title", "Vacation Account"
objUser.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("London Vacation Account")
objUser.SetInfo

Set objGroup = GetObject _
("LDAP://cn=LN Intranet General,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

End If
'========================================================================
' This section will enter the home drive information in Active Directory
'========================================================================
objUser.Put "homeDirectory", "\\LNFS01\Home$\" & strUser & ""
objUser.Put "homeDrive", "H"
objUser.SetInfo
'=======================================================================
'This Section will Create The Users Home Drive Folder on \\lnfs01\home$
'=======================================================================
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder("\\LNFS01\home$\" & strUser)
'==============================================================================
'This Section will give the user change NTFS permissions to their home drives.
'==============================================================================
Set objShell = CreateObject("Wscript.Shell")
strDest = "\\LNFS01\home$\" & strUser
objShell.Run ("SetACL.exe -on """ & strDest & """ -ot file -actn ace " & "-ace ""n:WITHERS.net\" & strUser & ";p:change""")
'===================================================================================================================================
'This Section will create the Groupwise Archive Folder on \\LNFS01\GWArchive$\%username% & Add them to the GroupWise Security Group
'===================================================================================================================================
If GroupwiseUser.checked Then
' Creates GroupWise Achive Folder
Set objFolder = objFSO.CreateFolder("\\LNFS01\GWArchive$\" & strUser)
Set objGroup = GetObject _
("LDAP://cn=LN GWArchive,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'=====================================================
' This section Will Grant Internet Access to LNISA01.
'=====================================================
If InternetAccess.Checked Then

'=======================
' Grant Internet Access
'=======================

Set objGroup = GetObject _
("LDAP://cn=LN Internet Access (Enabled),OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
Else

'======================
'Deny Internet Access
'======================

Set objGroup = GetObject _
("LDAP://cn=LN Internet Access (Disabled),OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.PutEx ADS_PROPERTY_APPEND, _
"member", Array("cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
objGroup.SetInfo
End If

'=====================================================================
' This section Will Disbale User Account based on Checkbox selection.
'=====================================================================
If DisableAccount.Checked Then
' Disables The User Account
Set objUser = GetObject _
("LDAP://cn=" & strCN & ",OU=CORPORATE,OU=LONDON USERS,OU=WITHERS USERS,dc=withers,dc=net")
intUAC = objUser.Get("userAccountControl")
objUser.Put "userAccountControl", intUAC Or ADS_UF_ACCOUNTDISABLE
objUser.SetInfo
End If
'=========================================================================
' This section Will Create Elite SQL Account based on Checkbox selection.
'=========================================================================
If CreateSQL.Checked Then
Set db = CreateObject("ADODB.Connection")
cnstring = "Provider=SQLOLEDB.1;Password=Waterl00;Persist Security Info=True;User ID=sa;Initial Catalog=Chris;Data Source=10.10.100.62"
db.open cnstring
Dim objPassDlg
Set objPassDlg = CreateObject("PassDlg.PasswordDialog")
objPassDlg.AllowBlankPassword = False
objPassDlg.Confirm = True
Do Until objPassDlg.password <> ""
objPassDlg.ShowDialog "Enter Elite Password"
Loop
If objPassDlg.Canceled Then
MsgBox " REDUNDANT CODE"
Else
rem MsgBox "Sending email regarding the users Elite Account"
End If
db.Execute "exec sp_addlogin @loginame=" & strUser & ",@passwd=" & objPassDlg.password & ",@defdb='Chris',@deflanguage='British'"
db.Execute "use chris exec sp_grantdbaccess " & strUser & " "
db.Execute "exec sp_addrolemember 'Elite', " & strUser & " "


'====================================================================================
'This will then send an email regarding the Elite details to Accounts & IT Training
'====================================================================================

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "craig.wallace@withersworldwide.com"
objEmail.To = "craig.wallace@withersworldwide.com"
objEmail.Subject = "New User - " & strFirst & " " & strLast &" Elite Account Details "
objEmail.Textbody = Join( Array( _
"****Automatic email****," _
, " "_
, "Please note London IT have created a new user."_
, " "_
, "Name: " & strFirst & " " & strLast &" " _
, " "_
, "Initials: " & strUser & " "_
, " "_
, "Elite Password: " & objPassDlg.password & " "_
, " "_
, "Department: Corporate"_
, " "_
, "Office Location: London"_
, " "_
, " "_
, "Paul can you please add this user to Elite please"_
, " "_
, "Regards"_
, " "_
, "London IT Department"_
, " "_
, "****Please note this email was automatically generated from the IT User Creation Script****"_
, " "_
, "Please contact the London IT helpdesk x6440 with any issues"_
, " " ), vbCrLf )
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"10.10.1.11"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send

'=========================================================================================
' This section will now send an email to the user letting them know their Elite password.
'=========================================================================================

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "craig.wallace@withersworldwide.com"
objEmail.To = ""& strFirst & "." & strLast & "@withersworldwide.com"
objEmail.Subject = "" & strFirst & " " & strLast &" Your Elite Account Details"
objEmail.Textbody = Join( Array( _
"****Automatic email****," _
, " "_
, "Please find enclosed your Elite Webview password."_
, " "_
, "Initials: " & strUser & " "_
, " "_
, "Elite Password: " & objPassDlg.password & " "_
, " "_
, "Department: Corporate"_
, " "_
, "Office Location: London"_
, " "_
, " "_
, "Regards"_
, " "_
, "London IT Department"_
, " "_
, "****Please note this email was automatically generated from the IT User Creation Script****"_
, " "_
, "Please contact the London IT helpdesk x6440 with any issues"_
, " " ), vbCrLf )
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"10.10.1.11"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
End If
'=======================================================================================
' Will send email regarding account details to IT Helpdesk, IT Systems , HR , Reception
'=======================================================================================

If EmailAccountDetails.Checked Then

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "craig.wallace@withersworldwide.com"
objEmail.To = "craig.wallace@withersworldwide.com"
objEmail.Subject = "New User - " & strFirst & " " & strLast &" Account Details "
objEmail.Textbody = Join( Array( _
"****Automatic email****," _
, " "_
, "Please note London IT have created a new user account."_
, " "_
, "Name: " & strFirst & " " & strLast &" " _
, " "_
, "Initials: " & strUser & " "_
, " "_
, "Department: Corporate"_
, " "_
, "Office Location: London"_
, " "_
, " "_
, "Regards"_
, " "_
, "London IT Department"_
, " "_
, "****Please note this email was automatically generated from the IT User Creation Script****"_
, " "_
, "Please contact the London IT helpdesk x6440 with any issues"_
, " " ), vbCrLf )
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"10.10.1.11"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
End If

End Sub
'======================================
'This section will reload the script
'======================================
Sub Reload
location.Reload(True)
End Sub
'================================================================
'This section makes the script load in the middle of the screen
'================================================================
Sub bodyLoaded()
theleft = (screen.availWidth - document.body.clientWidth) / 2
thetop = (screen.availHeight - document.body.clientHeight) / 2
window.moveTo theleft,thetop
'============================================================
'This section tells the script what size to make the window
'============================================================
window.ResizeTo 775,635 ' WIDTH, HEIGHT
End Sub
'==============
'End of Script
'==============
</SCRIPT>
</HEAD>

<body onLoad="bodyLoaded()" style="background-attachment: fixed">
<a name=
"top"></a>

<table border=
"0" cellspacing="0" cellpadding="0" align="center" width="100%">

<tr>

<td width="0%" class="mainboxLefttop"><img src="images/spacer.gif" width="6" height="6"></td>

<td width="100%" class="mainboxTop"><img src="images/spacer.gif" width="6" height="6"></td>

<td width="0%" class="mainboxRighttop"><img src="images/spacer.gif" width="6" height="6"></td>
</tr>

<tr>
<td width="0%" class="mainboxLeft"><img src="images/spacer.gif" width="6" height="6"></td>

<td width="100%" class="mainbox">


<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="3%" align="right" height="39">

<tr>

<td width="100%" height="32">

<a href="../../MainMenu/MainMenu.hta">

<img border="0" src="../../MainMenu/OtherImages/Home.jpg" title="Click here to return to the main menu." align="right" width="32" height="32" onmouseover="Pointer" onmouseout="DefaultCursor"></a></td>

</tr>

<tr>

<td width="100%" height="6">

<p align="center"></td>

</tr>

<tr>

<td width="100%" height="27">

<p align="center">

<img border="0" src="../../MainMenu/OtherImages/Exit.jpg" onClick="Self.Close" title="Click here to exit this script." align="right" width="32" height="32" onmouseover="Pointer" onmouseout="DefaultCursor"></td>

</tr>

</table>

<p align="center"><img border="0" src="withers.bmp" width="286" height="92"></p>

<p align="center"><b><font size="4">LONDON CORPORATE DEPARTMENT</font></b></p>

<table width="268" border="2" align="left" height="1">
<tr>
<td width=
"237" height="1"><font size="2">iManage Initials </font> </td>
<td width=
"101" height="1">

<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="3" -->
<input type="text" name="textbox5" size="14" tabindex="1"></td>
</tr>

</table>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="16%" height="28">

<tr>

<td width="100%" height="28">

<p align="center"> <font color="#000000">

<img border="0" src="images/iManage1.jpg" onClick="CheckiManageInitials" title="Click here to ask iManage if the initials you have entered are Available." width="32" height="32" onmouseover="Pointer" onmouseout="DefaultCursor"><br>

</font>Check iManage Initials<br>

&nbsp;
</td>

</tr>

</table>

<table width="269" border="2" align="left" height="1">
<tr>
<td width=
"172" height="1"><span class="style5"><b>
<font size=
"3" color="#FF0000">*</font></b></span><font size="2">Login
ID:
</font> </td>
<td width=
"152" height="1">

<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="3" -->
<input type="text" name="textbox0" size="23" tabindex="1"></td>
</tr>
<tr>
<td width=
"172" height="1"><span class="style5"><b>
<font size=
"3" color="#FF0000">*</font></b></span><font size="2">First Name:</font></td>
<td width=
"152" height="1">
<input type=
"text" name="textbox1" size="23" tabindex="2"></td>
</tr>
<tr>
<td width=
"172" height="1"><font size="2">Middle Initial: </font> </td>
<td width=
"152" height="1">
<input type=
"text" name="textbox2" size="23" tabindex="3"></td>
</tr>
<tr>
<td width=
"172" height="1"><span class="style5"><b>
<font size=
"3" color="#FF0000">*</font></b></span><font size="2">Last Name:

</font>
</td>
<td width=
"152" height="1">
<input type=
"text" name="textbox3" size="23" tabindex="4"></td>
<tr>
<td width=
"172" height="1"><font size="2">Telephone Ext</font></td>
<td width=
"152" height="1">

<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="4" -->
<input type="text" name="textbox4" size="23" tabindex="4"></td>
<tr>
<td width=
"172" height="1"><font size="4" color="#FF0000">*</font><font size="2">Job
Role
</font></td>
<td width=
"152" height="1"><select size="1" name="JobRole" tabindex="5">
<option value=
"0" selected>Please select</option>
<option value=
"1">Counsel</option>
<option value=
"2">Fee Earner</option>
<option value=
"3">Principal</option>
<option value=
"4">PSL</option>
<option value=
"5">Secretary</option>
<option value=
"6">Trainee</option>
<option value=
"7">Temp Account</option>
<option value=
"8">Vacation Student</option>
</select></td></table>

<table width="239" height="1" border="2" align="left">

<tr>

<td width="231" height="1"><font size="2">GroupWise Account?</font></td>

<td width="22" height="1"> <div align="center">

<font size="2">

<input type="checkbox" name="GroupwiseUser" value="GroupwiseUser" tabindex="6"> </font>

</div></td></tr>

<tr>

<td height="1" width="231"><font size="2">Internet
Access Required?
</font></td>

<td height="1" width="22"> <div align="left">

<font size="2">

<input type="checkbox" name="InternetAccess" value="InternetAccess" tabindex="7"></font></div></td>

</tr>

<tr>

<td height="1" width="231"><font size="3" color="#00FF00">**</font><font size="2">Create Elite SQL Account?</font></td>

<td height="1" width="22"> <div align="left">

<font size="2">

<input type="checkbox" name="CreateSQL" value="CreateSQL" tabindex="8"></font></div></td>

</tr>

<tr>

<td height="1" width="231"><font size="3" color="#FF0080">***</font><font size="2">Email
Account Info?
<img border="0" src="images/icon_mini_message.gif" width="22" height="22"></font></td>

<td height="1" width="22"> <div align="center">

<font size="2">

<input type="checkbox" name="EmailAccountDetails" value="EmailAccountDetails" checked=True tabindex="9">

</font>

</div></td>

</tr>

</table>

<table width="201" height="1" border="2" align="left">

<tr>

<td height="1" width="188"><font size="2">Disable Users Account?</font></td>

<td height="1" width="23"><div align="center">

<font size="2">

<input type="checkbox" name="DisableAccount" value="DisableAccount" tabindex="10">

</font>

</div></td>

</tr>

</table>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><br>

<br>

<br>

&nbsp;
</p>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="30%">

<tr>

<td width="48%">

<p align="center"> <font color="#000000">

<img border="0" src="../../MainMenu/OtherImages/Submit.jpg" onClick="CreateAccount" title="Click here to send the above data to Active Directory." width="32" height="32" onmouseover="Pointer" onmouseout="DefaultCursor"><br>

</font>Send data to Active Directory</td>

<td width="52%">

<p align="center">

<img border="0" src="../../MainMenu/OtherImages/Refresh.jpg" onClick="Reload" title="Click here to refresh the script and start again." width="32" height="32" onmouseover="Pointer" onmouseout="DefaultCursor"><br>

Refresh Active Directory Script
</td>

</tr>

</table>

<p>

<b><span class="style6"><font size="3" color="#FF0000">*</font></span> </b>
<font color="#FF0000" size="2">Indicates Required Field</font><br>

<font color="#00FF00" size="3">**</font><font color="#0000FF" size="3"> </font><font size="2">Will automatically
send email to London Accounts , London IT Training &amp; the user.
</font><br>

<font color="#FF0080" size="3">***</font> <font size="2">If selected will send
an email to the London IT Helpdesk, IT Systems, HR &amp; Ground Floor Reception.
</font><font color="#000000"><br>



<br>

</font><b><font color="#CC6600" size="2">Script designed by Craig Wallace,</font><font size="2">&nbsp;</font><font color="#CC6600" size="2">London
Systems Analyst 01.01.06 v4
</font></b></p>

</td>

<td width="0%" class="mainboxRight"><img src="images/spacer.gif" width="6" height="6"></td>

</tr>

<tr>
<td width="0%" class="mainboxLeftbottom"><img src="images/spacer.gif" width="6" height="6"></td>

<td width="100%" valign="top" class="mainboxBottom"><img src="images/spacer.gif" width="6" height="6"></td>

<td width="0%" class="mainboxRightbottom"><img src="images/spacer.gif" width="6" height="6"></td>

</tr>
</table>

</BODY>
</html>
 
 
 
Post #: 1
 
 RE: AD Telephone Number - 1/9/2006 12:34:22 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
While I am not that good with AD editing, I was wondering what the length of the field is and if there was a minimum/maximum length on the telephone number field in AD?

Also, can you update this field outside of this HTA?  i.e. using another script?

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to cjwallace)
 
 
Post #: 2
 
 RE: AD Telephone Number - 1/9/2006 12:50:25 AM   
  Cybex


Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
I can't help with your problem but ... <% 
You have the longest posts I have ever see...


Cybex

_____________________________

Common sense is not so common.

(in reply to cjwallace)
 
 
Post #: 3
 
 RE: AD Telephone Number - 1/9/2006 1:27:50 AM   
  cjwallace

 

Posts: 491
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Hi guys thanks for the reply.

On the telephone field i am only trying to enter four numbers for the extension number eg 1234

When i run the script with something like 1234 in the textbox i get the following error

Line 191 which is the first line in bold in my original post

Char 1

Error: Unspecified error

Any ideas?

I basically want the Telehone to work in the same way as the user name , First Name , Last Name etc.

< Message edited by cjwallace -- 1/9/2006 3:09:37 AM >

(in reply to Cybex)
 
 
Post #: 4
 
 RE: AD Telephone Number - 1/9/2006 6:36:45 AM   
  cjwallace

 

Posts: 491
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Anyone?

really not sure what is wrong with it.

(in reply to cjwallace)
 
 
Post #: 5
 
 RE: AD Telephone Number - 1/9/2006 6:40:58 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Have you tried it with a full number?  i.e. 8001234567?  Or have you tried the extension outside of your script, in a basic script?

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to cjwallace)
 
 
Post #: 6
 
 RE: AD Telephone Number - 1/9/2006 6:47:47 AM   
  cjwallace

 

Posts: 491
Score: 0
Joined: 3/5/2005
From: United Kingdom
Status: offline
Hello mate and thanks for the reply.

Its not what i am putting in the textbox its something to do with the code. i mean is this is right?

strTelephone = TextBox4.Value

objUser.Put "telephoneNumber", strTelephone



Thanks for your help so far


(in reply to mbouchard)
 
 
Post #: 7
 
 RE: AD Telephone Number - 1/9/2006 7:04:50 AM