wStartUp = {} function wStartUp.Add(hKey, pName, pPath) if hKey == HKEY_LOCAL_MACHINE then Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", pName, pPath, REG_SZ); elseif hKey == HKEY_CURRENT_USER then Registry.SetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", pName, pPath, REG_SZ); end end function wStartUp.Remove(hKey, pName) if hKey == HKEY_LOCAL_MACHINE then Registry.DeleteValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", pName); elseif hKey == HKEY_CURRENT_USER then Registry.DeleteValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", pName); end end function wStartUp.ListNames(hKey) if hKey == HKEY_LOCAL_MACHINE then wsTbl = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); local sList = {} for i,v in wsTbl do sList[i] = v end return sList elseif hKey == HKEY_CURRENT_USER then wsTbl = Registry.GetValueNames(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run"); local sList = {} for i,v in wsTbl do sList[i] = v end return sList end end function wStartUp.ListData(hKey) if hKey == HKEY_LOCAL_MACHINE then wsTbl = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); local sList = {} local sList2 = {} for i,v in wsTbl do sList[i] = v end for i,v in sList do sList2[i] = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", v, true); end return sList2 elseif hKey == HKEY_CURRENT_USER then wsTbl = Registry.GetValueNames(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run"); local sList = {} local sList2 = {} for i,v in wsTbl do sList[i] = v end for i,v in sList do sList2[i] = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", v, true); end return sList2 end end