acetate
asked on
win2k domain - delete registry key upon login
hello,
i want to delete a HKEY Current USer registry value with a login script, can anyone provide the syntax please?
thanks
i want to delete a HKEY Current USer registry value with a login script, can anyone provide the syntax please?
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm assuming you already know how to merge a reg file via login script. Here is the syntax to remove keys and values using a reg file.
Of course you know that to add a new value and data, you structure the file like this:
REGEDIT4
[HKEY_CURRENT_USER\DummyKe y]
"NewValue"="NEWDATA"
If you want to delete a value, create a reg file with the value you're after and add a minus sign after the equals. In other words, replace the value data with a minus sign, like this:
REGEDIT4
[HKEY_CURRENT_USER\DummyKe y]
"NewValue"=-
If on the other hand you want ot delete a entire key, add a minus sign before the key name [but inside the brackets] like this:
REGEDIT4
[-HKEY_CURRENT_USER\DummyK ey]
Of course, if all you want to do is remove the data but not the key or the value, it would be:
[HKEY_CURRENT_USER\DummyKe y]
"NewValue"=""
Of course you know that to add a new value and data, you structure the file like this:
REGEDIT4
[HKEY_CURRENT_USER\DummyKe
"NewValue"="NEWDATA"
If you want to delete a value, create a reg file with the value you're after and add a minus sign after the equals. In other words, replace the value data with a minus sign, like this:
REGEDIT4
[HKEY_CURRENT_USER\DummyKe
"NewValue"=-
If on the other hand you want ot delete a entire key, add a minus sign before the key name [but inside the brackets] like this:
REGEDIT4
[-HKEY_CURRENT_USER\DummyK
Of course, if all you want to do is remove the data but not the key or the value, it would be:
[HKEY_CURRENT_USER\DummyKe
"NewValue"=""
Oops! this is a Windows 2000 question! The proper header for the file should be:
Windows Registry Editor Version 5.00
instead of
REGEDIT4
(although both will work)
And also sorry for the spelling and grammar errors...
Windows Registry Editor Version 5.00
instead of
REGEDIT4
(although both will work)
And also sorry for the spelling and grammar errors...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Download ftp://ftp.mountpoint.ch/pub/users/flo/regdel.zip.
Extract file regdelw.exe from it, and put it under %windir% (Windows directory).
2. In the startup folder (%userprofile%\Start Menu\Programs\Startup), create a text file and put this line into the file :
regdelw "give_here_the_key_to_be_d
3. Save this file with any name, and extension of either .bat or .cmd