Solved

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

Posted on 2008-10-21
3
300 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Problem Description: Actually I found the below issue with some customers after migration from SMS 2003 to SCCM 2007 and epically if they change site code, some clients may appear in the console with old site code, plus old sites still appearing …
Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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