RunCommand lazarus / 62-General ---------------------------------------------------------------------- Emerson · 2021-07-28 22:24 Hi!       I have a problem when executing a command with RunCommand.     When running the same, a black prompt screen appears and I would like to hide.       Can someone help me? RunCommand('cmd.exe', ['/c', v_comando], v_resultado_da_exec_shell); ---------------------------------------------------------------------- sstvmaster · 2021-07-29 08:45 You also can use TProcess, see: https://wiki.freepascal.org/Executing_External_Programs or you can set the TShowWindowOptions property: - https://www.freepascal.org/docs-html/fcl/process/runcommand.html - https://www.freepascal.org/docs- html/fcl/process/tshowwindowoptions.html ---------------------------------------------------------------------- BobDog · 2021-07-29 10:53 For windows to access the command shell you can do: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   program shell; function  system(s:pchar):integer ; cdecl external 'msvcrt.dll' name 'system';function  wsystem(s:widestring):integer ; cdecl external 'msvcrt.dll' name '_wsystem';  procedure speak(text:ansistring);var x:ansistring;begin     x:='mshta vbscript:Execute("CreateObject(""SAPI .SpVoice"").Speak(""'+text+'"")(window.close)")';      system(pchar(x)) ;  end;  beginsystem('help');speak('thank you, goodbye');readln;end. and get all those old dos commands or powershell commands wsystem is optional for widestrings. ---------------------------------------------------------------------- sstvmaster · 2021-07-29 12:44 @Emerson Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i RunCommand('cmd.exe', ['/c', v_comando], v_resultado_da_exec_shell, [], swoHIDE); ---------------------------------------------------------------------- Emerson · 2021-08-02 12:04 Hi! The answer from the sstv master friend was successful. Thanks everyone for responding.