Skip to main content

How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Hello,

Each EXE is executed within its own process or run-unit, so it is not possible to call an EXE. Instead, you will need to create another run-unit from which you execute the EXE. You can find the descriptions of CBL_EXEC_RUN_UNIT from the documentations.

Here is also a demo: PARENT.zip

Regards,


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

I already knew this command, I found that did not work in VC, worked perfectly thank you


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

I'm a bit confused with your reply. Are you saying that CBL_EXEC_RUN_UNIT "does not work" or "worked perfectly" in VC?

I know there was an issue for a managed code to call CBL_EXEC_RUN_UNIT that runs a native EXE, but that was fixed since version 2.0.


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Sorry Google translator, worked perfectly thank you


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Olá Pita,

Use a classe Process.

method-id button1_Click final private.

01 cExe type System.Diagnostics.Process.

procedure division using by value sender as object e as type System.EventArgs.

   set cExe to type System.Diagnostics.Process::Start("notepad.exe", "c:\\temp\\text.txt")

end method.


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Olá Pita,

Use a classe Process.

method-id button1_Click final private.

01 cExe type System.Diagnostics.Process.

procedure division using by value sender as object e as type System.EventArgs.

   set cExe to type System.Diagnostics.Process::Start("notepad.exe", "c:\\temp\\text.txt")

end method.


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Olá Pita,

Use a classe Process.

method-id button1_Click final private.

01 cExe type System.Diagnostics.Process.

procedure division using by value sender as object e as type System.EventArgs.

   set cExe to type System.Diagnostics.Process::Start("notepad.exe", "c:\\temp\\text.txt")

end method.


How do I call an exe for example notepad.exe or even exe done in NetExpress am with Visual COBOL 2.2, thank you.

Altair, muito boa essa saída também, obrigado.