/build/static/layout/Breadcrumb_cap_w.png

Remove registry DWord in HKCU

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


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v "Receive Timeout" /f
Posted by: dugullett 12 years ago
Red Belt
4

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

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


Comments:
  • 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? - shamu99 12 years ago
    • REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v "Receive Timeout" /f - dugullett 12 years ago
  • You can also try "reg delete /?" (w/o quotes) into a CMD prompt, and it will give you switches. - dugullett 12 years ago
  • 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 ;) - brandeirofd 12 years ago
Posted by: bkelly 12 years ago
Red Belt
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.

Posted by: brandeirofd 12 years ago
Senior Yellow Belt
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

Posted by: shamu99 12 years ago
Fifth Degree Brown Belt
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..

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