Jump to content
Sign in to follow this  
dexter23

Delete registry value and write back

Recommended Posts

dexter23

Is possible to read some registry value, then delete that value and then write back?

I use this script, but does not work

RegRead("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
$REG1 = RegRead("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
RegDelete("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", $REG1)
RegWrite("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", $REG1)

That value is C:\Program Files\Adobe\Reader 8.0\Reader

Edited by dexter23

Share this post


Link to post
Share on other sites
weaponx

$REG1 = RegRead("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
RegDelete("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
RegWrite("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath","", $REG1)

Share this post


Link to post
Share on other sites
dexter23

It works, but with REG_SZ:

$REG1 = RegRead("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
RegDelete("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath", "")
RegWrite("HKCU\Software\Adobe\Acrobat Reader\8.0\InstallPath","","REG_SZ", $REG1)

Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×