Thread: I thought Powershell was MTA (V2 of PS and V2 of this post) in
microsoft.public.windows.powershell
Started 1 month, 1 week ago by CodeSlinger
Sorry if this doubles posts but the Windows Vista x64 forum is not working
properly so am posting here directly.
I have an application that hosts Powershell and supplies the PSHost.
PSHostUserInterface and PSHostRawUserInterface interfaces and my write
routines are all reentrant and my app is MTA. When I run the below script,...
Hi Dave,
AFAIK (haven't played with it yet), Posh is STA only, to support MTA, you
will need to use jobs for that (Posh v2 only)
Easiest way to confirm that is to play with FileSystemWatcher.
Martin
"CodeSlinger" <CodeSlinger@discussions.microsoft.com> wrote in message
news:64BD25C6-467F-4544-B657-F51FC7ED2D93@microso ft.com...
OK I figured it out.
Instead of hard waiting on a ManualResetEvent which locks up the script main
thread, I have my application create a plain old ordinary event, put that in
a session variable when I create the Runspace and then have my script do
Register-ObjectEvent for THAT event and a wait-event for that event. Works
...
By default with version 2, powershell.exe runs in STA mode, you can very
easily start it in MTA by passing the flag "-mta" to powershell.exe when
starting it. powershell_ise.exe runs exclusively in MTA though.
Marco
"Martin Zugec" <martin.zugec@gmail.com> wrote in message
news:8E02466D-E3D9-4342-8A72-5B74EB9BB6E8@...
That's really weird. V1 apparently did the opposite on both accounts from
what I've read and I had not read that before about V2 running a different
apartment model. I'll have to test and make sure I'm still working in MTA
mode since I require V2 but should be OK since I design for MTA in the first
place. I had not actually dumped the ...
Actually to be clear, you can't put the actual event in the session. I know,
I tried. I actually put an object and the event is a public member. - Dave
"CodeSlinger" wrote:
> OK I figured it out.
>
> Instead of hard waiting on a ManualResetEvent which locks up the script main
> thread, I have my application create a...
Oisin (x0n) Grehan [MVP] replied 1 month, 1 week ago
On Nov 15, 8:33 pm, "Marco Shaw [MVP]" <marco.shaw@NO_SPAMgmail.com>
wrote:
> By default with version 2, powershell.exe runs in STA mode, you can very
> easily start it in MTA by passing the flag "-mta" to powershell.exe when
> starting it. powershell_ise.exe runs exclusively in MTA though.
>
> Marco
>
> "Martin Zugec" ...
Actually to be clear, you can't put the actual event in the session. I know, I tried. I actually put an object and the event is a public member. - Dave "CodeSlinger" wrote: > OK I figured it out. > > Instead of hard waiting on a ManualResetEvent which locks up the script main > thread, I have my application create a plain old ordinary event, put that in > a session variable...
Hi Dave, AFAIK (haven't played with it yet), Posh is STA only, to support MTA, you will need to use jobs for that (Posh v2 only) Easiest way to confirm that is to play with FileSystemWatcher. Martin "CodeSlinger" <CodeSlinger@discussions.microsoft.com> wrote in message news:64BD25C6-467F-4544-B657-F51FC7ED2D93@microsoft.com... > Sorry if this doubles posts but the Windows Vista x64 forum...
On Nov 15, 8:33?pm, "Marco Shaw [MVP]" <marco.shaw@NO_SPAMgmail.com> wrote: > By default with version 2, powershell.exe runs in STA mode, you can very > easily start it in MTA by passing the flag "-mta" to powershell.exe when > starting it. ?powershell_ise.exe runs exclusively in MTA though. > > Marco > > "Martin...
By default with version 2, powershell.exe runs in STA mode, you can very easily start it in MTA by passing the flag "-mta" to powershell.exe when starting it. powershell_ise.exe runs exclusively in MTA though. Marco "Martin Zugec" <martin.zugec@gmail.com> wrote in message news:8E02466D-E3D9-4342-8A72-5B74EB9BB6E8@microsoft.com... > Hi Dave, > > AFAIK...
Related threads on "Discussions in microsoft.public.windows.powershell":
Beading edge.. #Powershell V2 RC adds c:\PS> to... Beading edge.. #Powershell V2 RC adds c:\PS> to any .Example in comment based help. Now all mine read "c:\PS>PS >"... now to script my fix 9:20 AM Oct 18th from Seesmic
RT @ jsnover @ oising key feedback for PS V2 on XP... RT @ jsnover @ oising key feedback for PS V2 on XP would be remoting interop with other Vista and W7. Stacks are different. #PowerShell
1:35 PM Sep 28th
from Tweetie
Thread profile page for "I thought Powershell was MTA (V2 of PS and V2 of this post) in
microsoft.public.windows.powershell" on http://www.microsoft.com/communities/newsgroups....
This report page is a snippet summary view from a single thread "I thought Powershell was MTA (V2 of PS and V2 of this post) in
microsoft.public.windows.powershell", located on the Message Board at http://www.microsoft.com/communities/newsgroups....
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity