Solved

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

Posted on 2008-10-21
3
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 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