Jump to content

Recommended Posts

Posted (edited)

ok i have a script that checks if an app is in startup (registry startup), the script can enable/disable from regsitry startup also

checked=enabled for startup

unchecked=disabled from startup

so heres what happens when i run the check_startup function- when i run the check_startup function (shown below), anything that was set for startup gets unchecked.

hope this makes sense (please let me know if you need more info/clarification).

For $i = 1 To 100
$strings = RegEnumVal("hkey_local_machine\software\microsoft\windows\currentversion\run", $i)
$app = RegRead("hkey_local_machine\software\microsoft\windows\currentversion\run", $strings)

    If $app = "c:\lotus\notes\notes.exe" Then
        GUICtrlSetState($check_Notes, $GUI_CHECKED)
    Else
        GUICtrlSetState($check_Notes, $GUI_UNCHECKED)
    EndIf
Edited by gcue
  • Developers
Posted

Sounds logical to me.

If one of the RUN registry entries is Notes.exe then that would main that all others are NOT. Meaning it gets UNCHECKED.

Logic to me would be to uncheck all at creation time and only change them to Checked when the actual program is found.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

yea thats how i had it Jos. but i guess itd be nice to allow the user to check at anytime to verify settings

  • Developers
Posted

yea thats how i had it Jos. but i guess itd be nice to allow the user to check at anytime to verify settings

I do not understand the point your are making here. The registry only contains those programs that are "enabled" thus the default is disabled.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
×
×
  • Create New...