![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Integrating Powershell and C# 2.0 Hi, I wrote a simple mock application that'll make some automated calls to com objects. using System.Management.Automation; namespace PWSApp { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { RunspaceInvoke rsi = new RunspaceInvoke(); rsi.Invoke("$WMP = new-object -ComObject WMPlayer.OCX"); rsi.Invoke("$WMP.openPlayer(\"SongName.mp3\");"); } } } My Question here is, What all should I ship with this executable (apart from .NET Framework 2.0) so that I can ensure that this application works on all machines. Is there any specific dll that should be distributed so that PowerShell specific features will work? Or is this bundled with .NET Framework 2.0? Regards, Mugunth |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Integrating Powershell and C# 2.0 "Mugunth" wrote: > What all should I ship with this executable (apart from .NET Framework > 2.0) so that I can ensure that this application works on all machines. > Is there any specific dll that should be distributed so that PowerShell > specific features will work? Or is this bundled with .NET Framework > 2.0? AFAIK PoSh will be released as an optional Windows Update later this year. Once all your machines have been updated and .NET Framework 2.0 is installed, everything should be fine. Copying only the core PoSh assemblies (System.Management.Automation etc.) might work (I did not test it), but I doubt that this is recommended or supported. -- greetings dreeschkind |
My System Specs![]() |
| | #3 (permalink) |
| Guest | RE: Integrating Powershell and C# 2.0 > What all should I ship with this executable (apart from .NET Framework > 2.0) so that I can ensure that this application works on all machines. > Is there any specific dll that should be distributed so that PowerShell > specific features will work? Or is this bundled with .NET Framework > 2.0? Let the PowerShell WU (windows update) install the necessary DLLs to the GAC. Consider using the System.Activator class to late-bind to the PowerShell types, and provide a nice error message to the user if PowerShell isn't installed. Andrew |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| yahoo not integrating in windows mail help please!!!!! | Ryan | Vista mail | 2 | 08-18-2008 05:53 PM |
| integrating VBS into macro | ayeFayze | VB Script | 0 | 06-04-2008 03:34 PM |
| Integrating SP1 into Vista DVD? | Brian W | Vista General | 3 | 12-12-2007 03:53 PM |
| LABS: Writing PowerShell cmdlets and integrating with MMC | Marco Shaw | PowerShell | 0 | 06-21-2007 06:51 AM |
| Integrating English Speech recognition? | Pim | Vista General | 3 | 03-07-2007 06:31 PM |