I used system()
function to call certmgr.exe
in my C code.
Once I start my executable, a command promt appears showing certificate successfully installed.
But I dont want the command promt to be opened. How to do that??
any other ways available to call the "exe's" in C language..
thanks,,,
When calling an executable program in Windows PowerShell, place the stop-parsing symbol before the program arguments. After the stop-parsing symbol --% , the arguments up to the end of the line (or pipe, if you are piping) are passed as is.
While in the command prompt type "cd", then enter. From there type "cdprogram" then hit the tab button until you see "c:[&program&] files (x86)", then hit enter. Sorry to say so but your first command is superfluous and the second command will not work. The correct command would be (note the space!):
If you want to continue the execution of C prgram even after calling the executable from the C program, then try to use system() function call. You can create a string with executable name and the arguments printed to the string using sprintf(). Then pass the string as argument to system() call.
H ow do I compile C program and create an executable file under Linux or UNIX operating systems? You need GNU project C and C++ compiler for compiling C program and creating an executable file. Most Unix and Linux (*BSD) user start compiling their C program by the name cc. [donotprint] [/donotprint]But you can use gcc command to compile program.
The easiest way to do this on Windows is to call ShellExecute
. Pass SW_HIDE
to make sure that no console window is shown.
You could alternatively use CreateProcess
but it's a little trickier to call. Use the CREATE_NO_WINDOW
flag to suppress the console window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With