RE: Tutorial on writing to Registery

adisegna_at_siscocorp.com
Date: 10/13/04

  • Next message: David Nardoni: "RE: Event log monitoring"
    Date: Wed, 13 Oct 2004 13:25:14 -0400
    To: <security-basics@securityfocus.com>
    
    

    Here is an example of a WSH script using the REG.EXE. This script copies
    the settings in the registry of Symantec AntiVirus Corporate Edition to
    a folder. It's basically doing a registry export from the command line
    versus using the regedit.exe GUI. This is a working script for those of
    you using Symantec AntiVirus Corporate Edition. I use it to backup my
    settings to another server in case of a server crash (saves time instead
    of restoring from a tape). Use "reg.exe Import" to put information back
    into the registry.

    Set objShell = CreateObject("Wscript.Shell")
    objShell.Exec "%comspec% /k reg.exe Export
    HKLM\Software\Intel\LANDesk\VirusProtect6\CurrentVersion
    C:\temp\Registry.reg"
    'Wscript.Echo "Backup Complete" & vbNewLine & "Contents copied to some
    secrete location"

    Thanks.

    AD
    Information Technology Group
    Security Identification Systems Corporation
     

    -----Original Message-----
    From: H Carvey [mailto:keydet89@yahoo.com]
    Sent: Wednesday, October 13, 2004 6:52 AM
    To: security-basics@securityfocus.com
    Subject: Re: Tutorial on writing to Registery

    In-Reply-To: <00fc01c4aeb8$471bb470$6401a8c0@cmp1>

    >I was wondering does anyone in here know where I could find out how to

    >run a batch file to write to the registry?

    >

    >I'm asking because for security issues that we have to upgrade for a

    >couple of machines. I just want the batch file to run rather then going

    >manual into the registry.

    You may want to look into using reg.exe from Microsoft, or using .reg
    files (via regedit /s).


  • Next message: David Nardoni: "RE: Event log monitoring"

    Relevant Pages

    • [ann] another way to call apis from script (the PB way)
      ... a dll and a typelib. ... you run the script, which will interface with a "standard" ... "COMforDLL" will work with a standard dll, ... work with win98 if I manually copied the winXP registry ...
      (microsoft.public.scripting.vbscript)
    • Re: Modify Registry on all SBS2003 clients
      ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... the following command will change the registry value as your ... You may copy above command into the login script file SBS_LOGIN_SCRIPT.bat ...
      (microsoft.public.windows.server.sbs)
    • Re: Modify Registry on all SBS2003 clients
      ... logging on the client computer dont have administrative rights on the ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... and put the command lines at the bottom of the script file. ...
      (microsoft.public.windows.server.sbs)
    • Help with Outlook profile script
      ... I would like to have a script that checks if the correct Outlook profile is configured in the users profile. ... Outlook profiles are configured in the following registry key: ...
      (microsoft.public.scripting.vbscript)
    • Re: sus office updates
      ... You can modify the registry ... or you can script a change for MSI to add ... my "encrypted" product code for Office 2003 Professional is: ...
      (microsoft.public.sms.tools)