Solved

VBscript objUser.info

Posted on 2009-05-19
6
1,270 Views
Last Modified: 2012-05-07
Hello all

i know this might be something simple but cant figure it out, i am using objUser.info to add information and it works perfect, however if anything is in that field it deletes it, anyone know anyway to append to it? below is a piece of the code
objUser.info = Incident     <--- pull data from a input box

objUser.SetInfo

      objUser.AccountDisabled = TRUE

      objUser.HideFromAddressBook = True

      objUser.SetInfo

      SET objCont = GetObject("LDAP://" & strNewOUDN)

      objCont.MoveHere adoRec.Fields("ADsPath").Value, vbNullString

      Msgbox "Account disabled", vbInformation, "Confirmation"

      Msgbox "Did you Check Oracle?", vbInformation, "Confirmation"

      Msgbox "Did you Check Blackberry Account?", vbInformation, "Confirmation"

      adoRec.MoveNext

Open in new window

0
Comment
Question by:EfrenM
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:Hubasan
ID: 24423937
All you have to do is assign initial data to a variable and then append the variable with different value using "&" symbol:

sMydata = objUser.info ' this will read and place current state of objuser.info to sMydata variable.

Then you can do:

sMydata = sMydata & " adding this text to initial variable"

wscript.echo sMydata

0
 
LVL 2

Author Comment

by:EfrenM
ID: 24424082
sweet it works :)  below is the code i used, hey how can make it press enter so it looks like this
Test <---- was already in profile
12345 <-- input box value

it currently adds it to test12345

ill put in some more points =]

sMydata = objUser.info

sMydata = sMydata

objUser.info = sMydata & Incident <-- pulls from a input box at start

objUser.SetInfo

Open in new window

0
 
LVL 7

Accepted Solution

by:
Hubasan earned 500 total points
ID: 24424225
you can use:
objUser.info = sMydata & vbcrlf & Incident

vbcrlf is a VBS command that stands for VisualBasicCarriageReturnLineFeed. That should do the trick.



0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:EfrenM
ID: 24424261
sweet =], thnx a mill,
0
 
LVL 2

Author Closing Comment

by:EfrenM
ID: 31583048
a bonus =]
0
 
LVL 7

Expert Comment

by:Hubasan
ID: 24424284
Heheh...no problem. Thanks for the bonus points :-) and the grade.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now