Solved

VBscript objUser.info

Posted on 2009-05-19
6
1,278 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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