Announcement

Collapse
No announcement yet.

Delete select values from a registry key on a remote system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Re: Delete select values from a registry key on a remote system

    If you notice in the command, psexec is what is being used. Psexec runs that batch file from the remote machine.

    Leave a comment:


  • rtmcmullen
    replied
    Re: Delete select values from a registry key on a remote system

    I cannot do this either... when the hyena tool calls the batch file, will this batch file then copy the .bat file to the selected workstations?

    COPY "\\server\Scripts\Hyenatools\fixRA.vbs" "%WINDIR%\temp\fixRA.vbs"

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: Delete select values from a registry key on a remote system

    Just make sure the path to the vbs file is correct. Remember, any path name with a space or other "special" character requires the entire path to be enclosed with quotes.

    Leave a comment:


  • rollee
    replied
    Re: Delete select values from a registry key on a remote system

    hi trammel!

    the scriptcode is ok!
    but i have a problem with command line for hyena:

    \\server\scripts\HyenaTools\Pstools\psexec.exe \\%E% -u domain\userid -p password -c -f "\\server\Scripts\HyenaTools\Scripts\fixRA.bat "

    i will always got an error.
    the directory with fixra.vbs wasn't found!

    thanks

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: Delete select values from a registry key on a remote system

    Ok, first you need to make a vbs file. Here is the code of one of mine. You need to alter for your keys. (of course)
    'Copy from here down
    Dim WshShell
    Set WshShell = WScript.CreateObject("WScript.Shell")

    On Error Resume Next

    WshShell.RegDelete "HKLM\SYSTEM\RAdmin\v2.0\Server\Users\Shared PHX MIS OPS"
    WshShell.RegDelete "HKLM\SYSTEM\RAdmin\v2.0\Server\Users\Shared PHX MIS Help"
    WshShell.RegDelete "HKLM\SYSTEM\RAdmin\v2.0\Server\Users\PHX ADM MIS OPS PC"
    WshShell.RegDelete "HKLM\SYSTEM\RAdmin\v2.0\Server\Users\PHX ADM MIS OPS HD"

    WScript.Echo "RA Registry Entries removed."
    'End

    Now you need a couple more things. First you need to get your self PStools. You have two options here. You can use a shared drive on the network (if your sharing tools with others) or you your local machine. I am going to write the rest of my tools using a shared path. (cause that's what I use)
    You need a batch file now.
    REM copy from here down
    @ECHO OFF
    ECHO Removing old registry values

    COPY "\\server\Scripts\Hyenatools\fixRA.vbs" "%WINDIR%\temp\fixRA.vbs"
    cscript %windir%\temp\fixRA.vbs

    ECHO Registry value has been removed.

    REM PAUSE

    Now for the command line in the Hyena Tools section. Name it what ever you want.

    \\server\scripts\HyenaTools\Pstools\psexec.exe \\%E% -u domain\userid -p password -c -f "\\server\Scripts\HyenaTools\Scripts\fixRA.bat "

    I design all my tools to use a shared folder on the network because we have 4 Administrators and we all share the config.ini You can change the command line to run the PSexec from your machine. This should get you going where you wanted to. You can select 1 or up to 20 machines. The PSExec actualy run's the batch file on the remote machine.

    [This message has been edited by Trammel (edited 05-07-2004).]

    Leave a comment:


  • kstanush
    replied
    Re: Delete select values from a registry key on a remote system

    There are probably a few Resource Kit tools that can accept command line registry operations. Then, by using Hyena's Tools->Generate Macro option, you can just build a batch file to do it.

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Delete select values from a registry key on a remote system

    Delete select values from a registry key on a remote system

    I would like to remove some specific registry string values from a remote system. I would like to know how I can use Hyena custom tools to remove these values via a .reg file. I would like to be able to do this on individual PC's or select a group of PC's and have the registry values deleted remotely when I run the tool.

    I have tried on my own but I can't seem to get the right syntax for the tool.

    Thanks
Working...
X