' ------------------------------------------------------------------------- ' From the book Inside Active Directory, ISBN 0-201-61621-1 ' Copyright (C) 2002 by Addison-Wesley ' Script by Sakari Kouti (see http://www.kouti.com) ' You have a royalty-free right to use, modify, reproduce and distribute ' this script (and/or any modified version) in any way you find useful, ' provided that you agree that Addison-Wesley or Sakari Kouti has no ' warranty, obligations or liability for the script. If you modify ' the script, you must retain this copyright notice. ' ------------------------------------------------------------------------- On Error Resume Next Set wshArguments = WScript.Arguments Set objUser = GetObject(wshArguments(0)) str1 = "The current information" str2 = "Worked for Sanao since: " & objUser.sanaoHRWorkedSince str3 = "Previous employer: " & objUser.sanaoHRPreviousEmployer str4 = "Would you like to modify the previous employer?" intAnswer = MsgBox(str1 & vbCrLf & vbCrLf & str2 & vbCrLf & str3 & _ vbCrLf & vbCrLf & str4, _ vbYesNo, _ "Human Resources Information for " & objUser.Name) If intAnswer = vbNo Then WScript.Quit strEmployer = InputBox("Enter the previous employer", _ "Sanao Human Resources", objUser.sanaoHRPreviousEmployer) If strEmployer = "" Then WScript.Quit 'User clicked Cancel objUser.sanaoHRPreviousEmployer = strEmployer objUser.SetInfo