Adding Registry keys with VBS.

Posted on 2005-04-12
Medium Priority
Last Modified: 2012-06-27

I need to add a registry key and a few strings under it under the HKEY_CURRENT_USER\Software\ section

i need to add a value in there called name but have it query active directory or use a environment lookup to look at the person that is logged in and grab the full name and insert it in this key

Also the same the the extension number. Which i have also store in active direcotory.

I have 1 key that is a path..which will be c:\documents and settings\current user? ( im not really user what i can use for the vbs script to use the current users profile path here?

can anyone tell me how i can use a vbs script to add registry keys and use these lookups?
Question by:plimpias
  • 2
LVL 22

Accepted Solution

cookre earned 1500 total points
ID: 13768514

Expert Comment

ID: 13772755
Windows Shell com interface has these options, I believe.

LVL 15

Author Comment

ID: 13788469
Im not sure I understand how I would get the vbs script to add the name of the person logged in into a string value under the registry. Thanks cookre for the info on creating the keys with vbs. But im just not quite sure how to insert the full name of the person logged in into a key??
LVL 22

Expert Comment

ID: 13795501
In the firsrt link above, see objUser.userPrincipalName.

I presumed that's the item you wanted.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

809 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