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
Answers (4)
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v "Receive Timeout" /f
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
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.
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