Solved

VBscript objUser.info

Posted on 2009-05-19
6
1,273 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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