Computing.Net > Forums > Disk Operating System > Registry edit

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Registry edit

Reply to Message Icon

Name: Doug
Date: April 28, 2003 at 12:38:40 Pacific
OS: 2000
CPU/Ram: quad p4
Comment:

I would like to make a batch file to import one registry key. The only problem is that the key is different for each user. Here is the Key that I'm talking about.

[HKEY_CURRENT_USER\Software\Microsoft\Exchange\Messenger\Profiles\http://intranet/instmsg/aliases/ddrafts\Contacts]

In my case it is ddrafts for someone eles it would be their logon name.

Is their a way to do this??

Thanks

Doug



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: April 28, 2003 at 15:37:38 Pacific
Reply:

Is there any environment variable that holds that logon name, or perhaps any command taht will output it?

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 2
Name: Doug
Date: April 29, 2003 at 10:48:26 Pacific
Reply:

Leonardo,

I have figured it out. Thanks for you help. Here is how it looks just incase you were intrested.

@ECHO OFF
MD C:\REG

:: CREATE MESSAGE .REG FILE
>"C:\REG\MESSAGE.REG" ECHO REGEDIT
>>"C:\REG\MESSAGE.REG" ECHO.
ECHO ADDING "Now adding Registry files" ENTRY
>>"C:\REG\MESSAGE.REG" ECHO [hkey_current_user\software\microsoft\exchange\messenger\profiles\http://intranet/instmsg/aliases/%username%\contacts]
>>"C:\REG\MESSAGE.REG" ECHO "test1@intranet"="test1@intranet"
>>"C:\REG\MESSAGE.REG" ECHO "test2@intranet"="test2@intranet"
>>"C:\REG\MESSAGE.REG" ECHO "test3@intranet"="test3@intranet"
>>"C:\REG\MESSAGE.REG" ECHO "test4@intranet"="test4@intranet"
>>"C:\REG\MESSAGE.REG" ECHO "test5@intranet"="test5@intranet"
>>"C:\REG\MESSAGE.REG" ECHO.


:: MERGE THE MESSAGE .REG FILE
:MERGE
START /WAIT REGEDIT /S "C:\REG\MESSAGE.REG"

:: DELETE THE MESSAGE .REG FILE
DEL "C:\REG\MESSAGE.REG"
RD C:\REG

:: READY
GOTO END


:End


Now I need to figure out how to delete the key.

Doug


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Net Send MKDIR script help



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Registry edit

Registry Edit tool for DOS www.computing.net/answers/dos/registry-edit-tool-for-dos/6107.html

edititng registry www.computing.net/answers/dos/edititng-registry/6450.html

missing batch file www.computing.net/answers/dos/missing-batch-file/11596.html