philipharvey Posted May 28, 2004 Posted May 28, 2004 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
ezzetabi Posted May 28, 2004 Posted May 28, 2004 (edited) Strange and true... What about a UFD? Func _RegWriteEmptyKey($KeyName) RegWrite("$KeyName","junk","REG_SZ","") Return(RegDelete("$KeyName","junk")) EndFunc Edited June 8, 2004 by ezzetabi
philipharvey Posted June 3, 2004 Author Posted June 3, 2004 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
philipharvey Posted June 8, 2004 Author Posted June 8, 2004 Hi ezzetabi. I wasn't meaning to jump down your throat, any help is always appreciated. Cheers Philip
Administrators Jon Posted June 8, 2004 Administrators Posted June 8, 2004 I should be able to make it so that if you only give a keyname it is created without any values. I'll add it to my list. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted June 15, 2004 Administrators Posted June 15, 2004 I've made RegWrite accept a single parameter as a key to create without setting any values. It will be available the next time I upload an unstable version. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
SlimShady Posted June 15, 2004 Posted June 15, 2004 I've made RegWrite accept a single parameter as a key to create without setting any values. It will be available the next time I upload an unstable version.Thank you.
philipharvey Posted July 6, 2004 Author Posted July 6, 2004 Super news Jon, thanks for looking into this. Cheers Phil
blitzer99 Posted July 7, 2004 Posted July 7, 2004 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). Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3
CyberSlug Posted July 7, 2004 Posted July 7, 2004 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now