Jump to content
Sign in to follow this  
ahmettben

regedit to delete the key reading

Recommended Posts

ahmettben

How do I delete both and reads :oops:

#include <buttonconstants.au3>#include <guiconstantsex.au3>#include <windowsconstants.au3>Opt("GUIResizeMode", 802)Dim $checkler[1] = [0]$run1 = "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun"$run2 = "HKCUSoftwareMicrosoftWindowsCurrentVersionRun"$msconfig = "HKLMSOFTWAREMicrosoftShared ToolsMSConfigstartupreg";if button clicks delete$Button1 = GUICtrlCreateButton("select-run1", 108, 400, 75, 25)$Button2 = GUICtrlCreateButton("select-run2", 272, 400, 75, 25)$Button3 = GUICtrlCreateButton("select-msconfig-delete", 436, 400, 75, 25)$gui = GUICreate("test", 620, 474)GUICtrlSetResizing (-1, 856)$y = 25for $i = 1 to 100000$reg = RegEnumVal ($run1,$run2, $msconfig, $i)if $reg = "" Then    ExitLoopElse    ReDim $checkler[$i] $checkler[$i-1] = GUICtrlCreateCheckbox($reg,20,$y,200,20)  $y += 25EndIfNextWinMove($gui,"",Default,Default,200,$y + 50)GUISetState()While 1   $nmsg = GUIGetMsg() if $nmsg = -3 Then      Exit    EndIfWEnd
Edited by ahmettben

Share this post


Link to post
Share on other sites
ripdad

hi ahmettben,

a few problems first ...

1.

$reg = RegEnumVal ($run1, $run2, $msconfig, $i)

In the code above, you are trying to enumerate values 3 keys at once. You can only enumerate values 1 key at a time.

2.

You can use RegEnumVal to enumerate values for the "Run" keys...but Not for the "startupreg" key, since there are subkeys under it. You'll have to use RegEnumKey first, before you can use RegEnumVal.

3.

The GUI is not configured properly. You can look in the helpfile for examples under: GUICreate.

Or search the forum for examples.

Buttons go under $gui = GUICreate("test", 620, 474, -1, -1)

---

Perhaps if you provide more information on how you want your script to work, then we could better assist you.


"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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.