Run an MSI with PSExec

Run an MSI with PSExec remotely is very simple, but most of the times people forget that we need to launc msiexec.exe in order to actually run the .msi.
In order to remotely run an MSI with PSExec, located in a share, you would need to run the following command:

So in the example above we have the following:

  • \\TargetComputer is obviously the remote machine where you want the MSI to run on.
  • -d can be avoided, but I like it as it won’t need to wait for the process to finish to keep using my cmd session. As per psexec’s help: Don’t wait for process to terminate (non-interactive).
  • -s: Run the remote process in the System account.
  • Cmd /c “command in quotes” will run a command prompt on the remote machine that will execute what’s contained in quotes “”.
  • msiexec.exe /I “\\Share\repository\mymsi.msi” /quiet /norestart will run the MSI. It first calls msiexec to run the MSI with /I option (normal installation). It then needs the package name (full path to the file in the share), this one is also in quotes in case it has spaces. /Quiet and /norestart are MSI dependent and it depends if the MSI has got these options or not.

If you have an MSI with no switches required and you want to wait for the process to terminate, run this:

Practical example (Install LAPS x64 remotely)

Let’s say you want to install LAPS on LAPSSRV01 and the application (MSI) is located here:
\\lapsdc01\LAPS_REPOSITORY$\LAPS.x64.msi

You will need to run the following:

Run an MSI with PSExec

This will install LAPS x64 on the target machine.

Read More

Lync 2013 silent install

Performing a Lync 2013 silent install isn’t as easy as it was with Lync 2010, especially if the application you’re trying to install was downloaded from the Volume License website.
I’m not sure if the issue I had trying to perform a Lync 2013 silent install applies to all version of Lync 2013. The problem I had was that after I created a customised MSP file (keep reading to see how to do that) and started the installation silently, Lync was not there! I could see it in Add/Remove Programs, but I couldn’t see it anywhere else. Not even when I searched in Start: this problem occurred on both Windows 7 and 8.1. Note that I’ve only tried with the 32bit version (also SP1) as that’s the one I need to deploy (also to machines running Windows x64).

After searching for a while I finally got to a download page on the Microsoft website:
http://www.microsoft.com/en-us/download/details.aspx?id=35554

Basically this file contains updated Office Customization Tool (OPAX/OPAL) files for Microsoft Office 2013.
Once you have downloaded the file, run it (it’s a self extractor .exe file) and choose the location where to extract the files.
Navigate to the location where you extracted those files and copy the admin folder in the root of the Lync 2013 installation folder and overwrite all existing files and folders.

Microsoft Office Customization Tool admin folder

Once you’ve done that, you’re good to re-create the MSP file for a customised Lync 2013 silent install. If you already have the old MSP file you created earlier with the original Lync 2013 installation, you must import it and save it back again.

If you’re here just to see how to create a Lync 2013 silent install MSP file, this is the moment :) .
Let’s suppose the content of the Lync 2013 installation is in C:\temp\Lync 2013\x86.

Run the following command (you can also do it in “Run”):

This will open up the tool that will allow us to customise the installation. You’ll be prompt to select the version of the application you want to customise and then you’ll be good to start using the Microsoft Office Customization Tool.

Microsoft_Office_Customization_Tool_Select_Lync_Installation

What I generally modify is the Organization name under Install location and organization name.

Microsoft_Office_Customization_Tool_OrganizationName

This is the most important part which will allow Lync to be installed silently. Firstly choose whether you’re going to use a KMS server or just type the product key in. Secondly, you want to accept the terms and conditions and finally select None as Display Level (or just make sure the Suppress modal is selected).

Microsoft_Office_Customization_Tool_KMS-AcceptTerms-Suppress

(more…)

Read More

Install Wake on LAN on a NAS

I have a couple of NAS boxes and I wanted to install a Wake on LAN application on one of them so that I could turn my devices connected to the LAN through one of them. The main reason why I wanted to do this is because my home router doesn’t support Wake on WAN (so it’s not able to translate the initial request and broadcast it).
Since the NAS is always connected to the network, I can use it to turn on my home computer for instance: that’ll allow me to turn it on only when I need it.

The NAS

In my specific case I decided to install it on a Iomega IX4-200D. I believe the procedure applies to other NAS devices with just little changes. The reason why I chose this NAS is because I do have a way to get the firmware back to it even when I replace all of the Hard Drives (as it happened once already!). I’ll look at writing a procedure for that whenever I have the chance.

Step by Step instructions to Install Wake on LAN on a NAS

I will try to be as much specific as possible. Be aware that I am not responsible in case you brick your own device.

  • Enable SSH if it’s still disabled. You can follow my article that describes how to enable SSH on an Iomega/Lenovo device.
  • Connect via SSH to the NAS box. On the link I posted above, it also tells you how to login on an Iomega device.
  • Backup /etc/ipkg.conf (if it exists).
    • You can backup this file using the following command:
  • Delete any existing entry in this file, or just remove the file itself by typing:
  • Add these lines one by one:

    • If you need to delete a line, press ESC (enter command mode), then select the line you want to delete with the arrow keys and then type dd.
    • Save the file by pressing ESC to enter command mode and type

      to exit and save the changes. If you want to exit and discard the changes, type :q!
    • If you need to return in insert mode press i followed by an Enter.
  • NAS boxes generally have an embedded OS which means they have a read only file system. So we have to use ipkg-opt to get rid of this. Run the commands below:

    • It might complain that the command isn’t recognised. In that case, try to type ipkg update.
    • Running ipkg update will give you the below result
      IX4-200D ipkg update
    • Run ipkg install ipkg-opt again
      IX4-200D ipkg install ipkg-opt
  • Run this:
  • Now backup ld.so.conf and then edit it in vi.
  • Append the line below.
    • /opt/lib/
  • Close the SSH connection. This step is very important. (more…)

Read More