Solved

I need to edit a string value in HKCU but cannot get it to change, help!!

Posted on 2008-10-21
3
297 Views
Last Modified: 2013-12-05
I recently installed EskerFax on a test terminal server.  I need to be able to publish a company address book for my users.  I created the book, put it on a shared drive and am trying to set it up so I don't have to add it to every users profile manually.  I found that the setting to point to the  address book was located in HKCU in the registry.  So I exported the value, edited it and ran it but it did not change the users settings.  I need to add the phonebook locatedon I:\eskerfax\COMPANYFAXBOOK.dbf.  Here is what was wrote:  

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Alcom\LanFax Manager\PhoneBook]
"Files"="C:\\Documents and Settings\\" & %username% & "\\Application Data\\Alcom\\LanFax Manager\\mypb.dbf;I:\\EskerFax\\COMPANYFAXBOOK.DBF;"
"Aliases"="Personal phonebook;Company Address Book;"
"DefaultPhoneBook"="Personal phonebook (C:\\Documents and Settings\\" & %username% & "\\Application Data\\Alcom\\LanFax Manager\\mypb.dbf)"
"Index"=dword:00000000
"ShowAlias"=dword:00000001
"SearchField"="(None)"
"SearchString"=""
"EntryColumnData"=hex(7):31,00,00,00,31,00,00,00,20,00,09,00,31,00,36,00,09,00,\
  32,00,30,00,09,00,34,00,30,00,30,00,30,00,00,00,4c,00,61,00,73,00,74,00,20,\
  00,4e,00,61,00,6d,00,65,00,09,00,37,00,30,00,09,00,31,00,09,00,63,00,30,00,\
  30,00,30,00,00,00,46,00,69,00,72,00,73,00,74,00,20,00,4e,00,61,00,6d,00,65,\
  00,09,00,37,00,30,00,09,00,30,00,09,00,34,00,30,00,30,00,30,00,00,00,46,00,\
  61,00,78,00,20,00,4e,00,75,00,6d,00,62,00,65,00,72,00,09,00,31,00,30,00,30,\
  00,09,00,39,00,09,00,34,00,30,00,30,00,30,00,00,00,43,00,6f,00,6d,00,70,00,\
  61,00,6e,00,79,00,09,00,38,00,30,00,09,00,32,00,09,00,34,00,30,00,30,00,30,\
  00,00,00,41,00,64,00,64,00,72,00,65,00,73,00,73,00,09,00,36,00,30,00,09,00,\
  34,00,09,00,34,00,30,00,30,00,30,00,00,00,43,00,69,00,74,00,79,00,09,00,35,\
  00,30,00,09,00,35,00,09,00,34,00,30,00,30,00,30,00,00,00,53,00,74,00,61,00,\
  74,00,65,00,09,00,34,00,30,00,09,00,37,00,09,00,34,00,30,00,30,00,30,00,00,\
  00,43,00,6f,00,75,00,6e,00,74,00,72,00,79,00,09,00,34,00,30,00,09,00,38,00,\
  09,00,34,00,30,00,30,00,30,00,00,00,50,00,68,00,6f,00,6e,00,65,00,20,00,4e,\
  00,75,00,6d,00,62,00,65,00,72,00,09,00,36,00,30,00,09,00,31,00,30,00,09,00,\
  34,00,30,00,30,00,30,00,00,00,44,00,65,00,70,00,61,00,72,00,74,00,6d,00,65,\
  00,6e,00,74,00,09,00,38,00,09,00,33,00,09,00,34,00,30,00,30,00,30,00,00,00,\
  5a,00,69,00,70,00,09,00,38,00,09,00,36,00,09,00,34,00,30,00,30,00,30,00,00,\
  00,45,00,6d,00,61,00,69,00,6c,00,20,00,41,00,64,00,64,00,72,00,65,00,73,00,\
  73,00,09,00,38,00,09,00,31,00,31,00,09,00,34,00,30,00,30,00,30,00,00,00,42,\
  00,69,00,6c,00,6c,00,69,00,6e,00,67,00,20,00,43,00,6f,00,64,00,65,00,09,00,\
  38,00,09,00,31,00,32,00,09,00,34,00,30,00,30,00,30,00,00,00,54,00,79,00,70,\
  00,65,00,09,00,38,00,09,00,31,00,33,00,09,00,34,00,30,00,30,00,30,00,00,00,\
  55,00,73,00,65,00,72,00,31,00,09,00,38,00,09,00,31,00,34,00,09,00,34,00,30,\
  00,30,00,30,00,00,00,55,00,73,00,65,00,72,00,32,00,09,00,38,00,09,00,31,00,\
  35,00,09,00,34,00,30,00,30,00,30,00,00,00,00,00
