Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TfrmMenu.tmrShowAppIconsTimer(Sender: TObject);
- var
- stringsAutoStart: TStrings;
- strPortableAppsPath, strOptions: string;
- iniSettingsFile: TINIFile;
- intCounter: integer;
- begin
- tmrShowAppIcons.Enabled:=false;
- SetupButtons;
- SortButtons;
- DisplayButtons;
- if btnAppButton01.Visible and (frmMenu.Showing) then
- btnAppButton01.SetFocus;
- if length(arrMenuItems)=0 then
- GetMoreAppsClick(nil)
- else
- begin
- if bolUpdateAutomatically then begin
- bolAwaitingAutomaticUpdateProgress:=true;
- strOptions:='/STARTUP=true /MODE=UPDATE';
- if bolShowUpdaterStarupErrors then
- strOptions:=strOptions + ' /STARTUPSHOWERRORS=true';
- if bolKeyboardFriendly then
- strOptions:=strOptions + ' /KEYBOARDFRIENDLY=true'
- else
- strOptions:=strOptions + ' /KEYBOARDFRIENDLY=false';
- if bolBetaPlatformReleases then
- strOptions:=strOptions + ' /BETA=true'
- else
- strOptions:=strOptions + ' /BETA=false';
- ShellExecute(0,'open', PChar(ExtractFileDir(Application.ExeName) + '\PortableAppsUpdater.exe'), PChar(strOptions), Nil, SW_SHOWNORMAL);
- end;
- // Autorun apps
- stringsAutoStart := TStringList.Create;
- strPortableAppsPath := ExtractFileDir(ExtractFileDir(Application.ExeName))+'\';
- iniSettingsFile:=TINIFile.Create(ExtractFileDir(Application.ExeName) + '\Data\PortableAppsMenu.ini');
- try
- if iniSettingsFile.SectionExists('AppsAutoStart') then
- begin
- iniSettingsFile.ReadSection('AppsAutoStart',stringsAutoStart);
- if stringsAutoStart.Count > 0 then
- for intCounter := 0 to stringsAutoStart.Count-1 do
- begin
- if FileExists(PChar(strPortableAppsPath+stringsAutoStart[intCounter])) then
- ShellExecute(0,'open', PChar(strPortableAppsPath+stringsAutoStart[intCounter]+#0),Nil, PChar(ExtractFileDir(strPortableAppsPath+stringsAutoStart[intCounter])), SW_SHOWNORMAL);
- end;
- end;
- finally
- iniSettingsFile.Free;
- end;
- stringsAutoStart.free;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement