Remotely installing msi on different windows nodes? - windows

I have an MSI I want to occasionally install on remote windows nodes in my cluster. What is the easiest and least overhead way of doing this?
I've looked into chef, but it seems like I need an entire server just to manage different nodes.

Chef's windows_package resource is used to install MSIs. If you're on a very old version you might need the windows cookbook for it, but we pulled MSI support in maybe ~12.0 I think? Check the release notes if you have to be certain, but anything remotely recent has it in core.

Related

Is there a "best" way to forcibly "uninstall" a product when the MSI fails during uninstall?

My install fails on uninstall because of a bug in my CustomAction. I've fixed the bug, but I now have a test machine with that product installed and I can't get it to uninstall (keeps rolling back and staying).
In the past (years ago), I used msizap.exe that comes with the Windows SDK. But it doesn't seem to come with it anymore. I installed it and can't find it. My only guess is that it's no longer relevant in Windows 10.
Anyway, is there a best way to forcibly remove the product so that Windows no longer thinks it's installed?
msizap.exe: You are correct, msizap.exe has been deprecated long ago.
Broken Uninstall Workarounds: This problem is very common. You can find a list of approaches for these kind of uninstall problems here.
The easiest and fastest is probably to just use the Microsoft FixIt tool to remove the package. This basically "unregisters it" by the looks of it, and is similar to msizap.exe in that regard.
If this is just a single machine you can hack the cached installation database using Orca (how to find cached msi path, powershell version, using Windows Explorer - point 2) - if it involves many machines you should make a patch. Please see details in link above.
Virtual Machines: It is obvious, but just to mention that you should check setups on virtual machines so you can just revert the virtual machine when you encounter "development and QA bugs" like these.
Custom Action Flag: You can also add a condition to each custom action so that you can disable the whole custom action from running by a custom command line sent to msiexec.exe.
If your flag is a property RUNCA="1", then you can disable it by setting this flag property to 0 via the command line - this is sort of a little inoculation for the package's uninstall feature breaking - you can disable custom actions from running at all during install / uninstall - it might even be useful for your tech-support guys and real-world installations:
msiexec.exe /x {PRODUCT-CODE} RUNCA=0

How to install puppet agent in a large scale of nodes?

What can be a better approach to install PE4 agents in a large scale(500+) machines? These machines are all windows VMs, not residing on any clouds.
It is really a tough task to login to each machine and install manually.
What was already provided in the comments as far as orchestration tools.
You can also use WMIRemote, PSExec or PowerShell Remoting to perform the installs. For the installs, you could also use Chocolatey.

Is opscode chef the right solution for my task?

I have a network with 10+ Windows boxes. I need to be able to automatically reconfigure them all in the certain way:
Install Java SE Development Kit 7u79
Set up startup script .bat on all clients (Win boxes).
Set up script .bat to perform each 6 hours or at 03:00 every day.
Install FF v.30-40 in folder C:/firefox/official/ff-v.X, where X is the version
I have Ubuntu 14.04 as a server: 192.168.122.100. Win boxes are 192.168.122.150-160. All required exe, msi will be located at 192.168.122.100/files/win/
The question: Is opscode chef the right solution to achieve the result or should I consider other ways?
PS: I don't have an experience as administrator and I don't have time to investigate all of the approaches myself. Currently I'm working to set up this system myself, but I still not sure if this is right investment of time in my case.
Well, Chef can do all of the task you've listed above.
For installing JDK 7 just use windows_package resource (important: remember to download cookbook windows from Chef Supermarket. It looks like this:
windows_package name do
source src
action :install
installer_type :custom
end
And remember, that - on Windows systems - variable name should be actual name of package. You can check names in Control Panel (for example, JDK 7.79 has name Java SE Development Kit 7 Update 79).
Firefox can be installed in the same manner.
Setting batch scripts can be done in multiple ways - creating them with template resource and just execute them with another resource (powershell_script or execute). You can also implement built-in batch files as batch resource.
Always try to find implemented cookbook for your tasks - in Supermarket. If there aren't any you are looking for, you have to write your own cookbook. Since you are not asking for this, I won't write here any long tutorial, but instead will just redirect to Chef Docs.
Chef can download resources from server, so this is not a problem.
In the Internet you have also many tutorials of setting server-client Chef, but I would recommend you testing your cookbook with chef-client in --local mode first -in this mode you do not need to have any server running.
Learning Chef isn't easy nor hard - it all depends on quality of tutorial and - to be honest - many of them are just... Hard-to-understand-written. Setting environment with automatic tool is always nice idea, but you have to think if you really need this - if writting cookbook will give you many free hours in reinstalling Windows, it is for sure worth it.
Let me know if you need more informations.

How to build and install spark in an offline environment?

I am trying to install Spark 1.3.1 in an offline clusters (No Internet at all, only Lan). However, I don't know how to build it from source code since either via maven or sbt requires network connection. Can someone offer some help or possible solutions?
Thanks.
A simply (albiet somewhat hacky) solution would be to build it on a machine with internet access and then copy all of the items in ~/.ivy2 over to the machine with only lan access so that it can access the cached items. Another, perhaps simpler, option would be to use a pre-built Spark is thats an acceptable solution.

How to create an installer out of an installer?

I have an old legacy application around for which I only have the installer. it doesn't do anything more than uncompress and register itself and his library's.
As i don't have the source-code it gives me a lot of headaches in maintenance problems. In some particular computers (Acer Aspire One with Windows) just do not run.
I would like to extract the files and re-create this installer with NSIS. Is this possible or I'm nuts?
The original installer has been created with Ghost Installer Studio.
One option is to find a machine that it does run on, and then install some "install guard" software (often called things like Acme Uninstaller). Use this to track what actually gets installed and then copy the relevant files and write your own.
It looks like a lot of hassle to me, and you may be on thin ice with regards to the licence.
You could try using a program that monitors new files being installed and then get the files that were installed from their respective paths.
For instance, I found this in about 10 seconds with Google, there are more programs like it, but I am inexperienced with those available for Windows.
If it uses a MSI file, you can use Orca or SuperOrca to get at the stuff packed inside.
This is typically the job of Repackaging Software. There are a few ways such tools work but typically it is by taking a look at a system before and after you install it on a clean system and building a custom installer from the detected changes. This is normally done to generate a customized installation and/or one that can be automated in its deployment. I'm not aware of one that generates an NSIS package, the standard format today is MSI (Windows Installer).
If you have the original installer any repackager will do, but even without the original setup program you can do as some of the others here suggest and monitor the use of the application for its requirements. The two most popular repackaging tools are InstallShield AdminStudio and Wise Package Studio. The feature may also be part of a setup authoring solution, so check with your in-house developers if you can.
A full list of repackaging tools can be found here at AppDeploy.com
One free repackaging tool available for creating Windows Installer setups from another [legacy] setup tool (with which I must divulge I'm involved) is the AppDeploy Repackager. Another free repackager is WinINSTALL LE.

Resources