Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Registry Settings 1

Status
Not open for further replies.

cwsstins

MIS
Aug 10, 2004
412
US
I have about 25 machines (XP Pro) that I need to update to use Lotus Notes as the default email program. Rather than hitting each desktop, I'd like to have the users run a batch file that merges a .reg file. I've identified the registry keys/sub-keys that need to be updated, but for some reason one of them just will not update to the value data I'm entering.

I'm using value data that is populated into the registry when I change the default program to Lotus Notes manually through the Windows interface...here's the contents of my .reg file:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
@="Lotus Notes"

[HKEY_CLASSES_ROOT\mailto]
@=""

[HKEY_CLASSES_ROOT\mailto]
"URL Protocol"=""

[HKEY_CLASSES_ROOT\mailto]
"EditFlags"=-

[-HKEY_CLASSES_ROOT\mailto\DefaultIcon]

[HKEY_CLASSES_ROOT\mailto\Shell\Open\Command]
@=c:\program files\notes\notes.exe %1

Everything works except for the last line item. The Command sub-key will not update to the value data I entered. If I change the value data to something else ("test", for instance), it does update. So what is the problem with c:\program files\notes\notes.exe %1? I've tried variants of this path, such as with quotes around the exe file/with the %1, even with a path to the notes.ini, but it just will not change.

So the default value for the email program changes to Lotus Notes in the Windows interface, but when a user clicks a mailto: link, it's still opening MS O.E. or walks them through a wizard...any suggestions?

 
I've already tried several variations on quotes, such as:

"c:\program files\notes\notes.exe %1"
"c:\program files\notes\notes.exe" %1
""c:\program files\notes\notes.exe %1""
""c:\program files\notes\notes.exe" %1"

None of these has worked...

stinsman
 
try

"%ProgramFiles%\notes\notes.exe" /mailurl:%1

<Do I need A Signature or will an X do?>
 
OK ..... if it updates the value to "test" but not what you require, can you change that key first to "test" at the start of the batch procedure & then to the correct value at the end of it (effective 2x changes ) ???

<Do I need A Signature or will an X do?>
 
TVM Bill ..... Skimming the link you posted, maybe my "Sneakey B" trick won't quite do the trick :)

<Do I need A Signature or will an X do?>
 
That doesn't work either...but I think I've narrowed down the problem. It looks like it won't update to a value that contains a \.

I entered this as the value data:
%Problem%Files%notes%notes.exe

and it updated. But the moment I entered a \ into any portion of that value, it would not update).

Yet, when I change it manually through Internet Options, the registry value changes to: c:\program files\notes\notes.exe %1
 
Download RegSnap. Start on a fresh machine, take a registry snapshot, make your changes manually, take another snapshot, run the compare and generate .reg files.

You may have to edit out some extraneous registry changes, but you will get every setting you need and the exact sytnax.

[purple]Jeff
It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
 
I think the issue is that you are dealing with a REG_SZ key, and this is not right:
[HKEY_CLASSES_ROOT\mailto\Shell\Open\Command]
@=c:\program files\notes\notes.exe %1

(I am quoting your original).

The default would appear something like this:
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@=hex(2):22,25,50,72,6f,67,72,61,6d,46,69,6c,65,73,25,5c,4f,75,74,6c,6f,6f,6b,\
20,45,78,70,72,65,73,73,5c,6d,73,69,6d,6e,2e,65,78,65,22,20,2f,6d,61,69,6c,\
75,72,6c,3a,25,31,00

REG_SZ replacements are a little tricky. MasterRacker's suggestion above seems a good one.

 
Guys, thanks for your suggestions...I downloaded RegSnap and you're right MasterRacker, it's a very useful tool.

Looks like HKEY_CLASSES_ROOT\mailto and all sub-keys are mapped through HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto...so I guess that's the key I should be concerned with. I'll have to go about re-writing that .reg.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top