Starting command line exec without dos window...

I'm trying to start a console window application under my java swing application with the Runtime.exec(cmd) function.
A dos window appear during the execution of the application. How to remove the screen echo ?
Thanks
SEB

Hi ollie lord and thank you for your suggestion.
I tried to use a *.bat file instead but the result was the same. I tried to use the word "start" in the command but nothing more.
My .bat file is simple:
start myprogram or myprogram
...where myprogram.exe is a win32 console application from Visual C++.
Is there any option in function Main() in C++ to remove the dos console ?
I head about the JNI tech. Is it a solution ?
Thanks
SEB

Similar Messages

  • Runtime.exec() opening dos window.

    I heard that in newer version of java (>java 1.2 ) if Runtime.exec() is used to execute some native program, a black dos promt is popped up automatically and closed when the execution of the native program is completed.
    Will this happen every time I use Runtime.eceX()? is there a way to avoid this opening of dos prompt.

    It will vary by os version. Read up on the use of the command or cmd statements from the os help information, and on the os's start command (may not exist in all os's)
    Experiment fron the commandline to see what happens.

  • Command Line Disk Share with Windows

    I am running Solaris 10 (SunOS 5.10) without the GUI interface. I cannot, therefore, run the Solaris Management Console.
    How do I share my disk with Windows systems on the same network using the command line?

    you can use samba for sharing its comes with solaris 10 , or use solaris 10 as nfs server and use PCNFS on windows end to mount the disk
    in solaris most of things dont require GUI , thats its beauty :)
    regards

  • Open and Close a command line exec via OpenG.lib in seperate VIs

    Hi,
    I'm aiming to perform tests on my UUT - over a command line based executable which established a USB connection, so - sendings commands and checking the return string. 
    So far i'm reusing the pipeNight.vi which is shared in the following post.
    http://forums.ni.com/t5/LabVIEW/How-to-pass-input-to-a-DOS-executable-that-is-running-in/m-p/1763182...
    However i wish expand from LabVIEW and utilise NI-TestStand sequence files to ramp up the test coverage and perform the tests automatically.
    The issue i've encountered - every time i call the pipeNight.vi from a TestStand sequence Step, the USB connection is build up and torn down.
    Although i'm not encountering any performance issues to date, i would ultimately like to open a session (i.e.establish the usb connection) - at the beginning of a sequence file, send a bunch or commands and check return strings, before closing the session at the end of the sequence file. This is surely a more effecient and elegant solution.
    Is it somehow possible to split the pipeNight.vi into several VIs to realise this objective?
    - Open 
    - Write/Read
    - Close
    i'd appreciate and help or alternatice solutions on this!
    B.Regards
    Kech
    Solved!
    Go to Solution.

    I had tried to explain in my initial post, that if i call the pipeNight.vi from a TestStand sequence file step, then establishes a USB connection and tears it done - for every command that i send/ respectively every sequence step that i run in TestStand. As i envisage multiple (several hundred) test steps, i woul like to improve effeciency by establishing the ESB connection once instead of multiple times.

  • Edit command line parameters without restarting LabVIEW

    Is there a way to edit the command line parameters passed to a VI WITHOUT having to restart LabVIEW?  Perhaps I'm accustomed to how it works in just about every other development environment, but having to do so is quite frustrating.
    Solved!
    Go to Solution.

    ronbrown wrote:
    I'm just surprised that LabVIEW doesn't have just a simple "command line parameters" option somewhere in the VI options for debugging purposes, just like Visual Studio and other deveopment environments.
    If memory serves, Visual Studio runs the compiled program as a separate process. That should make it easier to give it separate switches. In LabVIEW, if you let the user change the parameters, you would have to do some conflict resolution, since this is a global setting (e.g. did the changes you make affect everything or a single VI/hierarchy/app instance, are the original switches lost or can you get them back somehow and when).
    If you want a workaround, I suggest you create a simple subVI with a 1D array output and a 1D array control on its FP or BD. If the control has something in it, use it. Otherwise, use the CLA[] property. Alternatively, you can check if you're running in the IDE or use a boolean, etc. Personally, the only time I think I needed to use switches, I believe the code was simple and I simply tested it by building the EXE. It probably took longer to figure out that I needed to explicitly turn on CLA support for the EXE than the actual testing.
    Try to take over the world!

  • Command Line sqlplus without using @filename

    How can I pass sql statement directly to sqlplus on command line without using an external file ?

    If the insert happens infrequently, then the cost of writing
    to a temporary file may not matter overall. And if the
    insert happens frequently, the cost of invoking SQL*Plus and
    connecting to the DB could outweigh the time for writing to
    a file.
    Do you have any problem doing something like:
    tail -f mylog.txt | myawkprog | sqlplus -s scott/tiger
    Here I'm thinking that 'myawkprog' prints appropriate INSERT
    and COMMIT statements.
    For what it is worth, I have an old, old Perl 4 script for a
    similar log parsing task. It keeps the SQL*Plus connection
    alive forever and makes sure there is no I/O buffering. The
    outline of it is below. Use at own risk.
    -- CJ
    #! /usr/local/bin/perl -w
    # Open I/O pipes
    open(LG, "tail -f /tmp/mylog.txt|") || die "Can't open input";
    open(SP, "| sqlplus -s scott/tiger") || die "Can't open sqlplus";
    # unbuffered I/O
    select(LG); $| = 1;
    select(SP); $| = 1;
    while(<LG>)
    chop;
    print SP "insert into mytab values ('$_');\n";
    print SP "commit;\n";
    # Never actually get here
    close(LG);
    close(SP);

  • How do you either set "Show More Tiles" or Start Screen rows via command line or script for Windows 8.1?

    Is there a method to change the Start Screens number of rows (similar to Windows 8.0's use of the Explorer\Scaling\MonitorSize in registry). Possibly by forcing the switch for "Show More Tiles" via script etc? This is to enable the device with
    Windows 8.1 to be built using a deployment methodology like SCCM and have the Tiles correctly configured as required for a standard look and feel across devices. I do not know why all these switches are not represented in either WMI or the registry to enable
    the customization of look and feel out of the box for enterprise deployments.
    Thanks for any assistance possible.

    Hi,
    You can try steps in this article.
    How to Change Number of Apps Tile Rows on "Start" Screen in Windows 8 and Windows 8.1
    http://www.eightforums.com/tutorials/2690-start-screen-metro-apps-change-number-rows-windows-8-a.html
    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
    Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
    completely understand the risk before retrieving any software from the Internet.
    Hope this could be helpful.
    Kate Li
    TechNet Community Support

  • Command line Quicktime encoding for windows?

    I think you can script quicktime to encode on the Mac using applescript, but can you do the samething for windows?
    Maybe something like:
    c:\quicktime.exe /profile /inputfile /outputfile
    and viola! Out comes my encoded files!
    I'd love to automate my encoding process but I can't seem to find a way to do it.

    Hi,
    You can try steps in this article.
    How to Change Number of Apps Tile Rows on "Start" Screen in Windows 8 and Windows 8.1
    http://www.eightforums.com/tutorials/2690-start-screen-metro-apps-change-number-rows-windows-8-a.html
    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
    Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
    completely understand the risk before retrieving any software from the Internet.
    Hope this could be helpful.
    Kate Li
    TechNet Community Support

  • Invoke command in new dos window

    is there any way that i can invoke a command in a new dos window from java application?
    such as
    runtime.exec("dir");
    it will open another dos window, and run dir in it.
    thanks

    it will open another dos window, and run dir in it.This works for me (win 2000):
    Runtime.getRuntime().exec("cmd /c start dir");

  • Problem running DNG Converter from command line in Windows XP

    I'm a frustrated user trying to run Adobe DNG converter from the Windows command line - more specifically from a batch file.
    - Am reasonably conversant with writing batch files
    - Have read the PDF file provided by Adobe
    I just can't figure the correct syntax for adding the command line parameters and, unfortunately, the Adobe PDF file doesn't have verbose examples for idiots like me. Nor can I find any such examples on the Net, or any discussion of this problem in the forums.
    The Adobe PDF instructions state...
    "The parameter list includes the conversion options you want to use, followed by the names of the files to convert."
    As there is no switch to prefix 'the names of the files to convert' I assume I just leave a space and include the path to the source files at the end of the parameter list?
    Here is the batch file line I am trying to use...
    "C:\Program Files\Adobe\Adobe DNG Converter.exe [parameter list]"
    Where I want to specify in the [parameter list] that...
    (a) The destination directory (-d <directory> parameter) is c:\DNG_files
    (b) And the source files are in directory c:\RAW_files
    Here is the batch line with the parameters entered...
    "C:\Program Files\Adobe\Adobe DNG Converter.exe -dC:\RAW_files c:\DNG_files"
    I've tried variations of this with space between -d and C:\RAW_files and C:\DNG_files\*.* for the source files parameter.
    I just keep getting DOS erros like "The filename, directory name or volume label syntax is incorrect"
    Can anybody help me. I'm clueless how to solve the problem. :-(
    I'm running DNG COnverter version 4.2
    Thanks in anticipation.
    Rob

    Thanks for responding G Sch.
    LOL. Well this lemming doesn't habitually rename .exe files (e.g. Adobe DNG Converter.exe) to a non-spaced alternative either! (Adobe_DNG_Converter.exe)
    Still no luck...
    *** Here is my batch file...
    REM Copy and DNG-convert files from CF
    CD c:\RAW_files
    dir c:\RAW_files
    "C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files
    dir c:\DNG_files
    pause
    ***Here's the DOS shell output...
    <<BEGINS>>
    C:\RAW_files>dir c:\RAW_files
    Volume in drive C is Local Disk
    Volume Serial Number is D084-58ED
    Directory of c:\RAW_files
    12/03/2008 10:29 AM <DIR> .
    12/03/2008 10:29 AM <DIR> ..
    11/03/2008 07:00 AM 10,661,632 _3110455.ORF
    11/03/2008 07:01 AM 10,661,632 _3110457.ORF
    11/03/2008 07:01 AM 10,661,632 _3110458.ORF
    11/03/2008 07:02 AM 10,661,632 _3110460.ORF
    11/03/2008 07:02 AM 10,661,632 _3110461.ORF
    11/03/2008 07:03 AM 10,661,632 _3110462.ORF
    11/03/2008 07:03 AM 10,661,632 _3110463.ORF
    11/03/2008 07:04 AM 10,661,632 _3110464.ORF
    11/03/2008 07:04 AM 10,661,632 _3110465.ORF
    9 File(s) 95,954,688 bytes
    2 Dir(s) 2,619,731,968 bytes free
    C:\RAW_files>"C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files
    C:\RAW_files>dir c:\DNG_files
    Volume in drive C is Local Disk
    Volume Serial Number is D084-58ED
    Directory of c:\DNG_files
    12/03/2008 02:46 PM <DIR> .
    12/03/2008 02:46 PM <DIR> ..
    0 File(s) 0 bytes
    2 Dir(s) 2,619,731,968 bytes free
    C:\RAW_files>pause
    Press any key to continue . . .
    <<ENDS>>
    As you can see (a) Source files exist(b) DNG command line runs without generating an error (c) no output files in destination.
    DNG Converter did not run.
    If I remove everything after the command (i.e. the parameter list stuff) it fires up DNG Converter in interactive mode. Not what I'm after.
    Any other thoughts on what the problem is?
    Thank you.
    Rob

  • Afterfx command line "restores" maximized window - any way to duplicate ExtendScript invocation?

    Hi all,
    I am controlling After Effects CC from another application by invoking JavaScript files from the command line. But the command *always* restores the maximized window of After Effects. That is, if the After Effects application is maximized, it always *restores* it, every time I invoke the JavaScript file through the command line (e.g. through Windows cmd prompt or through my application). When I execute the same JavaScript file through ExtendScript IDE, it doesn't do this erronous behaviour.
    For example: "AfterFx.exe -r C:\path\showDialog.jsx"
    Contents of showDialog.jsx:
    alert("Showing Dialog from JSX file");
    My question is: Is there *any way* to mimic what ExtendScript does to invoke JavaScript files?
    From listening on Windows processes, it seems that ExtendScript tacks on some JavaScript code, dynamically, to do the execution (i.e. couldn't trace any command line processes/arguments). But I can't seem to figure out what exact JavaScript code it invokes. ExtendScript also seems to be working via Bridge.
    I get the same "restore window" behaviour when I try to use "-s" argument with the JavaScript expression passed as a string argument or if I use "AfterFx.com" instead of "AfterFx.exe". I couldn't find any documentation for what command line parameters are supported for AfterFx (other than "-r" and "-s") and what Extend Script might be doing exactly to invoke the .jsx files. I managed to take a peek at the executable binary of AfterFx.exe (through a hex editor) and noticed the following switches.
    -rquiet, -noerr, -noui, -debug, -livelink, -selflink, -headlessonly, -rquiet, -rq, -mp
    But I couldn't get the "window restoring" behaviour to stop with any of the parameters.
    Any advice will be really appreciated.
    Thanks.

    Hi,
    Thanks again for your comments. I tried with PsExec just now but no luck still. The only useful argument parameter in PsExe seems to be:
    -d
    Don't wait for process to terminate (non-interactive).
    But the same behaviour happens. I tried with "-e" as well (separately and combined with "-d").
    I also tried a few command line argument options with "start" command, on the Windows Command prompt. For example:
    "start /MAX AfterFx.exe -r C:\path\file.jsx" <-- supposed to start the application in the maximized state
    "start /b AfterFx.exe -r C:\path\file.jsx" <-- supposed to start the app without a creating a new window
    But no luck still . Tried various combinations of the above two arguments as well.
    Seems like Adobe After Effects explicitly does something weird to snap the application *out* of the MAXIMIZED state, if the executable is invoked (either via command line, with or without arguments or directly from start menu/GUI items). I don't know why they would do this though. I also wonder whether this is simply a bug in their implementation of Adobe After Effects CC on Windows 7.
    Is there any way to MAXIMIZE Adobe Effects Effects through their JavaScript API? I am wondering whether I can explicility check/set the window to be maximized in my invoked script, to fix this behaviour.
    Thanks.

  • Mac OS X start up in a command line unexpectedly

    Please this is really urgent.
    My mom will kill me when she finds out that I must have done something wrong to her Powerbook!
    I restarted the computer after trying to play a movie file, nothing special, just an .avi file with VLC player. Then I restarted the computer, because the system preferences was always giving an error when I tried to get the speakers from the other computer (a G4 Cube) to work.
    So I restart and .... wham! I get the usual login screen with my mom's name and her picture, which I can click on if I'm quick, but nothing happens anyway, and all of a sudden I get a Darwin (or something) screen in command line (like when a Windows computer starts up). The screen does something with an IP firewall and then I get the text "Logon:"...
    I can type the username and password fine, I can 'log on' but then what? I can't see my good old aqua interface anymore? I can't load OS X? I just want everything back to normal! Please help me, all my mom's work is on this computer!!
    Thanks alot!

    O.K I read around in some other topics and this topic describes my problem well: http://discussions.apple.com/thread.jspa?threadID=320663&tstart=30
    Only difference is I think I can log in with my username and password.
    These are the system.log readouts - forgive me for some spelling errors, I was writing really fast:
    localhost syslogd: /dev/console: Input/output error
    localhost init: kernel security level changed from 0 to 1
    localhost Directoryservice[195]: Launched version 1.8.4 (v258.2)
    localhost loginwindow[191]: Sent Launch Request Message to DirectoryService macht_init port
    localhost loginwindow[191]: Login authorization failed (-60008)!
    localhost loginwindow[191]: AuthorizationRef doesn't have a username (<LoginAuthRefMgr: 0x448ba0>)
    localhost loginwindow[191]: exiting to console
    Hope this can help solve my problem?
    Thanks.

  • How I can set my default browser mozilla firefox from the command line in Windows 7?

    I need to set my default browser mozilla firefox from the command line, ie without using the GUI.

    '''-setDefaultBrowser''' is the correct command - you need the two capital letters.
    Why Firefox 17.0.1? You would be missing a number of important security updates. Firefox 17.0.'''9''' is the current ESR release version.

  • Install UCM 11g in command line mode

    Hi there,
    I am installing oucm 11g on a linux system (suse 11). I would like to know if it is possible to run the installer in command line mode (without using any X11 window server).
    I have tried with this command
    ./runInstaller –jreLoc $JAVA_HOME
    but after some requirements check failed because it cannot connect to X11 window server.
    Thanks,
    al

    Though following installation procedure may not be supported but it worked for me.
    create Inventory Location
    mkdir /var/SP/weloadm/home/oraInventory
    Create an file oraInst.loc with contents in the
    software directory:
    inventory_loc=/var/SP/weloadm/home/oraInventory
    inst_group=welo
    ./runInstaller -jreLoc $JAVA_HOME -silent -
    invPtrLoc /var/SP/weloadm/home/software/oraInst.loc
    “ORACLE_HOME=/opt/SP/weloadm/Middleware/Oracle_ECM1
    ” “MIDDLEWARE_HOME=/opt/SP/weloadm/Middleware”
    Hope it helps

  • How to read compiler msgs in DOS window?

    Hi,
    I'm just starting java programming and I'm doing the compilation in a DOS window. However it doesn't scroll. What do you guys do when the error messages go off the top of the screen?
    Steve

    Hello Steve,
    You didn't say which operating system you are running, But I suspect that you are running either Windows/95 or Windows/98. Normally the output from a command run in a DOS window goes to standard output. So when you list the files in a directory with the 'dir' command the output can be redirect with the greater than sign. As in:
    C:\>dir > dirlist.txt
    The trouble that you may encounter (if you are running Windows/95 or Windows/98) is: The error messages from javac are NOT sent to standard output (stdout), but are sent to standard error (stderr) instead. On some Windows operating systems, notably Windows/95 and Windows/98 there is no support for redirecting output from standard error. Windows/NT does provide support for redirecting output from standard error.
    Redirecting the standard error output is more difficult; COMMAND.COM doesn't give you any way to do it, but you can either get an add-on utility to do it or use a more powerful shell like 4DOS at:
    http://www.jpsoft.com/
    that does allow this as a standard feature.
    Another solution is to use an IDE such as Forte for Java. See:
    http://www.skylit.com/javamethods/faqs/scrollout.html
    for another solution.
    -Merwyn,
    Developer Technical Support,
    http://www.sun.com/developers/support.

Maybe you are looking for

  • In R12.2.3 Task type LOV is blank

    Hi, We are implementing R12.2.3 Service modules for our client. But after defining the task types using the Service Responsibility, the same are available under Task manager window. But none of the task type neither the seeded one are available under

  • Cant get back purchases. Apple ID acts as new but it has been the same email since the beginning. What to do?

    So recently i realised that my ID acts like new. It cannot get back(restore) old purchases, not even inapp purchases. I checked my emails and exatly a year ago i got an email from apple which said"welcome to itunes store" and that newbie blah blah li

  • Documents' Remarks on GL PLD

    Hi Experts, We are using General Ledger Report to print statement of customers.The PLD has information related to JE.How can we add remarks column from ORIN and OINV tables to show remarks in the printout of this report.I tried adding the cooments fi

  • Behaviour of lines in flash drawing API

    Hello everyone I wanted to ask a question is it posible to move the line drawn with flash drawing API behind the objects that this line connects. For example if I have a two movieClips that i connect with line i can see that line atop of those MovieC

  • SRM Public Sector Tendering Process

    Hi Experts Have a question. In SRM 7 Public Sector Procurement (PPS) scenario, I publish the bid against which the bidders provide with their Technical Response. I publish the bid as 'Public Bid'. Question 1: How will the bidders log in to the portal