jscott
jscott

Reputation: 407

GUI Overlay over Powershell Script

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.

Upvotes: 2

Views: 1422

Answers (4)

Angshuman Agarwal
Angshuman Agarwal

Reputation: 4866

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]

Upvotes: 0

x0n
x0n

Reputation: 52480

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

Upvotes: 1

ravikanth
ravikanth

Reputation: 25820

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).

Upvotes: 2

David Brabant
David Brabant

Reputation: 43579

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

Upvotes: 3

Related Questions