Sign in to follow this  
Followers 0
dexter23

Delete registry value and write back

3 posts in this topic

#1 ·  Posted (edited)

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

$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

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  
Followers 0