I want to make an console application of c which can run other applications (exe files). Kindly guide me how can I make it possible so that from my c code i can run other executable files in window OS.
You can use the CreateProcess Windows API function.
Related
I am trying to find how in c ++ whitch add current application at Startup on linux programmaticaly from inside program code.
Suppose we have the "Hello world" as a program that opens in Mint user session.
When Hello World starts, must find if there is link in startup applications, and if is not to add link, so next time opening user his profile to see the "Hello world".
Is it possible to do this without system scripts, only with c++ std library?
The problem is not a C or C++ problem, rather you should consult the session manager's documentation of your distro, for example, if you are using gnome, you could create a startup file under $HOME/.config/autostart, and put the program path in the startup file.
There is a wiki listing how to manager autostart programs for many desktop environment:
https://wiki.archlinux.org/index.php/autostarting
I have built a simple console application in c++ vs2010 that just displays one line of text. Is it possible to run this executable from the Release folder in Linux?
Say I put the Release folder on a thumb drive, open it on a linux machine?
I was under the impression that console application written in c++ could run in both windows in linux? how mislead am I?
a) You need to run the executable with wine and emulate a windows environment
- OR -
b) You need to compile your code for your Linux distribution.
I need to run a console when the app starts (for debug, log, etc) without a .bat file.
I use the LCC compiler on Windows 7 x86.
Look at the console APIs in Windows, start with AllocConsole.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
How can one write a C++ dll function (for windows CE) to call an exe application
e.g the exe path is \DOC\EXE\WINCE_EXE
Thanks.
did you try CreateProcess, same as on desktop windows?
I use nativeprocess api in AIR to launch a c++ console app. The console app runs correctly but does not appear, but I want it to be visible and user be able to interact with it. How can I achieve that?
Instead of launching your executable directly, you'll need to launch your platform's terminal application (on Windows, that's CMD.exe, on OS-X it's Terminal.app, and on unix/linux it's xterm).
By default, the terminal application will run an interactive shell prompt, but you can use command-line arguments to tell it to execute any other program instead. In this case, you'll want to tell it to execute your C++ console application.
On Windows, this might look something like this:
CMD.exe /K C:\path\to\your\app.exe
on OS-X, it's a little more complicated. Here's a related S.O. post ( Running a command in a new Mac OS X Terminal window)