Sign in to follow this  
Followers 0

regedit to delete the key reading

2 posts in this topic

#1 ·  Posted (edited)

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

hi ahmettben,

a few problems first ...


$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.


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.


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.

"Today's scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality." ~ Nikola Tesla

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