"RecColumnData"=hex(7):31,00,00,00,31,00,00,00,20,00,09,00,31,00,36,00,09,00,\
  32,00,31,00,09,00,34,00,30,00,30,00,30,00,00,00,20,00,09,00,31,00,36,00,09,\
  00,32,00,30,00,09,00,34,00,30,00,30,00,30,00,00,00,4c,00,61,00,73,00,74,00,\
  20,00,4e,00,61,00,6d,00,65,00,09,00,37,00,30,00,09,00,31,00,09,00,63,00,30,\
  00,30,00,30,00,00,00,46,00,69,00,72,00,73,00,74,00,20,00,4e,00,61,00,6d,00,\
  65,00,09,00,37,00,30,00,09,00,30,00,09,00,34,00,30,00,30,00,30,00,00,00,46,\
  00,61,00,78,00,20,00,4e,00,75,00,6d,00,62,00,65,00,72,00,09,00,31,00,30,00,\
  30,00,09,00,39,00,09,00,34,00,30,00,30,00,30,00,00,00,43,00,6f,00,6d,00,70,\
  00,61,00,6e,00,79,00,09,00,38,00,30,00,09,00,32,00,09,00,34,00,30,00,30,00,\
  30,00,00,00,41,00,64,00,64,00,72,00,65,00,73,00,73,00,09,00,36,00,30,00,09,\
  00,34,00,09,00,34,00,30,00,30,00,30,00,00,00,43,00,69,00,74,00,79,00,09,00,\
  35,00,30,00,09,00,35,00,09,00,34,00,30,00,30,00,30,00,00,00,53,00,74,00,61,\
  00,74,00,65,00,09,00,34,00,30,00,09,00,37,00,09,00,34,00,30,00,30,00,30,00,\
  00,00,43,00,6f,00,75,00,6e,00,74,00,72,00,79,00,09,00,34,00,30,00,09,00,38,\
  00,09,00,34,00,30,00,30,00,30,00,00,00,50,00,68,00,6f,00,6e,00,65,00,20,00,\
  4e,00,75,00,6d,00,62,00,65,00,72,00,09,00,36,00,30,00,09,00,31,00,30,00,09,\
  00,34,00,30,00,30,00,30,00,00,00,44,00,65,00,70,00,61,00,72,00,74,00,6d,00,\
  65,00,6e,00,74,00,09,00,38,00,09,00,33,00,09,00,34,00,30,00,30,00,30,00,00,\
  00,5a,00,69,00,70,00,09,00,38,00,09,00,36,00,09,00,34,00,30,00,30,00,30,00,\
  00,00,45,00,6d,00,61,00,69,00,6c,00,20,00,41,00,64,00,64,00,72,00,65,00,73,\
  00,73,00,09,00,38,00,09,00,31,00,31,00,09,00,34,00,30,00,30,00,30,00,00,00,\
  42,00,69,00,6c,00,6c,00,69,00,6e,00,67,00,20,00,43,00,6f,00,64,00,65,00,09,\
  00,38,00,09,00,31,00,32,00,09,00,34,00,30,00,30,00,30,00,00,00,54,00,79,00,\
  70,00,65,00,09,00,38,00,09,00,31,00,33,00,09,00,34,00,30,00,30,00,30,00,00,\
  00,55,00,73,00,65,00,72,00,31,00,09,00,38,00,09,00,31,00,34,00,09,00,34,00,\
  30,00,30,00,30,00,00,00,55,00,73,00,65,00,72,00,32,00,09,00,38,00,09,00,31,\
  00,35,00,09,00,34,00,30,00,30,00,30,00,00,00,00,00
"AddRecipients"=dword:00000001
"User1"="User1"
"User2"="User2"
"SavePBSettings"=dword:00000001

If you can offer any advice I would appreciate it.  Thank You
0
Comment
Question by:rex9875
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Shift-3
ID: 22768733
Since the settings are in the HKEY_CURRENT_USER hive, they will need to be applied for every user.  The easiest way to do this would be with the command regedit /s filename.reg in a logon script.
0
 

Author Comment

by:rex9875
ID: 22768906
I am doing that with the reg file above.  The problem that I am having is that I can't the registry to actually change the value.  The string will stay "C:\Documents and Settings\Administrator\Application Data\Alcom\Lanfax Manager"  I need the username to change to whatever user is logging in.  
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 22769304
Ok, you can have the batch script generate a .reg file on the fly and then execute it, as below.

You could also use the REG command which is included with the 2000 Support Tools, as well as Windows XP and up.


echo Windows Registry Editor Version 5.00>filename2.reg

echo.>>filename2.reg

echo [HKEY_CURRENT_USER\Software\Alcom\LanFax Manager\PhoneBook]>>filename2.reg

echo "Files"="C:\\Documents and Settings\\%username%\\Application Data\\Alcom\\LanFax Manager\\mypb.dbf;I:\\EskerFax\\COMPANYFAXBOOK.DBF;">>filename2.reg

echo "DefaultPhoneBook"="Personal phonebook (C:\\Documents and Settings\\%username%\\Application Data\\Alcom\\LanFax Manager\\mypb.dbf)">>filename2.reg
 

regedit /s filename2.reg

Open in new window

0

Featured Post

Are your end users making ugly email signatures?

Have you left it up to your end users to create their own email signatures? Are they forgetting to add the company logo or using garish font colors? Take control and ensure all users have the same email signature.

Question has a verified solution.

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

Suggested Solutions

The environment that this is running in is SCCM 2007 R2 running on a Windows 2008 R2 server. The PXE Distribution point is running on its own Windows 2008 R2 box. This is what Event viewer showed after trying to start the WDS service:  An erro…
On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now