Solved

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

Posted on 2008-10-21
3
295 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 corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

Consider a situation when you deploy a seemingly harmless software package to your network without testing and therefore without fully knowing the implications of your actions. I was recently involved in just this situation when a corporate IT netwo…
1. Boot PC and press F10, select storage options and change the compatibility from “AHCI” to “IDE”, save and exit 2. Boot PC and press F12 3. Upon PXE display of searching for DHCP server, press Pause break to obtain MAC address 3. Open Configu…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

10 Experts available now in Live!

Get 1:1 Help Now