Jump to content
Sign in to follow this  
Electon

Can I delete registry folders? Having trouble.

Recommended Posts

Electon

this code isnt working. I dont want to remove individual keys I want to remove folders but its not letting me for some reason (returning 0)

$regreturn = RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform")
MsgBox(0,"",$regreturn)

Share this post


Link to post
Share on other sites
ripdad

Your code looks correct -- it may be a permissions issue


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites
JFX

Returns 0 if the key/value does not exist

Do you have an x64 OS? If yes try this:

$regreturn = RegDelete("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform")
MsgBox(0,"",$regreturn)

Share this post


Link to post
Share on other sites
Electon

thanks. it was a permission issue. I guess I have to use admin rights to modify hklm. can anyone help me solve the problem of changing the IE browser's user agent without admin rights if its possible? I need to use the embedded browser in my app and i need to change the user agent but I dont want to require admin.

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  

×