mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Updatecheck: Find a batchfile-solution to replace the running exe with a downloaded build.
TODO: find some sleep command for the batch file, as we sometimes get "access denied" while trying to overwrite the just terminated exe. Seems like taskkill doesn't close all handles itself.
This commit is contained in:
@ -85,6 +85,7 @@ type
|
||||
function TColorToHex( Color : TColor ): string;
|
||||
function GetVTCaptions( VT: TVirtualStringTree; OnlySelected: Boolean = False; Column: Integer = 0 ): TStringList;
|
||||
function Pos2(const Needle, HayStack: string; const StartPos: Integer) : Integer;
|
||||
function GetTempDir: String;
|
||||
procedure ExtractUpdater;
|
||||
procedure UpdateItWith(const _file: String);
|
||||
|
||||
@ -2138,6 +2139,15 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function GetTempDir: String;
|
||||
var
|
||||
TempPath: array[0..MAX_PATH] of Char;
|
||||
begin
|
||||
GetTempPath(MAX_PATH, @TempPath);
|
||||
Result := StrPas(TempPath);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{**
|
||||
Extract the updater from resource.
|
||||
|
Reference in New Issue
Block a user