How to call system command in vc++?

i wish to call the netsend command in the program but i dont know how to do it? can you please show me the actually of calling net send command in the way of mfc?

Take a look at the Win32 CreateProcess, ShellExecute, and ShellExecuteEx functions.
- Elton

Similar Messages

  • How to call systems commands

    Hello guys,
    I will like to know if there is a way of calling system command and shell commands in windows without making use of the Runtime Class in java.
    Also when ever i call a system command or shells commands from my java application using the runtime class, it open the a new shell(Command Prompt) before executing the command.
    I await your response. Thanks in advance.
    Joe.

    How about this? http://onesearch.sun.com/ClickThru?qt=without+command+window&url=http%3A%2F%2Fforum.java.sun.com%2Fthread.jsp%3Fforum%3D31%26thread%3D440546&pathInfo=%2Fsearch%2Fdevelopers%2Findex.jsp&hitNum=2&col=devforums

  • How to call system command to launch Windows Explorer

    Hello,
    I'd like to open the windows explorer from java.... anyone know how this is done?
    thanks

    thanks for ur reply.
    i get the following exception when i run the code provided...
    java.io.IOException: CreateProcess: iexplore.exe error=2
         at java.lang.Win32Process.create(Native Method)
         at java.lang.Win32Process.<init>(Win32Process.java:66)
         at java.lang.Runtime.execInternal(Native Method)
         at java.lang.Runtime.exec(Runtime.java:566)
         at java.lang.Runtime.exec(Runtime.java:428)
         at java.lang.Runtime.exec(Runtime.java:364)
         at java.lang.Runtime.exec(Runtime.java:326)
         at Run.main(Run.java:5)
    Exception in thread "main" also, i needed a way to open exploerer to a preset directory. do i just append the directory location before the iexplore.exe ? anyone? thanks

  • How to call gnuplot command from java

    Hi there,
    In our course, we are required to develop an GUI for gnuplot. In case you don't know about gnuplot, it's a plotting program and has lots of command. We want to use java and swing, but now we don't know how to call gnuplot command from java, or how to execute a shell command(script) from java.
    By the way, since we need read in files with several columns of data and allow user to select a column, we want to use JTable. Is that reasonable?
    Thanks a lot for any suggestions!
    Jack

    Hi, there:
    Will using JTable add much overhead? I may have to use several JTables and switch among them. I can add scroll bar to or edit JTables, right?
    BTW, do you have experience about gnuplot? Can I find the command tree of gnuplot somewhere? Or do you know a better place to post question about gnuplot? unix/linux group, maybe.
    Thanks,
    Jack
    P.S. Would you guys answer my question after I use up my duke dollars? :- )

  • How to call linux command ?

    hi all,
    I wanna make java application which display the ouput of linux command (eg. ps -ax output in JTextArea).
    The problem is how to call "ps,kill,etc" ?

    JTextArea txtOutput = new JTextArea();
    String cmd = "ps -a";
    Process proc = Runtime.getRuntime().exec(cmd);
    BufferedReader buf = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String out;
    while ((out = buf.readLine()) != null){
    System.out.println("Output: "+out);
    txtOutput.append(out+"\n");
    }

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • How to execute System command through Applet

    Hi all,
    How can I execute a System command through Applet.
    I have written a code Runtime.exec("ls") in my applet but it gives me
    this execption even if I certify the applet ->
    java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
         at java.security.AccessController.checkPermission(AccessController.java:399)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
         at java.lang.SecurityManager.checkExec(SecurityManager.java:802)
         at java.lang.Runtime.exec(Runtime.java:548)
         at java.lang.Runtime.exec(Runtime.java:418)
         at java.lang.Runtime.exec(Runtime.java:361)
         at java.lang.Runtime.exec(Runtime.java:325)
         at Test.init(Test.java:24)
         at sun.applet.AppletPanel.run(AppletPanel.java:344)
         at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:123)
         at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:119)
         at java.lang.Thread.run(Thread.java:484)
    Thanks,
    Manoj.

    There should be a lesson about this somewhere.
    When you visit a web page, does it ask you if you want to have an applet loaded?
    Answer: No
    So, if you visit a page, and an applet is silently loaded which can then execute commands on your computer, is this good?
    Answer: No
    So why do you want to do this?
    Is it good for anyone?
    I mean, if I want to do "ls", can't I just open a command line? Do I need an applet to do it for me?
    Either you have devious desires or your hacking together something that probably shouldn't be.
    If you want to learn start here:
    http://java.sun.com/docs/books/tutorial/security1.2/index.html
    With the article entitled:
    Quick Tour of Controlling Applets
    Ian

  • Call System Command

    I am executing the following command from a abap program to execute a Unix Script. The script executes successfully but it comes back to the program with a sy-subrc return code of -1????? Anyone have any ideas? We are on 4.6c
    Thank You
    *&      Form  EXECUTE_UNIX_COMMAND                                     *
    form execute_unix_command.
    CALL 'SYSTEM' ID 'COMMAND' FIELD app_script
                   ID 'TAB'     FIELD TABL-SYS.

    Hi Joe,
    Check the Below program, you will get this program in latest versions from 4.6c...
    RSBDCOS0---->subroutine EXEC
    look OSS Note 9391 for more info
    Regards,
    Srinivas

  • How to call dos commands through HTMLDB buttons

    HI,
    How do i call DOS commands through HTMLDB buttons, or on any process?
    can anyone help me on this?
    THANKS!
    BROKEN

    This article explains how to execute shell commands from whitin pl/sql using java (in the database).
    http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
    It is for Oracle8i but should still work. This still looks like a good way to go.
    ~Dietmar.

  • How to run system commands from JAVA

    Hi Friends,
    How to run windows system commands from JAVA
    Runtime r=Runtime.getRuntime();
    r.exec("dir");
    Throwing following Exception
    CreateProcess :dir error=2
    Thanks in advance
    Hamsa

    Hi ,
    in Windows NT this is not possible, you can use the following :
    Runtime r=Runtime.getRuntime();
    StringBuffer sbuf = new StringBuffer();
    String dir = new String();
    java.lang.Process proc = r.exec("cmd /c dir");
    InputStream is = proc.getInputStream();
    int ch ;
    while((ch=is.read() ) != -1)
    sbuf.append((char)ch);
    is.close();
    dir = sbuf.toString();
    System.out.println(dir );

  • How to call OS Commands through PL/SQL ?

    Is there any package to call OS (Solaris) commands from PL/SQL ? I want to do who cammand within PL/SQl Stored Proc and get the output inserted into a table. How can I do this ?

    Why don't you want to use Java? There are certainly alternatives, but without knowing why you don't like the Java solution, it's rather hard to know whether those alternatives make any sense in your environment.
    - You can make an external procedure call to a DLL (or shared library) installed on the server
    - You could use AQ or potentially DBMS_PIPE to communicate with external applications
    - You could use UTL_TCP to interact over the network with a machine
    - You may have other options depending on specifics about the call you're trying to make and the software you have.
    - In 10g, you could use the DBMS_SCHEDULER package to call OS commands
    Justin

  • How to run system command

    Hi
    Is that possible to run system command in indesign javascript?
    Becase i need to run a command in run prompt while script running in .indd file.
    Any idea please let me know

    Hi Maciej,
    For time being i m already using the execute() only for generating pdf from ps.
    In this case i cant able set job option in distiller.
    The problem y i m trying to run system command is i need pass some parameters (ie., job option, mypsFile) through my script.
    Is there any other sollutions?
    Thank and Regards
    Christy

  • How to call System Form base on User Form

    I want to reuse System Form that "list of items" on service call,
    Show the "list of items" Form base on my own Form,
    How to do?
    thanks
    Tony

    Hi Tony,
    Have you looked at the ChooseFromList object? This is available in the UI API and allows you to easily create the 'lists' windows for all the main objects, including items. There is an example of using the ChooseFromList in the samples in the SDK.
    Kind Regards,
    Owen

  • How to call TimesTen "command" from program

    I m trying to call command "dssize" from my java program.
    I can call any built in procedure with callable statement, but for "dssize" is not working. is that possible?
    Thank you and best regards.

    'dssize' is a ttIsql command and so cannot be called from an application. The information reported by dssize comes from various columns in the SYS.MONITOR table. All you need to do is SELECT those columns and use the values.
    Chris

  • How to call cmd commands in OS COMMAND

    Hi
    I need the syntax for calling a cmd commands using OS Command tool.
    Thanks
    sri

    I was trying to say you incase you are using the xcopy using the server agent when you mention the path please specifiy the complete directory path , since ODI run the scripts from oracledi/bin path .
    Now when you are running cezar command , you dont need to have the file . it copy the directoy liste into that txt file.

Maybe you are looking for