Jump to content
Sign in to follow this  
brook011

Scripting registry edits across all users.

Recommended Posts

brook011

First off I want to say that Autoit is a fantastic program. I've been looking for something to automate my repair solutions, and this is way beyond what I could ever ask for. That being said, I've been working with regread, regwrite, and regdelete, and so far I've been successful, up until today. I realized all of the keys I'm trying to eventually script delete are in HKU\SID\ and I'm not sure how to go about removing those, and have it function on every machine in the environment. I saw an older post about deleting all keys, I'd think you have to first write something to first poll the system's SID's and then somehow have it cycle through each SID until it got to the end, but I'm not sure. Any insight on this would be appreciated.

Share this post


Link to post
Share on other sites
mikell

Did you have a look at the example in the helpfile for RegEnumKey() ?

Share this post


Link to post
Share on other sites
brook011

I saw an example online and on another post here, fortunately, that was trying to get the SIDs, and I think I have an idea how it works. If I were to poll the registry with $var0 = regenumkey("hku64userssoftwaremicrosoft...", $i) and then have $i = +1, this is where I get a little confused as to using the variable in this data to run say a regdelete on $var0. I'm still new to this, I just set out a challenge to myself to create a manual uninstaller. If there are other examples worth me reading I would appreciate that as well, as seeing the scripts in use helps me understand autoit better :) Thanks for your response.

Edited by brook011

Share this post


Link to post
Share on other sites
careca

All you do is grab the example from the help file and tweak a bit...

So to delete the keys under a certain key...

For $i = 1 To 10
    Local $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i)
    If @error <> 0 Then ExitLoop
    RegDelete....the key to delete "HKEY_LOCAL_MACHINE\SOFTWARE" & $i
;MsgBox(4096, "SubKey #" & $i & " under HKLM\Software: ", $var) we dont need this
Next

If i got your problem right...


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
brook011

Thanks Careca, that makes sense, though I was doing some thinking and I realized I really wouldn't run into many situations where I would need to scan multiple SIDs. I should have been focusing on keeping it simple and functional. Thanks :) I'm still a bit confused as to the difference between regread and regenumkey/val.

Share this post


Link to post
Share on other sites
careca

Well, its like, read to retrieve a specific value from a specific key, enum to enumerate the keys/values inside a key.

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
brook011

Ahhh I see, so I could do regenumkey("hku64", "") and that would poll entire users key. I appreciate your help. Thank you.

Share this post


Link to post
Share on other sites
careca

Always glad to be able to help, as others helped and still do help me.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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  

×