Hi all,

I need to remove the DWORD registry from the HKCU. I found the following script through other forums. When manually I run the batch script, it removes the registries, but through the deployment tool radia it does not.

here is the batch script

@echo off
echo REGEDIT4> %TEMP%.\T1.DAT
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]>> %TEMP%.\T1.DAT
echo "Receive Timeout"=->> %TEMP%.\T1.DAT
REGEDIT /S %TEMP%.\T1.DAT
del %TEMP%.\T1.DAT

 

And the command line to run this in radia is

hide.exe cmd.exe /q /c C:\location\PreInstall.cmd

Please guide me , if i need to do any changes, or how I can get this working

Thanks in advance

Answer Summary:
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v "Receive Timeout" /f
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

4

How many keys are you deleting? Why not use REG DELETE?

REG DELETE KeyName [/v ValueName | /ve | /va] [/f]

Answered 06/06/2012 by: dugullett
Red Belt

  • Just one under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Receive Timeout which has some value

    So you mean
    REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings [/v Receive Timeout | /ve |/va] [/f]

    This does NOT remove manually itself.. Is my syntax wrong?
    • REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v "Receive Timeout" /f
  • You can also try "reg delete /?" (w/o quotes) into a CMD prompt, and it will give you switches.
  • Copy the followig code in a txt file:

    REGEDIT4

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
    "Receive Timeout"=-

    Save it with reg extension

    Create a batch file with this code:

    @echo off
    regedit /s yourfilename.reg

    More info at: http://support.microsoft.com/kb/310516

    -----
    PD: sorry if my english sintax isnt right ;)
Please log in to comment

Answers

1

If the problem only occurs when using your deployment solution (Radia), I would say the problem is that your script references HKEY_CURRENT_USER which will represent the account being used to run the script (likely a service account or local system account). I don't know Radia enough to say, but if you can, specify that the script should run in the context of the current user. You might also try using a logon script as this does run in the context of the local user.

Answered 06/07/2012 by: bkelly
Red Belt

Please log in to comment
0

Copy the followig code in a txt file:


REGEDIT4


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"Receive Timeout"=-


Save it with reg extension


Create a batch file with this code:


@echo off
regedit /s yourfilename.reg


More info at: http://support.microsoft.com/kb/310516

Answered 06/08/2012 by: brandeirofd
Senior Yellow Belt

Please log in to comment
0

I tried both brandeirofd and bkelly, it manually works but I still have the same issue when deploying... I tried running per user when deploying, it did  not work either..

Answered 06/08/2012 by: shamu99
Fifth Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share