Jump to content

tgbs

Members
  • Content Count

    93
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tgbs

  1. UniqueString(CmdLine); Before CreateProcess ?
  2. function RunProcess(CommandLine: String; Var ErrMessage : String; WaitForProcess : Boolean; CreationFlags : Word): Boolean; Var ResultCode : LongWord; StartInfo: TStartUpInfo; ProcInfo: TProcessInformation; begin Result := False; ResultCode := 1; FillChar(StartInfo, SizeOf(TStartUpInfo), #0); FillChar(ProcInfo, SizeOf(TProcessInformation), #0); StartInfo.cb := SizeOf(TStartUpInfo); StartInfo.dwFlags := STARTF_USESHOWWINDOW; // StartInfo.wShowWindow := SW_SHOWMINIMIZED; UniqueString(CommandLine); try try IF NOT CreateProcess(nil, PChar(CommandLine), nil, nil, FALSE, CreationFlags, nil, nil, StartInfo, ProcInfo) THEN BEGIN ErrMessage := SysErrorMessage(GetLastError); Exit; END; except on e : exception do begin ErrMessage := e.Message + #13#10 + SysErrorMessage(GetLastError); Exit; end; end; if not WaitForProcess then ResultCode := 0 else begin WaitForSingleObject(ProcInfo.hProcess, INFINITE); GetExitCodeProcess(ProcInfo.hProcess, ResultCode); end; finally Result := (ResultCode = 0); //-------- CloseHandle(ProcInfo.hProcess); CloseHandle(ProcInfo.hThread); end; end; Set CommandLine to somehing like @corneliusdavid comment
  3. I'm not sure about the latest version of Firebird, but as with Interbase, only gbak utility can make archives on a remote disk. Therefore, CreateProcess and Waitforsingleobject for Gbak.exe can be used in Delphi
  4. You can write your extension (script) to a Cockpit and then perform remotely. Extensions can be written on JavaScript. Can be called through something like this curl -u 'Username: Password' -x Post \ -d '{"Script": "/Path/to/your-script.sh", "args": ["arg1", "arg2"]}' \ https: // <Server-IP>: 9090/My-Scripts/Execute I think there was also a ready -made feature to access Shell, but I don't remember what it is. Since curl can be used, I see no reason for not writing the Delphi program. There are documentation for existing and new extensions. Edit: A program can be written that performs something like this ssh user@Server-IP> 'sudo myscript.sh' The user must have sudo rights and be able to enforce it without a password. This is configured on the server. I think there are a lot of SSH access libraries with keys, not password
  5. There is an add-on in Cockpit for ZFS Storage. In the cockpit, you log in with the corresponding Linux user
  6. tgbs

    creating a frame at runtime

    This can be a problem in a multilingual project
  7. tgbs

    Delphi 12.2 available for download

    Any news about FMXLinux?
  8. We were updated from 12.1 to 12.2. There is no problem with the RDP from real Windows and Linux machines to 12.2. 12.2 is on real and virtual machines. Edit: Forgot to say that 12.2 is on Windows 10 and 11
  9. My colleagues and I planned to upgrade from 12.1 to 12.2 next week. Most of the time we access Delphi in the office through VPN and RDP. Most PCs with Delphi 12.1 installed are real, but there are also VMs. I didn't understand when the problem occurs
  10. tgbs

    ActionList Editor: New Standard Action...

    We have a problem when double-clicking on the TActionlist. There are only a few actions, but the image list (TVirtualImageList) is large
  11. tgbs

    Use Interbase Developer license on 2 Windows PCs?

    Mixing different versions of client dll and server also give such error. Use a monitor to see what dll your wife's computer is loading
  12. tgbs

    DelphiLint v1.0.0 released!

    How to uninstall
  13. tgbs

    DelphiLint v1.0.0 released!

    I just tried it and it works. But I didn't see where I could remove the check for mixed names for example. And how to remove the texts from the file without closing Delphi
  14. tgbs

    Hyper-V server as host for 3 VMS

    Proxmox for servers, Virtual machine manager(again KVM) for workstation with GUI. Easy to add host hardware
  15. tgbs

    Quality Portal going to be moved

    Since it will be read-only, they should transfer all unresolved issues to the new system so that they can be commented on
  16. Yes sorry. My home antiads dnsmasq is marking lp.embarcadero.com. It is automatic script...
  17. I cannot register for any webinar clicking on link from email Unable to connect An error occurred during a connection to lp.embarcadero.com. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer’s network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.
  18. I don't mind getting ad emails once a day. It's strange to me that of all the services, this is the only one that works every day without interruption. Sorry
  19. Only SPAM servers working fine...Every day receive mails from them
  20. The problem is not the monitoring. The problem is that very often it becomes a problem with these services. Is it the fault of the sysadmin or the programmer, but this service drop needs to stop
  21. It's getting ridiculous now with these servers and software shutdowns
  22. tgbs

    Help with Query at run time

    And once you manage to call getdbrecord, you'll still need to fill in the meaning of sName, now it's unknown
  23. tgbs

    Collecting data

    or here
×