Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBscript objUser.info

Posted on 2009-05-19
6
Medium Priority
?
1,297 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses

772 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