Simon336697
asked on
Deleting Registry Keys
Hi guys hope you are well and can help.
Guys, I have the following requirement and would love to create a vbscript to do this.
1) Delete the following registry keys (if they exist).
HKEY_LOCAL_MACHINE\Softwar e\McAfee\H IP
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentCon trolSet\Se rvices\Ent erceptAgen t
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentCon trolSet\Se rvices\Fir eHook
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentCon trolSet\Se rvices\fir elm01
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentCon trolSet\Se rvices\Fir ePM
HKEY_LOCAL_MACHINE\SYSTEM\ CurrentCon trolSet\Se rvices\Fir eTDI
2) Delete the following folder
C:\Program Files\McAfee\Host Intrusion Prevention
3) Delete the following files
C:\Windows\System32\FireCL .dll
C:\Windows\System32\FireCN L.dll
C:\Windows\System32\FireCo re.dll
C:\Windows\System32\FireEp o.dll
C:\Windows\System32\FireNH C.dll
C:\Windows\System32\FireSC V.dll
The end result would be something like the below as a hta file:
-------------------------- ---------- --------- delreg.hta
Please enter a computer name: _______________
<Run>
On running, the outcome of each step would be seen eg.
Running Step 1).......... completed.
Running Step 2).......... completed.
Running Step 3).......... completed.
Script finished.
Any help greatly appreciated.
Guys, I have the following requirement and would love to create a vbscript to do this.
1) Delete the following registry keys (if they exist).
HKEY_LOCAL_MACHINE\Softwar
HKEY_LOCAL_MACHINE\SYSTEM\
HKEY_LOCAL_MACHINE\SYSTEM\
HKEY_LOCAL_MACHINE\SYSTEM\
HKEY_LOCAL_MACHINE\SYSTEM\
HKEY_LOCAL_MACHINE\SYSTEM\
2) Delete the following folder
C:\Program Files\McAfee\Host Intrusion Prevention
3) Delete the following files
C:\Windows\System32\FireCL
C:\Windows\System32\FireCN
C:\Windows\System32\FireCo
C:\Windows\System32\FireEp
C:\Windows\System32\FireNH
C:\Windows\System32\FireSC
The end result would be something like the below as a hta file:
--------------------------
Please enter a computer name: _______________
<Run>
On running, the outcome of each step would be seen eg.
Running Step 1).......... completed.
Running Step 2).......... completed.
Running Step 3).......... completed.
Script finished.
Any help greatly appreciated.
ASKER
HIi astroviper,
Thanks so much for your help.
astro,
Does your script cater for registry keys that do not exist, or if the folder on disk does not exist?
Thanks so much for your help.
astro,
Does your script cater for registry keys that do not exist, or if the folder on disk does not exist?
The "On Error Resume Next" part at the top means that it will fail silently if the key or the folder/file doesn't exist. It was easier for me at the time... If you need it I could try putting in some feedback as to whether or not the operations were successful.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks so much astro :>)
Open in new window