Eome Posted January 26, 2007 Report Share Posted January 26, 2007 Hi ! Thanks for theses gagdets ! I have a question about theses cmdlets How is it possible to run a powergadget without blocking powershell command line ? Hope you can help me to anderstand Eome Quote Link to comment Share on other sites More sharing options...
marco.shaw Posted January 26, 2007 Report Share Posted January 26, 2007 Running the cmdlets won't block the PSH command line until the proper libraries are loaded and calculations are done, which can be just a few seconds. When running one of the graphical cmdlets, a PowerGadgets.Presenter.exe process will start up to handle the graphics and any continuous/refresh requirements will be handled by external processes to PSH. In other words, you get you command-line back withing seconds... Quote Link to comment Share on other sites More sharing options...
IGSFX Posted January 26, 2007 Report Share Posted January 26, 2007 Executing any of our cmdlets does not block PowerShell by default. There is one option in which PowerShell is blocked until you close the gadget, which is when you execute the cmdlet with the -modal option. In that case, the chart/gauge/map is shown in a modal window, which blocks PSH until you close it; there are a few circumstances in which you may want to show the gadget in modal way, but it is not the default behavior. Can you please elaborate on how you are running your cmdlets? IvanG Quote Link to comment Share on other sites More sharing options...
Eome Posted January 26, 2007 Author Report Share Posted January 26, 2007 I use my widget with this command line : ps> get-process explorer | my_widget ps> This command shows a window with information about the process in the pipe. In my c# code, i create a pipeline and execute a $form.showmodal() in it. (I added the variable $form with SetVariable) Powershell command line is not blocked but my widget doesn't work very good : There is a timer which refresh my gadget but it seems the event for the timer doesn't work. Can you help me to anderstand ? Powergadgets create a process to host gadgets ? How it works ? Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 26, 2007 Report Share Posted January 26, 2007 Yes, we create a separate process to host our gadgets. JuanC Quote Link to comment Share on other sites More sharing options...
Eome Posted January 27, 2007 Author Report Share Posted January 27, 2007 So, when powergadgets are installed, there is an executable dedicated which will be the host for gadgets ? Quote Link to comment Share on other sites More sharing options...
IGSFX Posted January 27, 2007 Report Share Posted January 27, 2007 The PowerGadgets architecture is much more complex than that. We have a large number of executables and processes interacting with each other and with the system resources. Explaining those interactions in a few lines would be almost impossible and would also reveal parts of our technology which we are not allowed to. I am sorry we can't be any more specific on this issue. On the other hand, if you elaborate on the type of widgets/gadgets you are creating, perhaps we can help you achieve them through the use of any of our PowerGadgets cmdlets. That would give you the advantage of using all the features we have implemented in PowerGadgets through thousands and thousands of man-hour in research and development. Regards Ivan GiugniProduct ManagerPowerGadgets Quote Link to comment Share on other sites More sharing options...
Eome Posted January 27, 2007 Author Report Share Posted January 27, 2007 Thank you for your responses, i am too curious Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.