Using SCCM 2012 Application Model to Install PsExec
Receive notification right in your inbox whenever new content like this is released & sign up for our email list!
We’ll send you the latest updates, how-to’s, and solutions to empower you at every endpoint.
I do a lot of testing with PsExec because I need this tool to simulate exactly how System Center 2012 Configuration Manager (CM12) and CM07 install/run applications. Recently, while I was doing some testing, I needed to run PsExec on one of my new servers, but I noticed that it was not installed. In order to install PsExec, I wanted to use CM12’s application model, but PsExec does NOT have an MSI file to install. It simply has a .exe file in a zip file. In lieu of an MSI file, I created a script installation application for PsExec.
If you’re ever in a similar situation, follow these steps:
First, create a registry key to use with your detection method.
Then create a batch file to install PsExec and place it with the unzipped source files.
copy %~dps0*.* %windir%system32
regedit /s psexec.reg
regedit /s ES_Flag.reg
Now, in the CM12 console, click on the Create Application button in the Software Library node.
Select the “Manually specify the application information” option. Click on Next.
Fill in the details about your application and click on Next.
Fill in the details in this dialogue box and then click on Next.
Select Script Installer and then click on Next.
Enter the source location and the batch file information and then click on Next.
Click Add Clause….
Change the Setting Type to Registry and select the registry key. In my case, in order to test the full functionality, I also enabled, “This registry setting must satisfy the following rule to indicate the presence of this application,” and used “Equals” with Operator and typed in “Installed” for Value. Next, click OK and then click on Next.
Change the options as required and click on Summary.
Click on Next.
Click on Summary.
Click on Next and then click on Close.
That’s all there is to it and PsExec should install shortly. Treat this application script just as you would any other application deployment. I assigned this to my All Desktop and Server Clients collection.
Afterward, I started thinking about how else this script installation application could be used, for example with BgInfo!
If you have any questions about this blog post, please feel free to leave a note in the comment section below. Or, you can send an email to Techtalk or contact me on Twitter @GarthMJ.