For networked drives, need to first convert the full filename to UNC form.
Local drives do not change.
Also not that for Win64 the existing code would apply the Win16 code that is in the ELSE statements.
{$IFDEF Win32}
function IsAppOnNetwork(const ExePath : string) : Boolean;
begin
// Result := GetDriveType(PAnsiChar(ExtractFileDrive(ExePath) + '\')) = DRIVE_REMOTE; // Change this line to the following:
Result := GetDriveType(PAnsiChar(ExtractFileDrive(ExpandUNCFilename(ExePath)) + '\')) = DRIVE_REMOTE;
end;
{$ELSE}
function IsAppOnNetwork(const ExePath : string) : Boolean;
var
D : Integer;
begin
D := Ord(UpCase(ExePath[1])) - Ord('A'); {!!.07}
Result := GetDriveType(D) = DRIVE_REMOTE;
end;
{$ENDIF}