If you have multiple scripts in a folder and they all package to bin, this usually poses no problem as long as the base name is not identical. Subfolders for individual platforms will be created based on the scripting engine chosen-and, as with PowerShell 7-folders named with the base name of the application. The Folder is the top-level output folder where the packaged application is placed. exe is appended during the packaging process. Please note that you do not need and should not add an extension to the name. It will default to the base name of the script to be packaged, so DriveSpace. The File name field is probably self-explanatory this defines the name of the executable file produced. We will start with the Output settings group. Most settings on this page have a reasonable default we will address each setting and its alternatives. Select the code in the script editor and right-click.In this installment of our Script Packaging series, we explore the Output Settings. If you find yourself using my ShowHelp technique, you may want to save it as a snippet in PowerShell Studio to save some yourself from typing next time. Ultimately, it depends on what you find easier to work with. I could have set ToolTip help in each _MouseHover event handler, but personally I find my ShowHelp scritpblock easier to use because I can define all the help strings in one location. However, I would have had to wait until the final script was created to make the change. $txtComputername.add_MouseHover($ShowHelp) In my final PowerShell script, this is what the code looks like: $txtComputername.add_MouseHover($txtComputername_MouseHover)Īs an alternative, I could modify the event to call ShowHelp directly. If I had not used the & operator, my ShowHelp scriptblock would not have run. Hovering over any of my controls with defined help should show the tooltip. Exporting the project to a PowerShell script file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |