?
Solved

vbScript to edit the registry

Posted on 2010-09-19
4
Medium Priority
?
971 Views
Last Modified: 2012-06-27
I want to change the value of -

'HKEY_CURRENT_USER\Software\Microsoft\Office\12\Access\Security\VBAWarnings'

to a value of 1.

It has to be vbScript.

Can anyone help please.
0
Comment
Question by:djk001
[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
4 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 1000 total points
ID: 33713649
Hi, this should work.

Regards,

Rob.
Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\12\Access\Security\VBAWarnings", 1, "REG_DWORD"

Open in new window

0
 
LVL 5

Expert Comment

by:rvivek_2002
ID: 33713710

Option Explicit
Dim objShell, strRoot, strModify, strDelete
strRoot = "HKEY_CURRENT_USER\Software\Microsoft\Office\12\Access\Security\VBAWarnings"
' Create the Shell object
Set objShell = CreateObject("WScript.Shell")
strModify = objShell.RegWrite(strRoot,"00000001", "REG_DWORD")
strModify = null
WScript.Quit
0
 

Author Comment

by:djk001
ID: 33713751
Hi Rob
That has worked a treat.  It's clean, simple and short.  Thank you.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 33713753
No problem. Thanks for the grade.

Rob.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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