Sign in to follow this  
Followers 0
Ixel

Script Syntax

6 posts in this topic

Here is a portion of my script that deletes some reg keys...

runwait(regdelete("HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\test"))

runwait(regdelete("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\test1"))

runwait(regdelete("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\test2"))

runwait(regdelete("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\test3"))

Is this script syntax correct?

Share this post


Link to post
Share on other sites



god damned spotty wireless, second post lost.

rtfm.

RegDelete

--------------------------------------------------------------------------------

Deletes a key or value from the registry.

RegDelete ( "keyname" [, "valuename"] )

Parameters

keyname The registry key to write to.

valuename [optional] The valuename to delete.

Return Value

Success: Returns 1.

Special: Returns 0 if the key/value does not exist.

Failure: Returns 2 if error deleting key/value.

Remarks

A registry key must start with "HKEY_LOCAL_MACHINE" or "HKEY_USERS" or "HKEY_CURRENT_USER" or "HKEY_CLASSES_ROOT" or "HKEY_CURRENT_CONFIG". The key must be upper case!

Deleting from the registry is potentially dangerous--please exercise caution!

Related

RegRead, RegWrite

Example

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey")


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

If you're using AutoIt v3.0.101, you could use the RegDelete() function to delete registry entries (It's in the documentation). Here's a sample from the doc:

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey")

Hope this helps!

-MX-

Share this post


Link to post
Share on other sites

god damned spotty wireless, second post lost.

Jon's guide to forums.

Type message

Press Ctrl+A then Ctrl+C

Click Post

After internet dies/forum craps out, paste and send again :D

Share this post


Link to post
Share on other sites

yeah, I used to do that all the time, gotta get back in the habbit. using opera sometimes helps too.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Jon's guide to forums.

Type message

Press Ctrl+A then Ctrl+C

Click Post

After internet dies/forum craps out, paste and send again  :D

I got in that habit too (with the old forums)! :huh2:

Mozilla Firefox has also saved me a lot of grief at other forms when I forget to Ctrl+A,C: (Mozilla's File menu > Work Offline > page back > Work Online)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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