Windows Vista Forums

AllocConsole() with PowerShell ISE?
  1. #1


    Uncle Rico Guest

    AllocConsole() with PowerShell ISE?

    I have a windows app that initially does not use a console.



    A user can ask to see the console to view log messages of what the app is
    doing.

    We use AllocConsole() for this and it uses the cmd.exe console.

    Is there a way to use the PowerShell ISE instead of cmd.exe?

      My System SpecsSystem Spec

  2. #2


    Uncle Rico Guest

    Re: AllocConsole() with PowerShell ISE?



    "Marco Shaw [MVP]" wrote:

    > You're looking to print out all your log messages to the ISE? Why the
    > ISE vs using the PowerShell console? Still even with the console, you
    > may want to swap that out with building your own custom PowerShell host.
    I like how the ISE works compared to cmd.exe...

    - Copy for ISE is Ctrl-C
    - Copy for cmd.exe it is Ctrl-space,E,K,select text,Ctrl-space,enter

    Selecting multi-line text works in ISE, in cmd.exe it only selects in screen
    space which makes multi-line selection almost impossible.

    ISE is resizeable by dragging the window edges, cmd.exe is not.

    cmd.exe runs out of buffer memory unless you change the properties to max
    memory, ISE doesn't appear to have the same problem.

    If PowerShell is the future replacement for the DOS Prompt, then it should
    have an equivalent to the AllocConsole() command. I just want to know if that
    command exists or if it is planned.



      My System SpecsSystem Spec

  3. #3


    Josh Einstein Guest

    Re: AllocConsole() with PowerShell ISE?

    AllocConsole has nothing to do with cmd.exe/DOS. A console is just a type of
    UI optimized for text. Where you're using AllocConsole, you would probably
    have no use for PowerShell ISE unless you are automating PowerShell.

    Having said all that, the editor/output window used by PowerShell ISE is a
    pre-released version of the new componentized text editor that will ship
    with Visual Studio 2010. You will be able to host this editor in your
    application. It's based on WPF though so performance-wise it won't really
    match the Windows' console in terms of text buffer handling.

    Josh

    "Uncle Rico" <UncleRico@xxxxxx> wrote in message
    news:686C34F2-F48D-486E-B404-4D2B4B7EB939@xxxxxx

    >
    >
    > "Marco Shaw [MVP]" wrote:

    >> You're looking to print out all your log messages to the ISE? Why the
    >> ISE vs using the PowerShell console? Still even with the console, you
    >> may want to swap that out with building your own custom PowerShell host.
    >
    > I like how the ISE works compared to cmd.exe...
    >
    > - Copy for ISE is Ctrl-C
    > - Copy for cmd.exe it is Ctrl-space,E,K,select text,Ctrl-space,enter
    >
    > Selecting multi-line text works in ISE, in cmd.exe it only selects in
    > screen
    > space which makes multi-line selection almost impossible.
    >
    > ISE is resizeable by dragging the window edges, cmd.exe is not.
    >
    > cmd.exe runs out of buffer memory unless you change the properties to max
    > memory, ISE doesn't appear to have the same problem.
    >
    > If PowerShell is the future replacement for the DOS Prompt, then it should
    > have an equivalent to the AllocConsole() command. I just want to know if
    > that
    > command exists or if it is planned.
    >
    >

      My System SpecsSystem Spec

AllocConsole() with PowerShell ISE? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing PowerShell dependent features on W2K8 with PowerShell CTP Greg Wojan PowerShell 14 16 May 2008
when run powershell script as windows service ,powershell fail powershell fail on winodws 2008 PowerShell 6 15 Jan 2008
Powershell Plus - Free for non commercial Use and Powershell Analyzer1.0 released Karl Prosser[MVP] PowerShell 2 12 Dec 2007
Automatic PowerShell Error Parsing in PowerShell Analyzer and PowerShellPlus Karl Prosser[MVP] PowerShell 0 14 Nov 2007
PowerShell Leaders Join Forces and offer a pre-release version of PowerShell for 50% off the retail value klumsy@xtra.co.nz PowerShell 0 19 Jun 2007