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

x
?
Solved

batch file registry change

Posted on 2011-03-09
4
Medium Priority
?
980 Views
Last Modified: 2012-05-11
I need to create a batch file that makes a registry change. The reg change is this:

Locate and then select the following subkey in the registry:
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Options\Calendar
On the Edit menu, point to New, and then click DWORD Value.
Type EnableDirectBooking, and then press ENTER.
Right-click EnableDirectBooking, and then click Modify.
In the Value data box, type 1, and then click OK.

reference: http://support.microsoft.com/kb/982774

The goal is to create a batch that techs can execute to make the reg change. Thxs
0
Comment
Question by:DEFclub
[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
4 Comments
 
LVL 16

Accepted Solution

by:
sjklein42 earned 2000 total points
ID: 35085897
Set up the registry key just the way you want it in one machine's registry.

Then, right-click on that entry (in regedit) and select Export.  Save the "reg" file somewhere.

Distribute the "reg" file.

Subsequently, double-clicking on the new "reg" file will add the registry entry to a machine.
0
 

Author Closing Comment

by:DEFclub
ID: 35085917
ahh thats right - thxs
0
 
LVL 7

Expert Comment

by:Rommel Sultan
ID: 35085958
Heres a vbs might help you
const HKEY_CURRENT_USER = &H80000001
sComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & sComputer & "\root\default:StdRegProv")
sKeyPath = "Software\Microsoft\Office\14.0\Outlook\Options\Calendar"
oReg.CreateKey HKEY_CURRENT_USER,sKeyPath
sValueName = "EnableDirectBooking"
dwValue = 1
oReg.SetDWORDValue HKEY_CURRENT_USER,sKeyPath,sValueName,dwValue

Open in new window

0
 
LVL 4

Expert Comment

by:Joseph Ruiz
ID: 35086115
Just take this but of code and save it to a batch file:
reg add HKCU\Software\Microsoft\Office\14.0\Outlook\Options\Calendar /v EnableDirectBooking /t REG_DWORD /d 1

Open in new window


Here are instructuins on how to make more:
Console Registry Tool for Windows - version 3.0
Copyright (C) Microsoft Corp. 1981-2001.  All rights reserved

REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]

  KeyName  [\\Machine\]FullKey
           Machine  Name of remote machine - omitting defaults to the current
                    machine Only HKLM and HKU are available on remote machines
           FullKey  ROOTKEY\SubKey
           ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
           SubKey   The full name of a registry key under the selected ROOTKEY

  /v       The value name, under the selected Key, to add

  /ve      adds an empty value name <no name> for the key

  /t       RegKey data types
           [ REG_SZ    | REG_MULTI_SZ  | REG_DWORD_BIG_ENDIAN    |
             REG_DWORD | REG_BINARY    | REG_DWORD_LITTLE_ENDIAN |
             REG_NONE  | REG_EXPAND_SZ ]
           If omitted, REG_SZ is assumed

  /s       Specify one charactor that you use as the separator in your data
           string for REG_MULTI_SZ. If omitted, use "\0" as the separator

  /d       The data to assign to the registry ValueName being added

  /f       Force overwriting the existing registry entry without prompt

Examples:

  REG ADD \\ABC\HKLM\Software\MyCo
    Adds a key HKLM\Software\MyCo on remote machine ABC

  REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
    Adds a value (name: Data, type: REG_BINARY, data: fe340ead)

  REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
    Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\0mail\0\0)

  REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %%systemroot%%
    Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
    Notice:  Use the double percentage ( %% ) inside the expand string

0

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

721 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