Modify registry with a batch script

Hello,

I would like to read and dynamically modify some keys in the registry.
I actually need to automatically modify the settings of Outlook Express user accounts.
(I need to change the logins of all the Outlook accounts present on the machine)

How can I read the registry from a batch program and modify it accordingly?

My program must first be compatible with Windows 2000 and Windows XP.

Thank you for your help.
Configuration: Windows XP Internet Explorer 6.0

2 answers

  • Votes
  • Date
  • Descending date
  1. Contributor
    With REG

    C:\>reg /?

    Windows Command Registry Tool - version 3.0
    Copyright (C) Microsoft Corp. 1981-2001. All rights reserved

    REG Operation [list_parameters]

    Operation [ QUERY | ADD | DELETE | COPY |
    SAVE | LOAD | UNLOAD | RESTORE |
    COMPARE | EXPORT | IMPORT ]

    Return code: (except for REG COMPARE)

    0 - Success
    1 - Failure

    To get help on a specific operation type:

    REG Operation /?

    Examples:

    REG QUERY /?
    REG ADD /?
    REG DELETE /?
    REG COPY /?
    REG SAVE /?
    REG RESTORE /?
    REG LOAD /?
    REG UNLOAD /?
    REG COMPARE /?
    REG EXPORT /?
    REG IMPORT /?

    or create a .reg text file and use regedit
    Advanced techniques regarding the Windows Registry

    http://www.hotline-pc.org/basederegistre.htm
    1. Thank you, but it's not simple.

      In the end, I'm going to turn to vbscript. I'm going to open a new post.
    2. Hello, I don’t know if this is the right place to post this, but I would like to disable the automatic detection of USB hard drives, only on startup. For that, I know I need to modify the registry at this level:

      HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ UsbStor
      4 Disable AND 3 Enable

      And if I understood correctly, with the modification above, I would have to reboot. However, I would like to have a program, or simply by clicking on it, it starts the detection of USB drives when I need to use them (to speed up the PC startup)

      Is that possible? If anyone has information on this, or a link, it would be really nice to share. Thank you in advance.
  2. Hi, I suppose you don't want your computer to boot with the USB stick inserted as the boot disk

    to prevent this, disable USB booting in your BIOS
    1. or the USB drive, to correct