Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need small app to modify HKEY_CURRENT_USER

Posted on 2008-10-29
3
Medium Priority
?
1,055 Views
Last Modified: 2012-08-13
Let me start off by saying I dont know how to program.  I need a tiny app that a user can run to change some settings on HKEY_CURRENT_USER.  What I am trying to achieve is covered in How to turn off e-mail matching for certificates in Outlook (http://support.microsoft.com/kb/276597 )
Basically this just entails a user editing the registry for the appropriate version of Outlook.  The problem is that the users dont have permissions to run any registry editor or even the reg.exe command and since the key is HKEY_CURRENT_USER they have to be logged in to implement the change.  
I wrote a batch file using the Reg  ADD commands.  Again the issue that the local users dont have permission to run any registry editor or Reg.exe requires that I have to have an administrator log on and give the Local Users group Read and Execute permission on Reg.exe before I can have the user run the bat file.  So I was thinking that if I had an executable that just made the changes I could have the user run it when they logged on from a shared directory.  This would eliminate two concerns; one is that my current plan leaves Reg.exe available for users to be able to run commands against. The other is that it is a two step process that requires the administrator to log onto each machine to give the local user the permission to run reg.exe. We are talking about hundreds of machines each month.
Here is the bat file I wrote:
REG ADD HKLM\SOFTWARE\Microsoft\Office\9.0\Outlook\Security /v SupressNameChecks /t REG_DWORD /d 1
REG ADD HKCU\SOFTWARE\Microsoft\Office\10.0\Outlook\Security /v SupressNameChecks /t REG_DWORD /d 1
REG ADD HKCU\SOFTWARE\Microsoft\Office\11.0\Outlook\Security /v SupressNameChecks /t REG_DWORD /d 1
REG ADD HKCU\SOFTWARE\Microsoft\Office\12.0\Outlook\Security /v SupressNameChecks /t REG_DWORD /d 1

Help!
0
Comment
Question by:NetSolve-VA
[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: 22834576
Registry values can be set with vbscript.  Paste the script below into a text file with a .vbs extension.  Running it will set the specified values, assuming that users have modify permissions to the keys in question.


Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
 
Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")
 
objRegistry.SetDWORDValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\9.0\Outlook\Security", "SupressNameChecks", 1
objRegistry.SetDWORDValue HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Office\10.0\Outlook\Security", "SupressNameChecks", 1
objRegistry.SetDWORDValue HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Office\11.0\Outlook\Security", "SupressNameChecks", 1
objRegistry.SetDWORDValue HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Office\12.0\Outlook\Security", "SupressNameChecks", 1

Open in new window

0
 

Author Comment

by:NetSolve-VA
ID: 22834760
Thank you for the quick response.  How does the user run it?
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 2000 total points
ID: 22834808
It would be simplest to run it as a logon script.  This would make the changes automatically and invisibly to users.

You don't generally want to get users in the habit of running .vbs files, as they can potentially do a lot of malicious things.  However, if this is the way you want to go then they can just double-click the file.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

704 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