Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I got how to check if psqlodbc has been uninstalled completely so that i can start unistalling postgres</p> <p>For that i found the solution <a href="https://stackoverflow.com/questions/2443886/delphi-wait-until-bat-script-runs-to-the-end">On stackoverflow itself</a></p> <pre><code>function TForm1.ExecAndWait(const CommandLine: string) : Boolean; var StartupInfo: Windows.TStartupInfo; // start-up info passed to process ProcessInfo: Windows.TProcessInformation; // info about the process ProcessExitCode: Windows.DWord; // process's exit code begin // Set default error result Result := False; // Initialise startup info structure to 0, and record length FillChar(StartupInfo, SizeOf(StartupInfo), 0); StartupInfo.cb := SizeOf(StartupInfo); // Execute application commandline if Windows.CreateProcess(nil, PChar(CommandLine), nil, nil, False, 0, nil, nil, StartupInfo, ProcessInfo) then begin try // Now wait for application to complete if Windows.WaitForSingleObject(ProcessInfo.hProcess, INFINITE) = WAIT_OBJECT_0 then // It's completed - get its exit code if Windows.GetExitCodeProcess(ProcessInfo.hProcess, ProcessExitCode) then // Check exit code is zero =&gt; successful completion if ProcessExitCode = 0 then Result := True; finally // Tidy up Windows.CloseHandle(ProcessInfo.hProcess); Windows.CloseHandle(ProcessInfo.hThread); end; end; end; </code></pre> <p>so step # 1 <code>if ExecAndWait('msiexec /x C:\psqlodbc09\psqlodbc.msi') then begin //uninstall postgresNow...!! end; </code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload