Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Erase List of Typed URLs 2

Status
Not open for further replies.

Pleonasm

Technical User
May 20, 2004
121
CA
The registry key [tt]HKCU\Software\Microsoft\Internet Explorer\TypedURLs[/tt] contains each URL typed by the user into the Internet Explorer address bar.

My objective is to overwrite ("erase") the contents of all values in that registry key before deleting them, for increased security. The script below accomplishes the "delete" portion of the task:

[tt]Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Internet Explorer\TypedURLs"
objRegistry.EnumValues HKEY_CURRENT_USER, strKeyPath, arrValueNames, arrValueTypes
For Each strValue in arrValueNames
objRegistry.DeleteValue HKEY_CURRENT_USER,strKeyPath,strValue
Next[/tt]
Source:

How can this script be modified to first overwrite ("erase") the contents of each value before it is deleted?

Thank you for your assistance.
 
Why would you want to delete the value if you're going to delete it anyway?

In any case, to set a value for each string in the path you would place the following in the area where you currently have your objRegistry.DeleteValue

objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValue, "somevalue you choose"

dm4ever
--------------------------------------------------------------------------------
My approach to things: K.I.S.S - Keep It Simple Stupid
 
Dm4ever, thank you for your helpful post.

The reason for wanting to overwrite the registry value before deleting it is to help ensure that original contents of the value cannot be recovered.
 
Then you'd better worry about system recovery copies.

I'm not aware of registry settings being "recoverable". I'll check with my forensics guy.

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
Want to know how email works? Read for yourself -
 
58sniper, by "system recovery copies," do you mean System Restore points (Windows XP)?

Please do post whatever you learn from your conversation with your "forensics guy".

Thank you.
 
Just heard from him this morning. He handles criminal forensics work for law enforcement agencies and huge companies.

Anyways, he said a value cannot be retrieved once it's changed (to another value, or to NULL).

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
Want to know how email works? Read for yourself -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top