Interactive commands?

I have some code that is running for a specified time. When it runs I would like to be able to stop it by writing the command "stop" in the console or JOption Dialog box or something else at a givin time. Is that possible? I would also like to write "pause" and "resume" .

I have read those pages but it says nothing about how
to give new input when the program is running.I believe yawmark posted that for OUR benefit, not yours, to tell us that this is a crosspost, thus potentially duplicating anyone's effort who might want to reply. You shouldn't have crossposted this, but rather just continued the original topic, or at worst, posted this topic with nothing much more than a simple link to the other.

Similar Messages

  • Interactive Commands in NetConfig for Cisco ASA

    Hi,
    Maybe anyone knows, does CiscoWorks LMS supports this feature for Cisco ASA or I'm doing something wrong? I've sent interactive command "copy tftp: flash: <R>ip_address<R>asa841-k8.bin<R><R>"  to my ASA using netconfig tool and recived error "Command(s) failed on the device Insufficient no. of interactive responses(or timeout) for command: copy tftp: flash: ." For Cisco Catalyst it works fine. I have a last version of CiscoWorks 4.0.1.

    No, SWIM doesn't support ASDM upgrades, but what you're doing here is a system software upgrade.  What you might try doing is to increase the telnet timeout for this device.  Unfortunately, that feature is hidden in LMS 4.0, but see this document on how to do that:
    https://supportforums.cisco.com/docs/DOC-15162
    The document talks about inventory collection, but the interface to adjust the telnet timeout is in the same location as the SNMP timeout.  You'll want to time the transfer to know how long to make the timeout.

  • Zsh and interactive commands.

    I'm having a strange issue with zsh. I run it as my login shell, but when I run interactive commands within it in Terminator (like pacman, or yaourt), special keys and keycombos like Enter and Ctrl-C stop working, and just output text (^M for Enter, ^C for Ctrl-C). I read about this being a problem with certain programs changing the state of the shell and not changing it back, and in fact I can fix this temporarily by running
    reset && ttyctl -f
    but the problem returns with every new instance of Terminator I launch.
    How can I make this fix persistent? Thanks in advance.

    .zshrc:
    # The following lines were added by compinstall
    zstyle ':completion:*' completer _expand _complete _ignored _approximate
    zstyle ':completion:*' completions 1
    zstyle ':completion:*' expand suffix
    zstyle ':completion:*' format 'Autocompletion (%d)'
    zstyle ':completion:*' glob 1
    zstyle ':completion:*' group-name ''
    zstyle ':completion:*' insert-unambiguous true
    zstyle ':completion:*' list-colors ''
    zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
    zstyle ':completion:*' list-suffixes true
    zstyle ':completion:*' matcher-list '+' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
    zstyle ':completion:*' max-errors 3
    zstyle ':completion:*' menu select=1
    zstyle ':completion:*' original true
    zstyle ':completion:*' preserve-prefix '//[^/]##/'
    zstyle ':completion:*' prompt 'Suggestions:'
    zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
    zstyle ':completion:*' substitute 1
    zstyle ':completion:*' verbose true
    zstyle :compinstall filename '/home/arachnid92/.zshrc'
    autoload -Uz compinit
    compinit
    # End of lines added by compinstall
    # Lines configured by zsh-newuser-install
    HISTFILE=~/.histfile
    HISTSIZE=1000
    SAVEHIST=1000
    setopt autocd beep extendedglob
    unsetopt appendhistory
    bindkey -e
    # End of lines configured by zsh-newuser-install
    alias systemctl='sudo systemctl'
    alias pacman='sudo pacman'
    alias ls='ls --color=auto'
    alias shutdown='shutdown -hP -t sec now'
    alias anakena='ssh [email protected]'
    alias c_compile='gcc -Wall -pedantic -std=c99'
    export EDITOR="vim"
    setopt completealiases
    #Command not found
    [ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh
    #Keys
    # create a zkbd compatible hash;
    # to add other keys to this hash, see: man 5 terminfo
    typeset -A key
    key[Home]=${terminfo[khome]}
    key[End]=${terminfo[kend]}
    key[Insert]=${terminfo[kich1]}
    key[Delete]=${terminfo[kdch1]}
    key[Up]=${terminfo[kcuu1]}
    key[Down]=${terminfo[kcud1]}
    key[Left]=${terminfo[kcub1]}
    key[Right]=${terminfo[kcuf1]}
    key[PageUp]=${terminfo[kpp]}
    key[PageDown]=${terminfo[knp]}
    # setup key accordingly
    [[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
    [[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
    [[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
    [[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
    [[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
    [[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
    [[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
    [[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
    # Finally, make sure the terminal is in application mode, when zle is
    # active. Only then are the values from $terminfo valid.
    if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
    function zle-line-init () {
    printf '%s' "${terminfo[smkx]}"
    function zle-line-finish () {
    printf '%s' "${terminfo[rmkx]}"
    zle -N zle-line-init
    zle -N zle-line-finish
    fi
    #PATH
    PATH="$HOME/android-sdk-linux/build-tools:$HOME/android-sdk-linux/platform-tools:$HOME/android-sdk-linux/tools:$PATH"
    #PROMPT
    autoload -U promptinit
    promptinit
    autoload -U colors && colors
    PROMPT="%{$fg_no_bold[magenta]%}%B%n %{$fg[green]%}%#>%{$reset_color%}%b "
    RPROMPT="%{$fg[yellow]%}[%{$fg[cyan]%}%~%{$fg[yellow]%}]%{$reset_color%}"
    I have no other Zsh related config files in my home directory though.

  • Interactive command line

    I want to build a program with an interactive command line. The screen should be split in two areas: on top of the screen will be displayed the program itself and in a line on the bottom of screen, should be displayed an interactive command line. This program will run in a console, so I cannot use GUI interfaces (swing, awt, etc). There is some way to do it? At the present time, my difficult is to positioning the input command line in the correct line on console view. I feel Sorry by my poor English.

    You'll need JCurses or something similar.
    http://sourceforge.net/projects/javacurses/

  • Running Interactive commands in java and displaying the output.

    Hi All,
    I'm running a sample code to execute a user defined command (cmd1) and display the results. The output of the command when executed in command prompt is
    (1) Executing the command cmd1
    (2) Do you want to continue(Y/N)_ <waits for user input>
    (3) Based on user input
    (Y) Displays the results
    (N) Interrupted
    But i'm facing problem when i execute the below code. When the results are being displayed instead of displaying line(1) and (2) and then waiting for the input- the code waits for the input and then only displays the results.
    O/p
    inside output
    inside input
    y (------ gets the input and then only displays the results).
    Executing the command cmd1
    Do you want to continue(Y/N)
    results
    Please help out how to resolve this issue.
    Thanks.
    Sample Code for reference.
    import java.util.*;
    import java.io.*;
    public class SampleCheck {
         public static void main(String[] args) throws Exception {
              (new SampleCheck()).test();
         void test() throws Exception {
              Process proc = Runtime.getRuntime().exec("cmd1");
              // any error from the process?
              StreamHandlerErr errorStream = new StreamHandlerErr(proc
                        .getErrorStream(), System.err);
              // any output from the process?
              StreamHandlerOutput outputStream = new StreamHandlerOutput(proc
                        .getInputStream(), null);
              // any input to the process?
              // FileInputStream fin = new FileInputStream(new File("textfile1.txt"));
              StreamHandlerInput inputStream = new StreamHandlerInput(System.in, proc
                        .getOutputStream());
              // start the stream threads
              // errorStream.start();
              outputStream.start();
              inputStream.start();
              // wait till it returns
              int exitVal = proc.waitFor();
              System.exit(exitVal);
         class StreamHandlerInput extends Thread {
              InputStream is;
              OutputStream os;
              StreamHandlerInput(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside input");
                   try {
                        int c;
                        while ((c = is.read()) != -1) {
                             os.write(c);
                             System.out.println("c= " + c);
                             os.flush();
                   } catch (IOException e) {
                   System.out.println("End of Run Method..Input");
         class StreamHandlerOutput extends Thread {
              InputStream is;
              OutputStream os;
              File f=new File("jbsrt_output.txt");
              StreamHandlerOutput(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside output");
                   try {
                        int c;
                        FileOutputStream fs=new FileOutputStream(f);
                        /*PrintStream ps =new PrintStream(;
                        ps.print(arg0)
                        ps.close();*/
                        InputStreamReader ir = new InputStreamReader(is);
                        //System.out.println(ir.read());
                        BufferedReader br = new BufferedReader(ir);
                        String line = null;
                        while((line=br.readLine())!=null)
                             System.out.println(line);
                   } catch (Exception e) {
                   System.out.println("End of Run Method..Output");
         class StreamHandlerErr extends Thread {
              InputStream is;
              OutputStream os;
              StreamHandlerErr(InputStream is, OutputStream os) {
                   this.is = is;
                   this.os = os;
              public void run() {
                   System.out.println("inside Err");
                   try {
                        int c;
                        while ((c = is.read()) != -1) {
                             os.write(c);
                             os.flush();
                   } catch (IOException e) {
                   System.out.println("End of Run Method..Err");
    }

    Console input is line buffered. This means you only get the first character a line after the newline has been inputed.
    The same thing happen if you just type on the console.
    I am not aware of any simple way around this.
    IDEs get around this by changing the application run so that the input/output is captured as it happens and sent over a socket connection.

  • Running interactive commands via WFA

    So I am using WFA to deploy my storage systems. For tasks, where there is no commands I am using InvokeWFACluster-CLI.The problem with this is there are some commands that needs a input like the following --security login create -username <username> -application ontapi -authmethod password -role admin -vserver <admin_vservername>--  Is there a way I can provide the password without requiring the user input. In this case, WFA doesn't prompt for a user input either. Thanks,-Prasad

    prasadkm0204,      You need to look to solve the problem of NO WFA Provided commands in the following order: 1. Look for a Posh cmdlet and create your own WFA commands using those. This will almost certianly solve your problem. Powershell cmdlets for almost everything that is possible to do with a cluster/array is provided. See the documentation on this at WFA->Help->Support Links -> Powershell cmdlets Help. See my code example provided here for the specific case of creating a security login account: WFA Input Type of 'password' issues 2.  If at all there is no Powershell cmdlet available for a task, you can create WFA commands using SDK and ZAPIs. They are bundled for Posh and Perl languages.  3. Invoking direct InvokeWfaCluster-CLI is okay but not what I would recommend to use. Not that this will not work, or will create any unwanted issues. It will be fine mostly excapt it may end up askign for User-Inputs. Also the command output unlike ZAPI or Posh cmdlets is returned in string format  and those are compatively difficult to parse and loop through or be useful in creating advanced level commands.  One liners its fine. You'll start to face this as you develope more commands. sinhaa  

  • Running interactive command with Runtime.exec

    I'm trying to run a command via the Runtime.exec interface.
    Occasionally, the command needs to prompt for additional information. The response depends on the specific configuration, however, the command returns a list of options and then waits for a response.
    However, when the command waits for the response, my Java app hangs.
    After I call Runtime.exec, I create 2 threads to consume the contents of stderr and stdout. I then start them and call proc.waitFor()
    I would expect to see the output of the command in the stdout stream even though the command hasn't exited. I had hoped to parse the output to determine the necessary response. However, the calls to read the contents of the stdout and stderr streams block and I never see any output.
    How can I get access to the contents of those streams while the command is still running? Is this supported through the Runtime.exec interface?
    Thanks,
    Shawn

    This article should help:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Send a Command to many servers at sametime

    Hello.
    Could someone please tell me that there is a simple way to send a command to many servers at onetime without using Invoke-command  powershell cmdlet???

    Hi,
    You can use the free utility by Microsoft -
    PsExec.
    PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive
    command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.
    Checkout the below thread on similar discussion,
    Running a command on multiple Windows servers
    Regards,
    Gopi
    JiJi
    Technologies

  • Interacting with a shell prompt

    I am using the following piece of code:
    String command = ".. some unix command ..";
    Process p = Runtime.getRuntime().exec(command);
    BufferedReader buffIN = new BufferedReader(new InputStreamReader(p.getInputStream()));
    int c;
    while ((c = buffIN.read()) != -1) {
       System.out.write(c);
    BufferedWriter buffOUT = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
    buffOUT.write(".. some interaction command ..");
    int c2;
    while ((c2 = buffIN.read()) != -1) {
       System.out.write(c2);
    buffIN.close();With this code, I can invoke ".. some unix command ..", read the output from the shell, but I am unable to send command ".. some interaction command .." to the shell and make it effective.

    You need to flush the data from the BufferdWriter, so the process will get it.
    So try as follows:
    buffOUT.write(".. some interaction command ..");
    buffOUT.flush()

  • Nexus 7000 Interactive Action with TCL or Python

    hello, Team
    Does anybody know how we can trigger interactive action with EEM?
    Cu hope to execute some command sets to another device with specific event.
    I've tried to test with TCL/Python with CLI but interactive mode didn't support by CLI/EXEC.
        N7K_1-tcl# cli "telnet localhost"
        Cannot run interactive command with cli/exec prefix.
        N7K_1-tcl#
    Is there any idea to work this scenario properly?
    Or Anybody guide where is the TCL Library can use inside of N7K?
    Just it looks simple, but couldn't work it easy in N7K.
    Hope to get any clever idea from experts
    Best Regards
    Jaemi Lee

    There isn't any mail action support in NX-OS EEM.  However, EEM 5.x provides the ability to execute a tclsh script from an EEM applet.  You could use Tcl to send your email.  The tcllib package at http://tcllib.sourceforge.net/ offers an smtp.tcl library in the mime module.  You can use this to send your email.

  • Passing password in an AS script to a shell command

    Hi,
    I'm posting here based on this discution:
    http://discussions.apple.com/thread.jspa?threadID=345269
    In my case I want to pass the password to the rsync command. The command I use is on the format:
    rsync -vr --size-only ~/Sites/ usernameonserver@serveuraddress:/path/to/the/directory
    Normally rsync will ask for a password. How the password and username are passed from AS to terminal (or what is equivalent to)?
    it is important to mention that the user and password are not local, but on the remote server.
    Thanks

    Hi Steve,
    As you've probably gathered, from this post and the other thread you linked to, AppleScript doesn't really offer a straightforward way to run command line tools that require user interaction.
    The suggestions NovaScotian offered may work for your rsync dilemma, but I thought I'd mention another option that you might want to investigate for this or other similar problems. There is a command line tool called "expect" that is specifically tailored for automating the running and interaction with other commands that require user responses. See the man page for "expect" for specifics.
    Basically "expect" allows you to write a script that controls what other process it launches, what prompts to wait for and what values to feed to the prompts. These expect scripts can be as complex as you need to make them and they can deal with multiple secondary processes if needed. The expect script can sort of act as a "middle-man" between AppleScript and the actual command line tool(s) you want to run. AppleScript runs an expect script, the expect script runs the command you really want to execute and deals with any interactive prompts and finally returns any results back to the AppleScript.
    So, getting back to your rsync problem... you could write your AppleScript to call an "expect" script passing it the rsync password. And you would write your expect script to accept the password as one of it's command line parameters. The expect script would then launch rsync, wait for the password prompt and then feed rsync the password you gave it from AppleScript. The expect script would finally return any output or error messages from rsync back to AppleScript.
    This may be overkill for your particular problem since rsync apparently gives you other mechanisms for dealing with the password. But in some situations it may be the best or only solution for running interactive command line tools from AppleScript.
    Steve

  • [Forum FAQ] How to deploy applications remotely

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • WLST, how do I suppress unwanted stack traces and make WLST less verbose?

    Hi everyone,
    I've just started out with WLST but have ended up somewhat confused. My script works as intended but is very verbose.
    Suppose I want to log in:
    try:
         connect(user, "wrong_password", url)
    except WLSTException, err:
         print str(err)
         print "Run with option \"-h\" for help"The password is wrong so I get something like this printed out by me:
    {noformat}
    Error occured while performing connect : User: wm714, failed to be authenticated. Use dumpStack() to view the full stacktrace
    {noformat}
    But I also get a totally unwanted Java stack trace (before my message):
    {noformat}This Exception occurred at Fri May 21 15:49:01 CEST 2010.
    javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: User: wm714, failed to be authenticated.]
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:42)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:783)
    at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:677)
    {noformat}
    I don't want to confuse the user with all that! I found this:
    http://objectmix.com/weblogic/529822-wlst-exception-handling-unwanted-stack-trace.html
    Which discusses WLS.commandExceptionHandler.setSilent(1) I'm running on WLS 10.3.0.0 and can execute that statement but it has no effect. I didn't even know about the WLS-object and I can find no documentation on commandExceptionHandler.
    On the matter of verbosity, is there any way to get rid of stuff like:
    Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
    For more help, use help(domainRuntime)I avoid using the "interactive" commands like cd and use stuff like getMBean("domainRuntime:/ServerRuntimes/" + appServer.getName()
    + "/JMSRuntime/" + appServer.getName() + ".jms/JMSServers") but I still get the clutter printed out.
    Thanks!

    Workaround:
    wlstOut = tempfile.mktemp(suffix="_wlst.txt")
    redirect(wlstOut, "false")
    ... do useful stuff
    stopRedirect()
    os.remove(wlstOut)I would have preffered to turn off the messages (yes I could try /dev/null) but this will do. A funny thing is that the stack trace I wrote about doesn't appear in the log file. Somehow "redirect" must have a nice side effect.
    /Roger

  • Error while install sql server 2012 using powershell

    hello all,
    I am using below function to install sql server and its not working  can some one help me please 
    Function Install-Sql2012
    param
    [Parameter()][string]  $Path ,#= (read-host "Enter Installation Binary Path"),
            [Parameter()][string]  $AddSSIS= (read-host "Do u need SSIS Enter 1 for yes o for no") ,
            [Parameter()][string]  $AddSSRS= (read-host "Do u need SSRS Enter 1 for yes o for no") ,
    [Parameter()][string]  $InstanceName = (read-host "Enter Instance name"),
    [Parameter()][string]  $ServiceAccount= (read-host "Enter Service Account"),
    [Parameter()][string]  $ServicePassword= (read-host -assecurestring "Enter Service Account Password") ,
    [Parameter()][string]  $AgentAccount=(read-host "Enter Agent Account"),
    [Parameter()][string]  $AgentPassword=(read-host "Enter Agent pasword"),
            [Parameter()][string]  $Backuppath= (read-host "Enter Backuppath"),
    [Parameter()][string]  $SaPassword= (read-host -assecurestring "Enter SA Account Passowrd"),
            [Parameter()][string]  $SQLTEMPDBDIR= (read-host  "Enter TempDir"),
            [Parameter()][string]  $SQLUSERDBDIR= (read-host  "Enter User Data Directory"),
            [Parameter()][string]  $SQLUSERDBLOGDIR= (read-host  "Enter User Log Directory"),
    #[Parameter(Position=5,Mandatory=$false)][string] $LicenseKey,
    [Parameter()][string]  $SqlCollation = "SQL_Latin1_General_CP1_CI_AS",
    [Parameter()][switch]  $NoTcp,
    [Parameter()][switch]  $NoNamedPipes
    #Build the setup command using the install mode
    if ($Path -eq $null -or $Path -eq "")
    #No path means that the setup is in the same folder
    $command = '.\setup.exe /Action="Install"'
    else
    #Ensure that the path ends with a backslash
    if(!$Path.EndsWith("\"))
    $Path += "\"
    $command = $path + 'setup.exe /Action="Install"'
    #Accept the license agreement - required for command line installs
    $command += ' /IACCEPTSQLSERVERLICENSETERMS'
    #Use the QuietSimple mode (progress bar, but not interactive)
    $command += ' /QS'
    #Set the features to be installed
    #$command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS'
        If ($AddSSIS -ne '0' -and $AddSSIS -ne '1') {
            throw 'Invalid input. Enter a valid value for SSIS.'
        If ($AddSSRS -ne '0' -and $AddSSRS -ne '1') {
            throw 'Invalid input. Enter a valid value for SSRS.'
       if ($AddSSIS -eq 1 -and $AddSSRS -eq 1)
           $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSIS,SSRS'
       if ($AddSSIS -eq 1 -and $AddSSRS -eq 0)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSIS'
       if ($AddSSIS -eq 0 -and $AddSSRS -eq 1)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS,SSRS'
       if  ($AddSSIS -eq 0 -and $AddSSRS -eq 0)
       $command += ' /FEATURES=SQLENGINE,CONN,BC,SSMS,ADV_SSMS'
    #Set the Instance Name
    $command += (' /INSTANCENAME="{0}"' -f $InstanceName)
    #remove Set the License Key only if a value was provided, otherwise install Evaluation edition
    #if ($LicenseKey -ne $null -and $LicenseKey -ne "")
    # $command += (' /PID="{0}"' -f $LicenseKey)
        #set reporting to off
        $command += ('/SQMREPORTING="0"')
        #Add Browser Account 
        $command +=('/BROWSERSVCSTARTUPTYPE="Disabled"')
        #Add Backup path 
        $command +=('/SQLBACKUPDIR="{0}"' -f $backuppath)
    #Check to see if a service account was specified
    if ($ServiceAccount -ne $null -and $ServiceAccount -ne "")
    #Set the database engine service account
    $command += (' /SQLSVCACCOUNT="{0}" /SQLSVCPASSWORD="{1}" /SQLSVCSTARTUPTYPE="Automatic"' -f $ServiceAccount, $ServicePassword)
    #Set the SQL Agent service account
    $command += (' /AGTSVCACCOUNT="{0}" /AGTSVCPASSWORD="{1}" /AGTSVCSTARTUPTYPE="Automatic"' -f $AgentAccount, $AgentPassword)
    else
    #Set the database engine service account to Local System
    $command += ' /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSVCSTARTUPTYPE="Automatic"'
    #Set the SQL Agent service account to Local System
    $command += ' /AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /AGTSVCSTARTUPTYPE="Automatic"'
    #Set the server in SQL authentication mode if an SA password was provided
    if ($SaPassword -ne $null -and $SaPassword -ne "")
    $command += (' /SECURITYMODE="SQL" /SAPWD="{0}"' -f $SaPassword)
    #Add current user as SysAdmin
    $command += (' /SQLSYSADMINACCOUNTS="test\ADMIN"')
        #Add Tempdbdata path
    $command += (' /SQLTEMPDBDIR="{0}"' -f $SQLTEMPDBDIR)
        #Add Tempdblog path
        $command += (' /SQLTEMPDBLOGDIR="{0}"' -f $SQLTEMPDBDIR)
         #Add UserDBdata path
        $command += (' /SQLUSERDBDIR="{0}"' -f $SQLUSERDBDIR)
         #Add UserDBlog path
        $command += (' /SQLUSERDBLOGDIR="{0}"' -f $SQLUSERDBLOGDIR)
    #Set the database collation
    $command += (' /SQLCOLLATION="{0}"' -f $SqlCollation)
    #Enable/Disable the TCP Protocol
    if ($NoTcp)
    $command += ' /TCPENABLED="0"'
    else
    $command += ' /TCPENABLED="1"'
    #Enable/Disable the Named Pipes Protocol
    if ($NoNamedPipes)
    $command += ' /NPENABLED="0"'
    else
    $command += ' /NPENABLED="1"'
    if ($PSBoundParameters['Debug']) 
    Write-Output $command
    else
    Invoke-Expression $command
    Install-Sql2012
    Below is the error i am getting 
    PS C:\temp\in> .\Install-Sql2012.ps1
    Do u need SSIS Enter 1 for yes o for no: 0
    Do u need SSRS Enter 1 for yes o for no: 0
    Enter Instance name: MSSQLSERVER
    Enter Service Account:
    Enter Service Account Password:
    Enter Agent Account:
    Enter Agent pasword:
    Enter Backuppath: "C:\Temp\IN\bck"
    Enter SA Account Passowrd: **********
    Enter TempDir: "C:\Temp\IN\bck"
    Enter User Data Directory: "C:\Temp\IN\bck"
    Enter User Log Directory: "C:\Temp\IN\bck"
    Microsoft (R) SQL Server 2012 11.00.2100.60
    Copyright (c) Microsoft Corporation.  All rights reserved.
    The following error occurred:
    Instance name is limited to 16 characters. Yours 'MSSQLSERVER/SQMREPORTING=0/BROWSERSVCSTARTUPTYPE=DISABLED/SQLBACKUPDIR=C:\TEMP\IN\BCK' is 85.
    Error result: -2054422513
    Result facility code: 1420
    Result error code: 15
    Please review the summary.txt log for further details
    Thanks,
    Ashwin.
        

    Line 94, 97 and 100 appear to not have spaces at the beginning of each string, which could cause some issues:
    #set reporting to off
    $command += ('/SQMREPORTING="0"')
    #Add Browser Account
    $command +=('/BROWSERSVCSTARTUPTYPE="Disabled"')
    #Add Backup path
    $command +=('/SQLBACKUPDIR="{0}"' -f $backuppath)
    Probably should be this:
    #set reporting to off
    $command += (' /SQMREPORTING="0"')
    #Add Browser Account
    $command +=(' /BROWSERSVCSTARTUPTYPE="Disabled"')
    #Add Backup path
    $command +=(' /SQLBACKUPDIR="{0}"' -f $backuppath)
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • [CS3] [JS] Picture placement error

    Hi,
    I've created a script, creating a contactsheet from a folder of pictures.
    Everything works fine except for one small detail.
    When importing an illustrator document which uses missing fonts, the script trows a messagebox asking me if its ok to place the picture with the missing fonts.
    Is this something I can override ? The picures must be placed, even if the fonts are missing.
    ... some code ...
    var myRectangle2 = doc.pages[doc.pages.count() - 1].rectangles.add();
    myRectangle2.place(arrFiles[s]);
    myRectangle2.fit(FitOptions.proportionally);
    Thanx
    Tim
    Indesign CS3 / Os X

    If you positively want to suppress user interaction, inserting
    >app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
    somewhere before the optionally interacting command should work. Add
    >app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    after it, otherwise you will
    b never
    get any dialogs after running the script. A common mistake, which has baffled many a script user. I guess it's safest to put the "Off" line directly before, and the "On" line directly after the optionally interacting command (in your case the .place line). That way you still get error messages and dialogs for those cases you did not foresee. This will still mess up your settings if for some reason InDesign crashes and burns on the .place command itself, so you should have a single line script ready that just contains the "On" line.

Maybe you are looking for

  • Pages 08 Comments

    While using Pages 08 is there any way to change the color of the comment boxes? I have selected the comment, opened the inspector to the graphic tab, and can see where the fill is listed as gradient with the two colors of yellow, but I cannot select

  • Can i install Oracle ADF Essentials 11.1.2.3 on weblogic 10.6 ?

    can i install Oracle ADF Essentials 11.1.2.3 on weblogic 10.6 ? what the difference between ADF Essentials 11.1.2.3 and Application Development Run time 11.1.1.6 ? can i use ADF Essentials 11.1.2.3 instead of Application Development Run time 11.1.1.6

  • PSE 5 organizer converted to LR

    Although there has been discussion about this, I can't find an answer. I am a pse 5 user and am thinking about buying lr. Can I convert my organizer to the LR organizer with minimal hassle? Am I better off keeping the pse5 organizer or better off usi

  • ClientListener not working on showDetailItem

    Hi All, I am trying to call a JavaScript function upon clicking the ShowDetailItem text in the panel tabbed layout.I have set a clientlistener within the showdetailitem upon "Click" but it doesn't seem to go inside the function.I have tried action ty

  • How do i convert a slideshow made in premiere elements 11 to premiere elements 12

    how do i convert a slideshow made in premiere elements 11 to premiere elements 12