Inserting commands
Inserting commands
In the Packaging PowerBench, you can use the commands known from DSM (see Alphabetical list of supported eScript commands), as well as the commands of the PackageDeployment module created in the PowerShell nomenclature.
If you have created a new package or opened an existing one, you will find the hierarchical command list in the left pane of the script window. There are now several ways to insert a command:
- You can click on the nodes of the lists and expand them. Then find the command you want and drag and drop it to the right place in the script window. The line drop marker shows you where the command will be inserted. Alternatively, use the "Insert Command" menu item from the command's context menu, which inserts the command at the active position in the script window.
- If you know the name of the command, you can also type some letters of the command in the "Search" field (it does not have to be the first letters) and after a short time all commands containing this search-string will appear. These can then be dragged back into the script window or inserted via the context menu. You can also quickly reset the search using the "x" icon in the search field. If you press [ENTER] after typing the search string, the search is saved in the drop-down list in the search field. This can be useful if you need to use a command in different places in a script more than once. However, the search history is discarded when you close the PPB.
- In the command list there is also the possibility to display a complete, alphabetically sorted list of all available commands by clicking on the icon, a search in the search field also limits the list of displayed commands in this view mode. If the command categories are displayed, you can also use the "Category" drop-down list to restrict the list of commands to be displayed.
You can use the icon to switch back to the hierarchical display. - Using the keyboard shortcuts "CTRL + [SPACEBAR]" and "[INSERT]" known from the DSM Packaging Workbench, you can also display a "Insert Command" dialog and transfer the desired command into the script.
When you have inserted a command, the dialog known from DSM for the respective command appears, in which you specify the properties and parameters for command execution. To make it easier for you to switch from DSM or to get started with the PPB, we have reproduced the DSM dialogs exactly, so that you should have no difficulties with filling out the dialogs and creating scripts.
Starting with version 3.0 of the PPB you can also create commands by dragging and dropping files into the script window. The following enumeration contains the list of commands that can be generated this way:
- Drag-and-Drop of Batch- (*.bat and *.cmd) and executable files (*.exe) creates command Start-ProgramAs
- Drag-and-Drop of Registry-files (*.reg, *.nir and *.regx) creates command Import-Registry
- Drag-and-Drop of Font-files (*.ttf, *.ttc, *.fon and *.otf) creates command Install-TTF
- Drag-and-Drop of configuration files (*.ini and *.cfg) creates command Merge-IniFile
- Drag-and-Drop of Script-files (*.ps1, *.vbs, *.js and *.pl) creates command Invoke-Script
- Drag-and-Drop of Windows Installer-files (*.msi) creates command Install-MsiProduct
- Drag-and-Drop of Windows Installer patches (*.msp) creates command Install-MsiPatch
- Drag-and-Drop of links (*.lnk and *.url) creates command Copy-File
- Drag-and-Drop of DLLs (*.dll) creates command Install-Assembly
- Drag-and-Drop of XML-files (*.xml) creates command Set-XmlNode
- Drag-and-Drop of more than one file or other file types as listed above creates command Install-FileList