Open & Run Everything Commands?

Well ... I hadn't been aware that there was such a command, but there appears to be. Or, if not a command, then a set of keystrokes that you can make that leaves you there.
Background: I was busy, getting a phone call and looking up something on the web and timing some flan in the oven and trying to figure out why some sites were loading slowly and .. in the midst of all that, while searching Applications and Utilities folders for a speed test to use, I did it.
All of a sudden, multiple Finder pages, one for each line/app/whatever in the Applications folder, began to appear and cascade across the screen in their ordered stacks. I figured I could just wait it out and then do the standard "Close All' keystrokes but, as soon as the last page appeared, all of the apps commended to open. I mean, each and every single one of them, one on top of the other, one after the other.
Quite a few weren't currently in use, some don't even work on the current OS but are still residing in the folder, some need setup or configuration runs and each one of those in order would be popping up their various little splash menus about what you needed to do.
I tried to use Apple Menu to either shut down or restart but, despite on a few occasions being able to do what appeared to be the starting of the process (" .. are you sure ..?" and etc.) it just never took. More and more just kept popping up on the screen, including some which completely blanked the screen for a while, which was even more irritating.
I tried shutting down by pressing and holding the Power button on the back and, for some really odd reason, even that wouildn't work. No matter how long I held it down I couldn't make it shut down but, instead, it just kept going to sleep. And, on awakening, I could no longer access the Apple Menu at all. At this point the Dock was really funny looking, dozens and dozens of tiny icons all jammed in down there with many, many of them bouncing in  the "Hey I've got a message ... " manner.
I tried the Force Quit keyboard shortcut and it did, indeed, pop the menu box up onto the screen. I started at the first thing, an app starting with A obviously, and was able to Force Quit it. And then the next, and the next, all the way through the list, all the way down until only Finder was left there and, at that point, I did close all of the Finder windows, do a Restart, and am now back in action.
The question is: What the heck did I do to cause this?

The only way you could have launched multiple applications would be to select them and double click or select the finder Open menu.  So maybe you inadvertently did a select all (command-A) while the Applications menu had finder focus  and then you launched them all.

