Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1,404
    • Issues 1,404
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 67
    • Merge requests 67
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #32055
Closed
Open
Issue created Jun 22, 2017 by FPC Admin account@fpc_adminOwner

TProcess doesn't respect the poNoConsole option

Original Reporter info from Mantis: yoni
  • Reporter name: Yoni Stoffman

Description:

When creating a process with poNoConsole the console screen is still shown.

Steps to reproduce:

try
    AProcess := TProcess.Create(nil);
    AProcess.Executable := 'A console app of you liking';
    APRocess.ShowWindow:= TShowWindowOptions.swoHIDE;
    AProcess.Options := AProcess.Options + [poWaitOnExit, poNoConsole,poUsePipes];
    AProcess.Execute;

   finally
     AProcess.Free;
   end;

Additional information:

It seems that the problem is from a wrong option mapping. The code on process.inc file:

if poNoConsole in FProcessOptions then
Result:=Result or Detached_Process;

While the documentation on MSDN at https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx

States there that there is an option called CREATE_NO_WINDOW which differ from DETACHED_PROCESS

Mantis conversion info:

  • Mantis ID: 32055
  • OS: 10
  • OS Build: Creator Update
  • Platform: Windows
  • Version: 1.8RC2
  • Fixed in version: 3.1.1
  • Fixed in revision: 36678 (#606d6d73)
  • Monitored by: » zaher (Zaher Dirkey), » Vincent (Vincent Snijders)
  • Target version: 3.2.0
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking