There are a few posts here about using the command pane to do interesting things, but I didn't see anything that covered this use scenario:

If you have a bunch of Windows access agents and you'd like to silently pull a file down to and then install it, you can use the command pane with a combination of commands to get this done. If you use the checkbox to multi-select a bunch of agents, you can run this on many/all agents simultaneously.

This example downloads a file from Dropbox, puts it in C:\temp, and then runs a silent MSIEXEC install with logging to the C:\temp directory. The pathnames and URLs would be changed for whatever your purposes are.

If your remote endpoint has POWERSHELL 3, populate the command pane like this:

Also, keep in mind that when linking to a file on Dropbox, changing the final part of the URL from dl=0 to dl=1 will skip the landing page and give a direct link to the file (which is necessary for this to work).

I believe you helped me with this about 8 months ago and that may be what prompted you to write this post after we worked on it back then. First off, many thanks to you as you've saved me a ton of time and energy being able to download files onto remote machines and install things silently (90% of our organization is remote). I've been using your method for quite awhile now with great success.

Today I'm hoping you can assist with taking this process a couple steps further. I need to install an msi that references a transformer file as an administrator (while still doing it all quietly). I know UAC and privileges can get in the way of this but I've seen that a Powershell script executed with "@powershell -NoProfile -ExecutionPolicy Bypass C:\temp\install.ps1" in the command pane should work. I've been toying with this method for some time but to no avail.

If you can help out at all with this it would be greatly appreciated. Thanks again for all your help!

Glad to hear that the instructions above have been working for you well! You indeed were the reason I wrote this article in the first place!

Here's my advice on using a transform file with your MSI installer.

First, use a second Invoke-WebRequest command to pull the MST file down into the temp directory with the MSI file.

Next, issue the MSIEXEC command like this to include the transformer file:msiexec /i C:\temp\nameofinstaller.msi /qn /l*v C:\temp\installfail.log TRANSFORMS=c:\temp\nameoftransformer.mst

I expect this would work for your situation unless there's some variable I haven't taken into consideration. I'm curious to know the results!

Best regards,Will

Hey Will,

The files are getting downloaded onto the machine correctly but I get an error in the command pane: "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package."

I spoke with the vendor and they gave me a BAT file to run that will do the install, the problem is it needs to be run as an administrator. Do you know how to do that? I tried making a shortcut and setting that to run as an administrator but no dice still. I'm guessing a powershell script will need to be run to do it.

This portion of the msiexec command tells it to write a log during installation:

/L*V C:\temp\installfail.log

This sounds like an issue with the MSI itself. Can you paste the contents of that logfile here? It may shed some light on what's going on. You may want to run an MD5/SHA256 checksum against the MSI that you know is good vs the MSI that you're downloading to those remote machines, to make sure the downloaded one is not getting corrupted somewhere along the way.

every command run thru the commands feature is run elevated (as admin). it is NOT run in the user context, though, and some applications (like dropbox) require running in the user context as well. runas can get around this problem.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.