I’d like to expand on a new feature in the PDQ Deploy Pro 1.2 beta that I touched on last week. Commands are a new type of installer action that allow for running a command on a target computer without having to specify a source file. In prior versions of PDQ Deploy Pro you would need to create a batch file with the command and use it as the installer file. Command actions provide the same capability without having to create the batch file, so they are easier to work with.
There are are two main uses for the command action. First is to run a command that is built-in on the target computer and the other is to run installers that are located on file shares without requiring that they be copied to the target first. I’ll go over each use case with a simple example.
There are a number of reasons you might want to run a built-in command on a target computer, and a good example of one is the gpupdate command. This command can be run after a change to a GPO if you want to apply the changes immediately. Using PDQ Deploy Pro commands it’s very simple.
First, create a new installer and click “Add Action”. Pick the “Command” type for the new Action.
In the new action enter “gpupdate /force” as the command to run.
Now you have an installer which will simply update the GPOs on the target computers. After making a GPO change deploy this new installer to the computers to force an update. It can even be made to run on a repeating schedule if you have problems with computers not getting GPO updates in a timely fashion.
Some installers are very large and make more sense to run off of a network share than be copied to the target computer and executed. These types of installers typically only install a subset of what is in the installer file so it’s just wasted bandwidth to copy the whole file to the target. Microsoft Office administrative installs are an example of this type of installer.
To install from a network share create an installer as in the above example and put in the full path to the installer file using a UNC file name and any parameters.
Make sure to always use UNC path names. Drive letter mappings won’t be available as they are specific to individual user profiles and although the install will run as the user selected for the PDQ Deploy Pro server service, its profile will not be fully loaded and drive mappings will not be created.
There is a third use for Command Actions which is just a version of the built-in commands above but can use a special mention. It is to run commands before or after a normal Package installer to either set up the environment or to clean-up afterwords. Examples might include creating registry entries, copying files to special locations, creating shortcuts, or clearing out temporary files.