|
Appendix E: Sentry Settings Structure
This code explains Sentry's stored settings in the Registry, or settings.ini, when in a portable environment.
The third parameter is the default value on Sentry's first run.
procedure TSentrySettings.Load; begin
//Load General Settings General.RunOnStartup := regLink.ReadBool('General', 'RunOnStartUp', false); General.CheckForUpdates := regLink.ReadBool('General', 'CheckForUpdates', false); General.WantsBetas := regLink.ReadBool('General', 'WantsBetas', false); General.HideSentryBar := regLink.ReadBool('General', 'HideSentryBar', DEFAULT_HIDE_SENTRYBAR); General.HideSentryBarOnMinimize := regLink.ReadBool('General', 'HideSentryBarOnMinimize', false); General.LayoutMode := regLink.ReadInteger('General', 'LayoutMode', HTML_LAYOUT_MODE); //0 normal ... 1 HTML NORMAL_LAYOUT_MODE General.LayoutFile := regLink.ReadString('General', 'LayoutFile', appPath + html_layouts_dir + 'bluegeneric.html'); //fixme final? General.WeatherMap := regLink.ReadString('General', 'WeatherMap', ''); //fixme final? General.StartupMode := regLink.ReadInteger('General', 'StartupMode', STARTUP_NORMAL); // General.IdleLaunchTime // general.sentryBarColor // general.masterIP general.showSysInfoPanel := regLink.ReadBool('General', 'ShowSysInfoPanel', true); general.defaultToMemo := regLink.ReadBool('General', 'DefaultToConsole', false); general.alwaysUseCodeEditor := regLink.ReadBool('General', 'AlwaysUseCodeEditor', false); general.noWizard := regLink.ReadBool('General', 'NoWizard', false); //Hotkey General.sHotKey := regLink.readString('General', 'sHotKey', 'Ctrl+Alt+S'); General.sHKid := regLink.ReadInteger('General', 'sHKid', 83); General.sHKmod := regLink.ReadInteger('General', 'sHKmod', 49152); //49152 General.sHKvirt := regLink.ReadInteger('General', 'sHKvirt', 83); General.hkCtrl := regLink.ReadBool('General', 'hkCtrl', true ); General.hkAlt := regLink.ReadBool('General', 'hkAlt', true); General.hkShift:= regLink.ReadBool('General', 'hkShift', false); General.hkWin := regLink.ReadBool('General', 'hkWin', false); General.hkHotKeyIndex := regLink.ReadInteger('General', 'hkHotKeyIndex', 18); //19 = S , G = 6 //Load Security Settings Security.idleLock := regLink.ReadBool('Security', 'idleLock', DEFAULT_IDLELOCK); Security.ReportSecurityEvents := regLink.ReadBool('Security', 'reportSecurityEvents', true); Security.ReportPowerEvents := regLink.ReadBool('Security', 'reportPowerEvents', true); Security.lockTime := regLink.ReadInteger('Security', 'lockTime', DEFAULT_LOCKTIME); Security.passwordHash := regLink.ReadString('Security', 'passwordHash', ''); Security.lockCDdrive := regLink.ReadBool('Security', 'lockCDdrive', true); Security.autoHide := regLink.ReadBool('Security', 'autoHide', true);//fixme //was false Security.multiUser := regLink.ReadBool ('Security', 'multiUser',false); Security.UserChangeLayout := regLink.ReadBool ('Security', 'UserChangeLayout', false); Security.UserStandby := regLink.ReadBool ('Security', 'UserStandby', false); Security.UserViewMessages := regLink.ReadBool ('Security', 'UserViewMessages', false); Security.UserViewLogs := regLink.ReadBool ('Security', 'UserViewLogs', false); Security.UserChangePass := regLink.ReadBool ('Security', 'UserChangePassword',false); Security.UserChangeSS := regLink.ReadBool ('Security', 'UserChangeSS',false); Security.UserSuspendNetwork := regLink.ReadBool ('Security', 'UserSuspendNetwork', false); Security.UserAccessHelp := regLink.ReadBool ('Security', 'UserAccessHelp', true); Security.UserChangeConsole := regLink.ReadBool ('Security', 'UserChangeConsole', false); Security.USBprompt := regLink.ReadBool ('Security', 'USBprompt',false); Security.suspendNetwork := regLink.ReadBool ('Security', 'suspendNetwork',false); Security.PreventAutoPlay := regLink.ReadBool ('Security', 'PreventAutoPlay', true); Security.AllowRemoteUnlocking := regLink.ReadBool ('Security', 'allowRemoteUnlocking', false); Security.AllowedRemoteIPs := regLink.ReadString('Security', 'AllowedRemoteIPs', DEFAULT_ALLOWED_REMOTE_IPS); Security.unlockMode := regLink.ReadInteger('Security','unlockMode', 0); Security.StopTaskMgr := regLink.ReadBool ('Security', 'StopTaskMgr', true); Security.TaskMgrScanTime := regLink.ReadInteger('Security','TaskMgrScanTime', DEFAULT_TASKMGR_SCANTIME); Security.masterIP := regLink.ReadString('Security', 'MasterIP', thelocalip); //Load ScreenSaver Settings ScreenSavers.defaultSaver := regLink.ReadString ('ScreenSavers','defaultSaver',''); ScreenSavers.loadSaverOnStartup := regLink.ReadBool ('ScreenSavers','loadSaverOnStartup',false); ScreenSavers.startupSaverDelay := regLink.ReadInteger('ScreenSavers','startupSaverDelay',30);//2min ScreenSavers.runSaverOnIdle := regLink.ReadBool ('ScreenSavers','runSaverOnIdle', true); ScreenSavers.idleDelay := regLink.ReadInteger('ScreenSavers','idleDelay', DEFAULT_SAVER_IDLEDELAY); if ScreenSavers.defaultSaver = '' then begin //set default saver ScreenSavers.defaultSaver := SysDir + '\scrnsave.scr';//blank screen end; //Load Logging Settings Logging.DoLog := regLink.ReadBool('Logging', 'DoLog', true); Logging.LogSentryStart := regLink.ReadBool('Logging', 'LogSentryStart', true); Logging.LogBadPasswords := regLink.ReadBool('Logging', 'LogBadPasswords', true); Logging.LogCDinsertion := regLink.ReadBool('Logging', 'LogCDinsertion', true); Logging.LogLockUnlock := regLink.ReadBool('Logging', 'LogLockUnlock', true); Logging.LogSentryExit := regLink.ReadBool('Logging', 'LogSentryExit', true); Logging.LogUserWhoUnlocked := regLink.ReadBool('Logging', 'LogUserWhoUnlocked', true); //Load Message Settings Messages.allowNotes := regLink.ReadBool('Messages', 'allowNotes', true); Messages.takeName := regLink.ReadBool('Messages', 'takeName', true); Messages.takeSubject := regLink.ReadBool('Messages', 'takeSubject', true); Messages.takeEmail := regLink.ReadBool('Messages', 'takeEmail', false); Messages.askName := regLink.ReadBool('Messages', 'askName', true); Messages.askSubject := regLink.ReadBool('Messages', 'askSubject', false); Messages.askEmail := regLink.ReadBool('Messages', 'askEmail', false); Messages.reqName := regLink.ReadBool('Messages', 'reqName', false); Messages.reqSubject := regLink.ReadBool('Messages', 'reqSubject', false); Messages.reqEmail := regLink.ReadBool('Messages', 'reqEmail', false); Messages.DefaultAwayMessage := regLink.ReadString('Messages', 'DefaultAwayMessage',DEFAULT_AWAY_MSG); Messages.promptForAwayMsg := regLink.ReadBool('Messages', 'PromptForAwayMsg', false); Messages.secsBeforeDefaultMsg := regLink.ReadInteger('Messages', 'secsBeforeDefaultMsg', 10); //load messages Messages.awayMessages := regLink.ReadString('Messages', 'awayMessages', DEFAULT_AWAY_MESSAGES); //Load Advanced Settings Advanced.noBrowserScrollBars := regLink.ReadBool('Advanced', 'noBrowserScrollBars', true); Advanced.noBrowserBorder := regLink.ReadBool('Advanced', 'noBrowserBorder',true); Advanced.noBrowserSelect := regLink.ReadBool('Advanced', 'noBrowserSelect',true); //Load SentryBar Settings SentryBar.color := regLink.ReadString('SentryBar','color', '$00303030'); SentryBar.statusFont := regLink.ReadString('SentryBar','statusFont',',Tahoma,8,,clLime,1,'); SentryBar.hideuntil := regLink.ReadBool('SentryBar','hideuntil', false); //Load General Settings regLink.ReadString('Appearance', '', ''); //Load General Settings regLink.ReadString('Camera', '', ''); // regLink.Free; mem('Settings Loaded.'); end; //settings.load
Parameter Description -
-