Similar Messages

  • Run dos command that starts program and program stay open

    I'm running the following code,
    string m_file= "c:\program\program.exe" ;// runs a program
    Process myProcess = new Process();
    myProcess.StartInfo.FileName = @programtextBox.Text.Trim();
    myProcess.StartInfo.Arguments = m_file;
    String m_arguments = myProcess.StartInfo.Arguments.ToString().Trim();
    myProcess.Start();
    It works fine except I need the program to stay open that this command starts. But it closes while it's in the process of starting.

    I had a mistake in what I posted in my code. Here it is again with corrections, and more detail.
    string m_run= "c:\my programs\adobe\photoshope.exe" //This is saved in the program and can be set to any program the user wants to use. it's saved in the programtextBox.Text noted eailer, which is saved to the hard drive.
    string m_file= "c:\file\anypicture.jpg" ;// picture that is selected in the interface.
    Process myProcess = new Process();
    myProcess.StartInfo.FileName = m_run;
    myProcess.StartInfo.Arguments = m_file;
    String m_arguments = myProcess.StartInfo.Arguments.ToString().Trim();
    myProcess.Start();
    This is a windows form program.
    It looks to me like you're either redacting or modifying your actual code before posting.  I could be wrong about that, but I'm pretty sure because:
    If you were calling Process.Start() against program files/adobe/photoshope.exe I believe that you'd get a Win32 Exception since I don't think that file exists in any photoshop installation.
    I sincerely doubt that you're actually working with "file/anypicture.jpg."
    I'm confused by the declaration of m_arguments which is never used.  I assume it is in fact used somewhere in your code.
    Finally, you have stated that the program to open files with is pre-defined, so I suspect that data is actually being pulled from a variable instead of from a hard string as in your "example."
    If that's the case then you might as well go shoot yourself in the foot, since that would do exactly as much good as asking for help with broken code and then posting pseudo-code instead of what doesn't work.  It's like telling an auto mechanic your
    car dies every time you hit 22 miles per hour, while delivering your bicycle for service.
    Content Removed

  • Terminal runs a command when opened

    Whenever I open the terminal, it runs some command I ran ages ago, for no appearant reason (in this case, CDs to some random library folder). It's getting quite annoying really, any idea what's causing this? If I knew what was causing it, I could set it to good use because there is a certain folder I DO need to cd into every time I launch the terminal...

    And the last command there is checked, but unchecking it didn't fix it either,Well, since there was no file (saved .term) specified it shouldn't make a difference.
    The simplest thing to do is to clear Terminal's preferences, by dragging ~/Library/Preferences/com.apple.Terminal.plist to your Desktop (with Terminal not running) and try again. If that clears it you can Trash the .plist from your Desktop.

  • Running a command in a command line tool in fastest way

    Before anything I want to clarify some terms : 
    apk
    file (android application package file) : equivalent to executable (exe) files on windows
    aapt.exe
    : A command line tool which comes with android sdk in order to fetch information of an apk file (It obviously has other usages)
    note : This question is not about an android feature. It's all about C# and functionality of .Net framework 
    An
    apk file has a name just same as any other file, but it has a internal name (which will be shown when you install apk file on android os as name of application) 
    with
    aapt.exe I can get internal name of an apk using following command :  
    aapt
    d badging "<apk path>"
    I
    have copied aapt.exe where executable file of my c# application is and I want  :
    Enter
    above command for each apk in selected directory (using GetAllFiles method)
    I want to get internal names of apk files and
    I've tried a lot of ways and I've searched a lot. finally this is what I've got : 
    Process proc = new Process();
    proc.StartInfo.FileName = "cmd.exe";
    proc.StartInfo.RedirectStandardInput = true;
    proc.StartInfo.RedirectStandardOutput = true;
    proc.StartInfo.UseShellExecute = false;
    proc.StartInfo.StandardOutputEncoding = System.Text.Encoding.UTF8;
    proc.Start();
    using (StreamWriter sw = proc.StandardInput)
    foreach (string path in Directories.GetAllFiles(@"E:\apk", "apk"))
    sw.WriteLine("aapt d badging " + "\"" + path + "\"");
    //following line doesn't work because sStandardInput is open
    Debug.WriteLine(proc.StandardOutput.ReadToEnd());
    // There will be a really huge amount of text (at least 20 line per sw.Writeline) and
    //it impacts performance so following line is not really what I'm looking for
    Debug.WriteLine(proc.StandardOutput.ReadToEnd());
    GetAllFiles is
    a function that I've created to fetch all apk file full path. It gets two argument. First argument is path and second one is extension of file you want its full path to be fetched.
    This is not final code.
    As I've commented it out first Debug.WriteLine doesn't
    work and second one is not a good idea. how should I get output from proc?
    I have tried running process by argument and its awful :)
    As another approach :
    Because apk files are basically zip files I can extract them get what I want from them.
    There is an xml file named Androidmanifest.xml in every apk file.
    Androidmanifest.xml is like an ID card for an apk file and apk internal name can be found in it but here are some problems with this approach : 
    1. Androidmanifest.xml is not a plain text file. It's coded and it requires a lot of complexity to decode it
    2. application name (or apk internal name) is an attribute in this file and it's value is not a string value. It's a reference to a file where strings are stored and worst thing is it's not an easy to find out reference. It's just a number

    And you don't get any output from it? Maybe you're passing the arguments incorrectly?
    No. I don't get any result and I have checked arguments and it's correct.
    But you are already running a separate process for every apk file. You start a single cmd.exe and then send it commands that will cause aapt to be run for every file. Unless aapt accepts multiple apk filenames on the command line there's no way
    around using separate processes.
    I didn't know that. anyway speed in this way is much more rather than creating a function. creating a Process object in it and calling function for each apk file.
    I read somewhere that it's possible to run multiple commands in cmd by & operator but as you said I think every command runs aapt. I have tested this approach too and it's very very slow
    fastest approach I have found is what I have wrote here and speed is about  0.6 per apk file which is still slow when there is thousands of apk files.
    I tried an application that does same thing (fetching apk information) and in it's installation directory I found aapt.exe which means it uses this tool to get information but speed is significantly faster rather than my application.   
    So what's your suggestion about this? 

  • Process.Start - getting different output when running command using this method than I am if I run same command in CMD prompt

    Hi
    Creating an application to analyze .dmp files - all working well except this odd issue
    If I open command prompt and enter this command:-
    kd -z C:\Windows\MiniDump\042414-24632-01.dmp -c "!analyze -v"
    Then it works and shows me all the output I need (shown at bottom of post)
    If I run same command in VB.net using following code - then it doesn't give the same output - the bits I need at the end created by the !analyze -v switch don't appear
    Any ideas why it is not seeing the switch correctly - setting a breakpoint and checking contents of startinfo seems to be showing correct cmd line i.e. "kd -z C:\windows\minidump\042414-24632-01.dmp -c "!analyze –v;q""
    Dim myprocess As New Process()
    myprocess.StartInfo.FileName = "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\kd"
    myprocess.StartInfo.Arguments = "-z C:\windows\minidump\042414-24632-01.dmp -c ""!analyze –v;q"""
    myprocess.StartInfo.UseShellExecute = False
    myprocess.StartInfo.RedirectStandardOutput = True
    myprocess.StartInfo.CreateNoWindow = True
    myprocess.Start()
    TextBox1.AppendText(myprocess.StandardOutput.ReadToEnd())
    Output when run from cmd prompt:-
    C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86>kd -z C:\Windows\MiniDump\042414-24632-01.dmp -c "!analyze -v;q"
    Microsoft (R) Windows Debugger Version 6.3.9600.17298 X86
    Copyright (c) Microsoft Corporation. All rights reserved.
    Loading Dump File [C:\Windows\MiniDump\042414-24632-01.dmp]
    Mini Kernel Dump File: Only registers and stack trace are available
    Symbol search path is: *** Invalid ***
    * Symbol loading may be unreliable without a symbol search path. *
    * Use .symfix to have the debugger choose a symbol path. *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    Executable search path is:
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Windows 7 Kernel Version 7601 (Service Pack 1) MP (4 procs) Free x86 compatible
    Product: WinNt, suite: TerminalServer SingleUserTS
    Built by: 7601.18205.x86fre.win7sp1_gdr.130708-1532
    Machine Name:
    Kernel base = 0x82e3e000 PsLoadedModuleList = 0x82f874d0
    Debug session time: Thu Apr 24 13:36:18.672 2014 (UTC + 1:00)
    System Uptime: 0 days 0:00:38.703
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Loading Kernel Symbols
    Loading User Symbols
    Loading unloaded module list
    ************* Symbol Loading Error Summary **************
    Module name Error
    ntkrnlpa The system cannot find the file specified
    You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the
    command that caused symbols to be loaded.
    You should also verify that your symbol search path (.sympath) is correct.
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 50, {afa99150, 0, 88c557d7, 0}
    *** WARNING: Unable to verify timestamp for mssmbios.sys
    *** ERROR: Module load completed but symbols could not be loaded for mssmbios.sys
    *** WARNING: Unable to verify timestamp for mfehidk.sys
    *** ERROR: Module load completed but symbols could not be loaded for mfehidk.sys
    *** WARNING: Unable to verify timestamp for HipShieldK.sys
    *** ERROR: Module load completed but symbols could not be loaded for HipShieldK.sys
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    Probably caused by : mfehidk.sys ( mfehidk+377d7 )
    Followup: MachineOwner
    1: kd> kd: Reading initial command '!analyze -v;q'
    * Bugcheck Analysis *
    PAGE_FAULT_IN_NONPAGED_AREA (50)
    Invalid system memory was referenced. This cannot be protected by try-except,
    it must be protected by a Probe. Typically the address is just plain bad or it
    is pointing at freed memory.
    Arguments:
    Arg1: afa99150, memory referenced.
    Arg2: 00000000, value 0 = read operation, 1 = write operation.
    Arg3: 88c557d7, If non-zero, the instruction address which referenced the bad memory
    address.
    Arg4: 00000000, (reserved)
    Debugging Details:
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    ADDITIONAL_DEBUG_TEXT:
    You can run '.symfix; .reload' to try to fix the symbol path and load symbols.
    MODULE_NAME: mfehidk
    FAULTING_MODULE: 82e3e000 nt
    DEBUG_FLR_IMAGE_TIMESTAMP: 4d2e1e3e
    READ_ADDRESS: GetPointerFromAddress: unable to read from 00000000
    GetPointerFromAddress: unable to read from 00000000
    unable to get nt!MmSpecialPoolStart
    unable to get nt!MmSpecialPoolEnd
    unable to get nt!MmPagedPoolEnd
    unable to get nt!MmNonPagedPoolStart
    unable to get nt!MmSizeOfNonPagedPoolInBytes
    afa99150
    FAULTING_IP:
    mfehidk+377d7
    88c557d7 0fb70c06 movzx ecx,word ptr [esi+eax]
    MM_INTERNAL_CODE: 0
    CUSTOMER_CRASH_COUNT: 1
    DEFAULT_BUCKET_ID: WIN7_DRIVER_FAULT
    BUGCHECK_STR: 0x50
    CURRENT_IRQL: 0
    ANALYSIS_VERSION: 6.3.9600.17298 (debuggers(dbg).141024-1500) x86fre
    LAST_CONTROL_TRANSFER: from 82e7eaa8 to 82ecb879
    STACK_TEXT:
    WARNING: Stack unwind information not available. Following frames may be wrong.
    ad0baf90 82e7eaa8 00000000 afa99150 00000000 nt+0x8d879
    ad0bafa8 88c557d7 badb0d00 00000000 88c4ceb0 nt+0x40aa8
    ad0bb040 88c4f97d 001a99b0 afa91000 00000000 mfehidk+0x377d7
    ad0bb090 88c52b16 00770220 ad0bb0fc 00000010 mfehidk+0x3197d
    ad0bb0bc 98d5fb73 ae770220 ad0bb0fc 00000010 mfehidk+0x34b16
    ad0bb140 98d5fc43 ae738c30 98d6b62a aace7220 HipShieldK+0xb73
    ad0bb168 98d6b882 ad0bb19c 00000000 98d77b44 HipShieldK+0xc43
    ad0bb1b8 98d631a9 00000bd4 0000102c ad0bb208 HipShieldK+0xc882
    ad0bb330 88c47795 00000bd4 0000102c ad0bb401 HipShieldK+0x41a9
    ad0bb400 88c22b57 0000102c ad0bb460 85b3dee0 mfehidk+0x29795
    ad0bb41c 88c232c6 ad0bb430 0000000c 8c4b6ce0 mfehidk+0x4b57
    ad0bb43c 830a5acb adb6b9b8 0000102c ad0bb460 mfehidk+0x52c6
    ad0bb4f4 830adaf8 adb16030 01b6b9b8 ad0bb550 nt+0x267acb
    ad0bbc00 82e7b8c6 038ae710 038ae6ec 02000000 nt+0x26faf8
    ad0bbc34 77a470f4 badb0d00 038ae3dc 00000000 nt+0x3d8c6
    ad0bbc38 badb0d00 038ae3dc 00000000 00000000 0x77a470f4
    ad0bbc3c 038ae3dc 00000000 00000000 00000000 0xbadb0d00
    ad0bbc40 00000000 00000000 00000000 00000000 0x38ae3dc
    STACK_COMMAND: kb
    FOLLOWUP_IP:
    mfehidk+377d7
    88c557d7 0fb70c06 movzx ecx,word ptr [esi+eax]
    SYMBOL_STACK_INDEX: 2
    SYMBOL_NAME: mfehidk+377d7
    FOLLOWUP_NAME: MachineOwner
    IMAGE_NAME: mfehidk.sys
    BUCKET_ID: WRONG_SYMBOLS
    FAILURE_BUCKET_ID: WRONG_SYMBOLS
    ANALYSIS_SOURCE: KM
    FAILURE_ID_HASH_STRING: km:wrong_symbols
    FAILURE_ID_HASH: {70b057e8-2462-896f-28e7-ac72d4d365f8}
    Followup: MachineOwner
    quit:
    output when run in my app:-
    Microsoft (R) Windows Debugger Version 6.3.9600.17298 X86
    Copyright (c) Microsoft Corporation. All rights reserved.
    Loading Dump File [C:\Windows\MiniDump\042414-24632-01.dmp]
    Mini Kernel Dump File: Only registers and stack trace are available
    Symbol search path is: *** Invalid ***
    * Symbol loading may be unreliable without a symbol search path. *
    * Use .symfix to have the debugger choose a symbol path. *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    Executable search path is:
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Windows 7 Kernel Version 7601 (Service Pack 1) MP (4 procs) Free x86 compatible
    Product: WinNt, suite: TerminalServer SingleUserTS
    Built by: 7601.18205.x86fre.win7sp1_gdr.130708-1532
    Machine Name:
    Kernel base = 0x82e3e000 PsLoadedModuleList = 0x82f874d0
    Debug session time: Thu Apr 24 13:36:18.672 2014 (UTC + 1:00)
    System Uptime: 0 days 0:00:38.703
    * Symbols can not be loaded because symbol path is not initialized. *
    * The Symbol Path can be set by: *
    * using the _NT_SYMBOL_PATH environment variable. *
    * using the -y <symbol_path> argument when starting the debugger. *
    * using .sympath and .sympath+ *
    Unable to load image \SystemRoot\system32\ntkrnlpa.exe, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ntkrnlpa.exe
    *** ERROR: Module load completed but symbols could not be loaded for ntkrnlpa.exe
    Loading Kernel Symbols
    Loading User Symbols
    Loading unloaded module list
    ************* Symbol Loading Error Summary **************
    Module name Error
    ntkrnlpa The system cannot find the file specified
    You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the
    command that caused symbols to be loaded.
    You should also verify that your symbol search path (.sympath) is correct.
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 50, {afa99150, 0, 88c557d7, 0}
    *** WARNING: Unable to verify timestamp for mssmbios.sys
    *** ERROR: Module load completed but symbols could not be loaded for mssmbios.sys
    *** WARNING: Unable to verify timestamp for mfehidk.sys
    *** ERROR: Module load completed but symbols could not be loaded for mfehidk.sys
    *** WARNING: Unable to verify timestamp for HipShieldK.sys
    *** ERROR: Module load completed but symbols could not be loaded for HipShieldK.sys
    ***** Kernel symbols are WRONG. Please fix symbols to do analysis.
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    *** Either you specified an unqualified symbol, or your debugger ***
    *** doesn't have full symbol information. Unqualified symbol ***
    *** resolution is turned off by default. Please either specify a ***
    *** fully qualified symbol module!symbolname, or enable resolution ***
    *** of unqualified symbols by typing ".symopt- 100". Note that ***
    *** enabling unqualified symbol resolution with network symbol ***
    *** server shares in the symbol path may cause the debugger to ***
    *** appear to hang for long periods of time when an incorrect ***
    *** symbol name is typed or the network symbol server is down. ***
    *** For some commands to work properly, your symbol path ***
    *** must point to .pdb files that have full type information. ***
    *** Certain .pdb files (such as the public OS symbols) do not ***
    *** contain the required information. Contact the group that ***
    *** provided you with these symbols if you need this command to ***
    *** work. ***
    *** Type referenced: nt!_KPRCB ***
    Probably caused by : mfehidk.sys ( mfehidk+377d7 )
    Followup: MachineOwner
    Darren Rose

    Try it by opening the Cmd prompt as the actual process and passing the Filename and its arguments as the arguments of the Cmd process.  If you notice there is a "-C" before the Filename and Arguments in this example.  The "-C"
    tells the cmd to execute the commands and then close itself.  You can also use a "-K" which tells the cmd to execute the commands and keep itself open.  Being you are not showing the cmd window you don`t want to keep it opened because the
    user can`t close it so, that is why i used "-C".
     I don`t have the program so, you can just experiment to see what it does.  Maybe you should try using "-K" and show the cmd window by commenting out the CreateNoWindow line so you can see what is in the cmd window while testing.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim filepath As String = """C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\kd"""
    Dim args As String = " -z C:\windows\minidump\042414-24632-01.dmp -c ""!analyze –v;q"""
    Dim p As New Process
    With p.StartInfo
    .FileName = "cmd.exe"
    .Arguments = "-c " & filepath & args
    .UseShellExecute = False
    .CreateNoWindow = True
    .RedirectStandardOutput = True
    End With
    p.Start()
    TextBox1.Text = p.StandardOutput.ReadToEnd
    End Sub
    If you say it can`t be done then i`ll try it

  • Running ssh command in a java application

    Hi there!
    I am trying to run a ssh command from a java application cause I need to store the result.
    Actually I can run this command in the cygwin shell so I need to open the shell and run the command, all trough java.
    so, what my process needs to do is:
    1) open the cmd
    2) run C:\cygwin\cygwin.bat
    3) execute the ssh command
    ssh -l fip-user ipdb fip 42704) print the result of the ssh command.
    Note that the cygwin opens in the same command line window and so will print it's result to the same process inputstream
    Message was edited by:
    RBervini

    Use "Runtime.getRuntime().exec()" to execute the SSH program,
    and you can then get the output of the SSH program
    via the getInputStream() method on the returned Process object.
    Note: there are many pitfalls with this. In particular, most people don't know
    they should create separate threads to drain the input/output pipes.
    See this excellent classic article http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    on how to do it right.

  • Using C# to run PowerShell command to create VirtualDirectory fails

    I can run these commands with no problem directly in PowerShell. But trying to get C# to run them, I receive errors.
    md d:\ftproot\vdir\test20140317A;
    New-WebVirtualDirectory -Site "[site]/[a virt directory]" -Name test20140317A -physicalPath d:\ftproot\vdir\test20140317A;
    When running in c# through two different means, I receive these errors
    Exception:Caught: "A parameter cannot be found that matches parameter name 'physicalPath'." (System.Management.Automation.CmdletInvocationException)
    A System.Management.Automation.CmdletInvocationException was caught: "A parameter cannot be found that matches parameter name 'physicalPath'."
    Though in Visual Studio , there's something called InteliTrace and it's showing a whole slew of exceptions starting with
    Exception:Thrown: "Unable to load DLL 'wldp.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" (System.DllNotFoundException)
    A System.DllNotFoundException was thrown: "Unable to load DLL 'wldp.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
    Exception:Thrown: "Requested registry access is not allowed." (System.Security.SecurityException)
    A System.Security.SecurityException was thrown: "Requested registry access is not allowed."
    Exception:Thrown: "Cannot find path 'C:\Users\jpacella\Documents\WindowsPowerShell\Modules' because it does not exist." (System.Management.Automation.ItemNotFoundException)
    A System.Management.Automation.ItemNotFoundException was thrown: "Cannot find path 'C:\Users\jpacella\Documents\WindowsPowerShell\Modules' because it does not exist."
    Exception:Thrown: "Could not load file or assembly 'Microsoft.IIS.PowerShell.Framework' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException)
    A System.IO.FileNotFoundException was thrown: "Could not load file or assembly 'Microsoft.IIS.PowerShell.Framework' or one of its dependencies. The system cannot find the file specified."
    Exception:Thrown: "Cannot find path 'C:\Users\jpacella\Documents\WindowsPowerShell\Modules' because it does not exist." (System.Management.Automation.ItemNotFoundException)
    A System.Management.Automation.ItemNotFoundException was thrown: "Cannot find path 'C:\Users\jpacella\Documents\WindowsPowerShell\Modules' because it does not exist."
    Exception:Thrown: "Process should have elevated status to access IIS configuration data." (System.InvalidOperationException)
    A System.InvalidOperationException was thrown: "Process should have elevated status to access IIS configuration data."
    Exception:Thrown: "Object reference not set to an instance of an object." (System.NullReferenceException)
    A System.NullReferenceException was thrown: "Object reference not set to an instance of an object."
    Exception:Thrown: "Cannot find drive. A drive with the name 'IIS' does not exist." (System.Management.Automation.DriveNotFoundException)
    A System.Management.Automation.DriveNotFoundException was thrown: "Cannot find drive. A drive with the name 'IIS' does not exist."
    Exception:Thrown: "" (System.Management.Automation.ParameterBindingException)
    A System.Management.Automation.ParameterBindingException was thrown: ""
    Exception:Thrown: "The pipeline has been stopped." (System.Management.Automation.PipelineStoppedException)
    A System.Management.Automation.PipelineStoppedException was thrown: "The pipeline has been stopped."
    Exception:Thrown: "A parameter cannot be found that matches parameter name 'physicalPath'." (System.Management.Automation.CmdletInvocationException)
    A System.Management.Automation.CmdletInvocationException was thrown: "A parameter cannot be found that matches parameter name 'physicalPath'."
    These are the two different ways I invoked the script
    PowerShell ps = PowerShell.Create();
    ps.AddCommand("New-Item")
    .AddParameter("Path", newPathName)
    .AddParameter("ItemType", "directory");
    ps.AddStatement().AddCommand("New-WebVirtualDirectory")
    .AddParameter("Site", Properties.Settings.Default.VirtualDirectoryPath)
    .AddParameter("Name", userName)
    .AddParameter("physicalPath", newPathName);
    ps.Invoke();
    and (scriptContents is a string holding the
    Runspace runspace = RunspaceFactory.CreateRunspace();
    runspace.Open();
    Pipeline pipeline = runspace.CreatePipeline();
    pipeline.Commands.AddScript(scriptContents);
    pipeline.Commands.Add("Out-String");
    Collection<PSObject> results = pipeline.Invoke();
    runspace.Close();

    I tried yet another way to make a Virtual Directory:
    public void CreateVirtualDirectory2(string userName, string password)
    string newPhysicalPathName = Path.Combine(Properties.Settings.Default.PhysicalPathForVirtualDirectory, userName);
    StringBuilder sb = new StringBuilder();
    if (Directory.Exists(newPhysicalPathName) == false)
    sb.AppendLine(@"md " + newPhysicalPathName);
    sb.AppendLine("cd iis:");
    sb.AppendLine("cd Sites");
    sb.AppendLine("cd ftp");
    sb.AppendLine(@"New-Item 'IIS:\Sites\ftp\bridgenet\" + userName + @"' -Type VirtualDirectory -physicalPath " + newPhysicalPathName);
    string script = VirtualDirectoryScript(sb.ToString());
    RunspaceInvoke invoker = new RunspaceInvoke();
    try
    invoker.Invoke(script);
    catch (Exception e)
    Console.ForegroundColor= ConsoleColor.Black;
    Console.BackgroundColor = ConsoleColor.Red;
    Console.WriteLine("ERROR: " + e.Message);
    Console.ResetColor();
    And the same exception occurs
    "A parameter cannot be found that matches parameter name 'physicalPath'."
    When I run the script outside of C#, there's no error.
    So no one's responded yet , which is pretty disappointing.

  • Running Outside Command

    I am trying to call the java.exe within my program to run other programs. I want to open up a command prompt box to do this. My system locks the way I have it now. Does anyone know how to get this to work? Here is the code I'm currently using:
    if(e.getSource() == runProgram)
                   log2.setText("");
                   Runtime rt = Runtime.getRuntime();
                   String[] callAndArgs = {"cmd.exe",
                   "cd C:\\Documents and Settings\\default\\My Documents\\",
                   "C:\\j2sdk1.4.1_01\\bin\\java.exe", "Hello"};
                   try {
                   Process child = rt.exec(callAndArgs);
                   BufferedReader in=new BufferedReader(new InputStreamReader(child.getErrorStream()));
                   String line="";
                   while((line=in.readLine())!=null)
                        error+="\n"+line;
                        log2.setText(error);
                   error = ("");
                   child.waitFor();
                   System.out.println("Process exit code is: " + child.exitValue());
                   catch(IOException b)
                   log2.setText("IOException starting process!");
                   catch(InterruptedException c)
                   log2.setText("Interrupted waiting for process!");
    Any help would be greatly appreciated.
    Thanks.

    Hi Steve,
    Assuming you haven't already read it, this article may be of assistance:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Also, there are a lot of postings to the "comp.lang.java.*" newsgroups hierarchy regarding this problem. Here are the results of a newsgroup archive search that I did:
    http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&threadm=36E9A2FB.1BA0%40ostecs.com&rnum=5&prev=/groups%3Fas_q%3Druntime%2520exec%2520NT%2520%26safe%3Dimages%26ie%3DUTF-8%26oe%3DUTF-8%26as_ugroup%3Dcomp.lang.java*%26lr%3Dlang_en%26hl%3Den
    Hope this helps you.
    Good Luck,
    Avi.

  • WLST - Failing to run nmConnect() command / node manager becomes unreachabl

    Hello guys,
    I'm facing some issues to setup some configurations of one application that I've deployed on weblogic 10.3.3.0.
    One of the needed steps in order to configure this applications is open the WLST in offline mode an run 2 commands:
    */bea/mytrack/wlserver_10.3/common/bin/wlst.sh*
    Then I try to connect in the nodemanager:
    * wls:/offline> nmConnect('admin30800','weblogic_password',port='30801',domainName='track30800')*
    The following error returns:
    Connecting to Node Manager ...
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "<iostream>", line 123, in nmConnect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'track30800' for user 'admin30800' denied
    I did some research and found this thread here: http://kr.forums.oracle.com/forums/thread.jspa?threadID=788163
    that solves the initial problem, however after I performed the nmConnect and a storeUserConfig() command, I exit() from the WLST and restart the node manager with success, the node manager becomes unreachable.
    I used the WL adm console and access -> appdomain -> environments -> machines -> monitoring -> node manager status to check the unreachable status.
    Thanks in advance,
    Davinod

    Nice it worked!!
    However when I try to start the servers controlled by this node manager I got this error:
    -sh-3.2$ <Jul 14, 2011 8:43:42 AM> <WARNING> <Exception while starting server 'track30800-01'>
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    Jul 14, 2011 8:43:42 AM weblogic.nodemanager.server.Handler handleStart
    WARNING: Exception while starting server 'track30800-01'
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    <Jul 14, 2011 8:43:42 AM CDT> <Error> <NodeManager> <BEA-300048> <Unable to start the server track30800-01 : Exception while starting server 'track30800-01'>
    Edited: Should I change the chmod for 777 for this file in order to check that all users have write permission?
    -rw-r--r-- 1 root iluser 193 Jun 24 11:05 boot.properties
    Did I miss a step?
    Thanks,
    Davinod
    Edited by: davinod on Jul 14, 2011 6:58 AM

  • Ways to run dir command in Process and get Output

    Hello,
    In one of the control in our web application, User can select any directory from his work area and can get list of directories and content of directories i.e. list of files. As working on file object is really slow so the performance is extremely poor. I am thinking of using Process object and run dir command for any directory selected by user and show the directory listing to user.
    Do you guys think it would be possible

    Its always good to work with IO buffer than low level file api. That should be irrelevant to the question as asked (if not then there might be other problems.)This is no way irrelevant but its a fact. Working with Java File api to traverse the content of the directory is really painful. Because we currently use file api to help user to traverse thru her work area.
    BTW, there are two servers. One running the app and the other have all users work areas. User can traverse the workareas content by using something \\server1\workarea1\user1\folder1 etc... in the app to see the content of any folder.A "server" in this context would be an "application" such as something like tomcat. Your client would then ask the "server" for information.
    In your case you are dealing with another file system via the windows remote file system access. So per my question it is not another "server".A server is what providing service to a client and in our case its a app server with a web app in it. The users use the web app to manage their work area(which is another file server).
    The app server and file server and physically two separate machines.
    So again, I am back to my first question, how can run dir command using Process object and get the buffer.
    Till now, I have done this
    ProcessBuilder pb = new ProcessBuilder("cmd", "dir", "c:/");
            pb.directory( new File("C:/temp")); // Or whatever directory you want for cwd
            Map<String,String> env = pb.environment();
            env.put("PATH", "C:/temp");
            try {
                 Process process = pb.start();
                   InputStream inStream = process.getInputStream();
                   new AsyncPipe(process.getErrorStream(), System.out).start();
                 new AsyncPipe(process.getInputStream(), System.out).start();
                 final int returnCode = process.waitFor();
                 System.out.println("Return code is " + returnCode);
                   System.out.println("\nExit value = " + inStream + "\n");
              } catch (Exception e) {
                   e.printStackTrace();
              }However it simply opens command prompt

  • Problem while running dos command from java program

    Dear friends,
    I need to terminate a running jar file from my java program which is running in the windows os.
    For that i have an dos command to find process id of java program and kill by using tskill command.
    Command to find process id is,
    wmic /output:ProcessList.txt process where "name='java.exe'" get commandline,processid
    This command gives the ProcessList.txt file and it contains the processid. I have to read this file to find the processid.
    when i execute this command in dos prompt, it gives the processid in the ProcessList.txt file. But when i execute the same command in java program it keeps running mode only.
    Code to run this command is,
    public class KillProcess {
         public static void main(String args[]) {
              KillProcess kProcess = new KillProcess();
              kProcess.getRunningProcess();
              kProcess = new KillProcess();
              kProcess.readProcessFile();
         public void getRunningProcess() {
              String cmd = "wmic /output:ProcessList.txt process where \"name='java.exe'\" get commandline,processid";
              try {
                   Runtime run = Runtime.getRuntime();
                   Process process = run.exec(cmd);
                   int i = process.waitFor();
                   String s = null;
                   if(i==0) {
                        BufferedReader stdInput = new BufferedReader(new
                               InputStreamReader(process.getInputStream()));
                        while ((s = stdInput.readLine()) != null) {
                         System.out.println("--> "+s);
                   } else {
                        BufferedReader stdError = new BufferedReader(new
                               InputStreamReader(process.getErrorStream()));
                        while ((s = stdError.readLine()) != null) {
                         System.out.println("====> "+ s);
                   System.out.println("Running process End....");
              } catch(Exception e) {
                   e.printStackTrace();
         public String readProcessFile() {
              System.out.println("Read Process File...");
              File file = null;
              FileInputStream fis = null;
              BufferedReader br = null;
              String pixieLoc = "";
              try {
                   file = new File("ProcessList.txt");
                   if (file.exists() && file.length() > 0) {
                        fis = new FileInputStream(file);
                        br = new BufferedReader(new InputStreamReader(fis, "UTF-16"));
                        String line;
                        while((line = br.readLine()) != null)  {
                             System.out.println(line);
                   } else {
                        System.out.println("No such file");
              } catch (Exception e) {
                   e.printStackTrace();
              return pixieLoc;
    }     when i remove the process.waitFor(), then while reading the ProcessList.txt file, it says "No such file".
    if i give process.waitFor(), then it's in running mode and program is not completed.
    Colud anyone please tell me how to handle this situation?
    or Is there anyother way to kill the one running process in windows from java program?
    Thanks in advance,
    Sathish

    Hi masijade,
    The modified code is,
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type)
            this.is = is;
            this.type = type;
        public void run()
            try
                InputStreamReader isr = new InputStreamReader(is, "UTF-16");
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    System.out.println(type + ">" + line);
                } catch (IOException ioe)
                    ioe.printStackTrace(); 
    public class GoodWindowsExec
        public static void main(String args[])
            try
                String osName = System.getProperty("os.name" );
                String[] cmd = new String[3];
                 if( osName.equals( "Windows 95" ) )
                    cmd[0] = "command.com" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                } else {
                    cmd[0] = "cmd.exe" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1]
                                   + " " + cmd[2]);
                Process proc = rt.exec(cmd);
                System.out.println("Executing.......");
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                          // any output?
              StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT");
                          // kick them off
                errorGobbler.start();
                outputGobbler.start();
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);       
            } catch (Throwable t)
                t.printStackTrace();
    }when i execute the above code, i got output as,
    Execing cmd.exe /C wmic process where "name='java.exe'" get commandline,processid
    and keeps in running mode only.
    If i execute the same command in dos prompt,
    CommandLine
    ProcessId
    java -classpath ./../lib/StartApp.jar;./../lib; com.abc.middle.startapp.StartAPP  2468
    If i modify the command as,
    cmd.exe /C wmic process where "name='java.exe'" get commandline,processid  > 123.txt
    and keeps in running mode only.
    If i open the file when program in running mode, no contents in that file.
    If i terminte the program and if i open the file, then i find the processid in that file.
    Can you help me to solve this issue?

  • How to run dos command in jsp

    hi all,
    i am running this command at command prompt
    like below
    java filename argument.
    ex: java validateuser user1
    it works fine at command prompt. and the same command i want to run in jsp
    so i tried like this
    Runtime x = Runtime.getRuntime().exec("java validateuser user1");
    whats happenning here is it just opening command promot of java.exe but its not running validateuser.
    any help will be greatly appreciated.
    advance thanks.

    why on earth are you trying to run java.exe on the command line through JSP?i think you misunderstand my question.
    i am not trying to run java.exe on through jsp.
    I am trying to run a validateuser user1 in jsp .
    Note:validateuser is a java file which take one argument.here in my scnerio user1 is the argument.

  • Run ssh command in labview

    does anyone knows how to run an ssh command in labview?
    I know how to run some linux commands in labview but my problem is when I try to run an ssh command ...
    thks
    JP

    Unfortunetly, I don't know how to script in a password for ssh. SSH closes the stdin and re-opens the tty that you are logged in at. This is actually a security feature. As well as a way to send stdin to remote programs (otherwise your password would get in the way.)
    If you don't need to ssh to a remote host, and you want to chmod something on the localhost, you could use sudo instead. With sudo you can specify certain users (or all users) to run certain commands. (so you could make a shell script to chmod for you).
    I don't know your exact needs, but I think that a public/private keypair could still work. In your authorized keys file on your "root" account, you can even specify that "this public key does not get shell access, and can only execu
    te this one command." This would probably be the most secure method. But it requires the user to have the correct private key as well.
    If you know that won't work for some reason, then maybe you could setup a inetd process that will execute a command whenever someone connects to a certain port (then you could use LabVIEW's TCP VIs).
    Or, if you are not connecting remotely, you could setuid your LabVIEW executable (A VERY BAD IDEA!).
    Also, it is possible to script "telnet." It would of course transmit your root password as plaintext, but trying to script your ssh session would also embed your password in your LabVIEW VI. Out internet toolkit for LabVIEW has some helpful telnet VIs.
    May I ask why you want to chmod something on a remote system that requires root? Sounds like maybe you should create a LabVIEW application on the remote side that acts as a daemon (running as root) and accepts connections and commands and does the chmodding for you.
    -Duffey

  • Running a command in Exchange Management Shell from Winexe

    The following works nicely when run from a dos prompt locally... 
    C:\Users\s-idauto>PowerShell.exe
    -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1';
    Connect-ExchangeServer -auto; New-MailboxExportRequest -Mailbox "my_testuser" -FilePath "\\deonetapp01\userarchive$\my_testuser.pst"
    but I want a version that I can run remotely from winexe, so I tried escaping quotes like 
    /usr/bin/winexe -U dallasray/administrator%somePassword //10.0.1.111
    "PowerShell.exe -command \". \'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1\'; Connect-ExchangeServer
    -auto;"
    but that yields an error of "ERROR: Cannot open control pipe - NT_STATUS_INVALID_PARAMETER"

    Hi Rich,
    Agree with others, "enable remoting on the Exchange server" provided by Johan Dahlbom means that you need run  Enable-PSRemoting -force
    in the exchange server you want to access remotely, then you can start a new session with New-PSSession on another server.
    And for the 'ConnectionURl', you can specify the ConnectionUri in the form of
    http://$servername/powershell, for more detailed information, please also refer to these articles:
    Learn How to Use PowerShell to Run Exchange Commands Remotely:
    https://blogs.technet.com/b/heyscriptingguy/archive/2012/01/23/learn-how-to-use-powershell-to-run-exchange-server-commands-remotely.aspx
    Single Seat Administration of Exchange 2010 using PowerShell Implicit Remoting:
    http://blogs.technet.com/b/ptsblog/archive/2011/09/02/single-seat-administration-of-exchange-2010-using-powershell-implicit-remoting.aspx
    I hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Connecting to remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentV

    I installed Exchange Server 2010 inside my VMWare Windows Server 2008 Ent R2. And After successful installation  when I try to open my Exchange Server Console, I am getting the following error message. I am very new to Exchange server please help me
    to solve this problem.
    Initialization Failed
    The following error occurred while searching for the on-premises Exchange server:
    [win-.local] Connecting to remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError
    $true -CurrentVersion 'Version 14.1 (Build 218.15)''.
    Thanks Vivek
    SharePoint Foundation 2010 Book
    http://www.redpipit.com

    Hi,
    Please have a look at the article below:
    Troubleshooting Exchange 2010 Management Tools startup issues
    http://blogs.technet.com/b/exchange/archive/2010/02/04/3409289.aspx
    Resolving WinRM errors and Exchange 2010 Management tools startup failures
    http://blogs.technet.com/b/exchange/archive/2010/12/07/3411644.aspx
    Besides, please run the cmdlet below:
     set-user alias -remotepowershellenabled$true
    Xiu Zhang
    TechNet Community Support

Maybe you are looking for

  • Should I use a SwingWorker or SwingUtilities.invokeLater() to update my UI?

    Are there specific situations where you want to use method above the other? This whole swing concurrency is very new to me, and I don't really know where to begin.

  • Needs a change in export to excel format

    Hi, i would like to know how to change the format (want columNs to be vertical and headings to be bold) of export to excel feauture Regards, CJK

  • Weblogic as a service

    i am having a problem when trying to run weblogic as a windows service. WLS 10.3.3 PFRD 11.1.1.3.0 set DOMAIN_NAME=AventaDomain set USERDOMAIN_HOME=C:\Oracle\MiddleWARE\USER_projects\domains\AventaDomain set SERVER_NAME=WLS_FORMS set WLS_USER=weblogi

  • Invoice Tolerance Check at Invoice Header Level

    Hi Experts, Can you advise on this query please? We would like to be able to check for this scenario. Where the Invoice exceeds the GR by 5% or $50 we want to have this invoice blocked so that it cannot be posted in MIRO. We want to stop the users po

  • HT4623 how can i update my ipod 1.1.5 to 2.0

    my ipod does not have ability to load apps as it is currently running 1.1.5, how can i upgrade to 2.0?