2

I need to create a GUI overlay that will provide status information to users while an install is taking place. The install happens through Powershell scripts. I would rather not rewrite the functionality that is already taking place in the scripts.

Are there any practical methods I can use to overlay a GUI over the scripts? I am thinking of something along the lines of an application installer that just calls the scripts and displays information about the status.

4

4 回答 4

3

You can run PowerShell scripts from CSharp and interact with the PS runspace.

于 2012-05-29T13:42:53.573 回答
2

You can always wrap up these scripts in WinForms (PrimalForms Community Edition to design the UI) within PowerShell or use something like ShowUI (showui.codeplex.com).

于 2012-05-29T14:09:30.630 回答
1

Anything particularly wrong with using Write-Progress calls in your scripts?

于 2012-05-29T15:43:25.820 回答
0

I recently wrote an install cum config tool and this is what I did to run the PS scripts asynchronously from C#/Winforms - https://stackoverflow.com/a/10741061/763026 [Full code is there]

于 2012-05-29T15:50:30.343 回答