Jump to content

Create registry key?


Recommended Posts

Is there a simple way to create a completly empty registry key in autoit? The only way I can figure to do this is to create a value and then delete it. e.g.

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test","junk","REG_SZ","")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Test","junk")

If you simply do

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test","","REG_SZ","")

then the keys default value does not seem to get set (or rather not set) correctly.

Cheers

Philip

Link to comment
Share on other sites

Strange and true...

What about a UFD?

Func _RegWriteEmptyKey($KeyName)
    RegWrite("$KeyName","junk","REG_SZ","")
    Return(RegDelete("$KeyName","junk"))
EndFunc
Edited by ezzetabi
Link to comment
Share on other sites

Hi ezzetabi.

I realize I could write a function to do this, but what I was getting at was is this a bug in Autoit that could be fixed?

Or perhaps a missing feature that could easily be added?

Or perhaps someone knows how to do this but it isn't documented?

Cheers

Phil

Link to comment
Share on other sites

  • 3 weeks later...

Just a vote of thanks from someone who uses the capabilities of AutoIt3 to read and update the Windows registry a lot. I must say that AutoIt is really great at doing this! I have found it a dream to code and works really well. I have used some computer languages where the registry syntax is almost incomprehensible and a nightmare to debug. I won't mention names in case I attract a whole heap of flame messages, but I think you will be able to see what I mean. (Whoops, no pun intended). :ph34r:

Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3

Link to comment
Share on other sites

Just a vote of thanks from someone who uses the capabilities of AutoIt3 to read and update the Windows registry a lot.

By the way, there are some good scripts by Dan et al. for converting .reg files to autoit3 scripts. Just letting you know; I think it's gotten buried in the scripts and scraps forum.
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...