What kind of Tools Exist for Setup Automation in Windows? - windows

I'm looking for some type of solution for getting a window dev environment up and running quickly.
Currently we have a large setup document (50+ pages) for doing an install, and I'd like to automate this process as much as possible. The doc includes things like updating environment variables, installing programs, downloading source code, etc.
I know that the majority of these tasks can be done with a batch script, but that's kind of ugly and a lot of work. And while virtualization would be nice, it is not an option for us.
I'm wondering if anything exists for Windows that would make this less tedious. Something like Ruby's Chef would be great. Does anything like this exist for windows?

Well there is Pkgmgr.exe for unattended installation of windows components if you mix it with a powershell script you should be able to get what you want but it wont be as easy as using Chef. Check here for an example of what you can do with Pkgmgr.exe http://learn.iis.net/page.aspx/133/using-unattended-setup-to-install-iis-70/

System Center is the Microsoft way of pushing out standard desktops. It's quite heavyweight mind you.

You could use VMWare for this. Just create a base machine image, with the necessary stuff installed, and point people at the VM.

Related

Finding PowerShell Cmdlets equivalent to GUI actions

I would like to know where I could find good resources/documentation on configuring a new Windows10 installation using Powershell scripts. I know bash but I'm completely new to Powershell.
When I search google, all I can find about automatically configuring Windows relates to Windows Deployment Services. But I don't have and don't want a Windows Server and simply running a few scripts after each installation is sufficient for me.
I found a few scripts that solve some of the things I want to do:
https://github.com/FlatlanderWoman/winCleaner
https://github.com/hahndorf/Set-Privacy
But for everything else, when I look into the TechNet Library I find it very hard to find anything useful. And when I do find something, it looks outdated:
https://technet.microsoft.com/en-us/library/hh852115.aspx
The problem is: I known the GUI-way of configuring everything I want, but I don't know how to find the corresponding commandlets to do the same with Powershell.
Is there some kind of event listener I could use to find the Cmdlets? Or does anyone have some resources/documentation to recommend? Is the TechNet Library really the established way to find these commands?
Thank you.
Unfortunately PowerShell was only really implemented in Windows 7 (yes I know it was available for XP but not preinstalled) and even then it was kind of like an addon rather than part of the core OS. Windows 8 and 10 have further improved functionality but still for the most part do not use it for their own settings and functions as most home users would have no use for it.
However there is nearly always a way to do whatever you need to, I have a script that configures servers from scratch, renaming the server, installing requisite software and features, copying files, configuring VSS, right down to putting the Computer icon on the desktop. You just have to make a list of everything you want to do, then Google each one.
For example: https://www.google.co.uk/search?q=powershell+put+computer+on+desktop - at time of writing the first result is a TechNet script pointing at a registry key. Tidy as necessary, whack into your build script and move on to the next item.
As of yet there's nothing I've found I've been unable to do with PowerShell, but the vast majority of it has not been directly with cmdlets. There's a lot of registry tweaking and command line stuff like msiexec or schtasks, some COM objects and an awkward Type I had to create and use to set the DNS suffix.
Overall I think it's still easier to do all this in PowerShell than any other scripting language and it's more flexible than premade tools, not because it has so much functionality built-in but because it can access .NET and COM which gives you broad access to all the half-baked stuff MS have wedged in over the years.

Zero deployment CouchDB embedded in a Windows app?

I'm probably dreaming here, but am wondering if there's any possibility of completely embedding a minimal CouchDB engine within a Windows application, such that the app can be run without requiring installation (of CouchDB/Erlang) on the user's computer.
I already provide this slimmed down / bundled ability - check here https://github.com/dch/couchdb/downloads and specifically the lean bundle at 16MiB erlang + all couch love here https://github.com/downloads/dch/couchdb/couchdb-1.1.0+COUCHDB-1152_otp_R14B03_lean.7z
Some brief notes on bundling and embedding couchdb on windows at wiki.apache.org/couchdb/Quirks_on_Windows including how to hide the erlang window (erl.exe -detached) at startup.
Ask on CouchDB #user mailing list if you want more info or help while you have a crack at this.
While not a code solution, you could use one of the bundling applications that can embed files and other files into one executable. One example would be BoxedApp.
Why bother. It is so easy to install Erlang on Windows. Just bundle up the whole thing including the erl.exe binary and have your installer unzip it into a folder. The only thing that you would need to change would be the batch files, or better yet, discard them and write your own batch file to start up CouchDb. Also, it is a good idea to use a different port that either the normal Erlang port (or the usual CouchDB port) and maybe even get Erlang to use localhost as its "shortname".
The CouchDB wiki does provide at least a few tips for Integrating CouchDB into your Windows Applications. YMMV, from what I can tell it's more or less just tips on creating a relocatable build. You'll want to likely generate a solid random admin user/password into the local.ini file during the install process and set up proper permissions on all created databases (to protect against any potential cross-site scripting vulnerabilities) in addition to ensuring the socket binding only happens on the default localhost interface.

Automating adding sites to IIS7

I'm building some scripts for automatically setting up a developer's machine so everyone has an identical setup & configuration.
One thing in particular I want to automate is the configuration in IIS7. We have a bunch of web apps which need to be hosted locally and would ideally like them all set up automatically. Does anyone know of a sensible way to do this?
a little bit of Microsoft.Web.Administration + a bit of LINQPad and you're laughing.
its fairly easy with the powershell snap in
Edit: The MSDN docs are pretty whack as usual, but if you rummage about enough you can eventually find all the commands available to you

File changed watcher Tool

I have recently begun a new project which runs on remote computer. I usually remote debug the application. I have setup microsoft sync toy to "echo" the built exe,dll,pdb and configs to the remote computer.
However, i cant add synctoy to my visual studio build events because it might disturb some of the other programmers in my team. I was wondering, which (free) tool would you guys use to watch a folder of files and kick off synctoy when a change is detected.
I can write a simple file watcher, but rather than reinvent the wheel, i would rather just use an existing tool. Searching on google yields so many tools, i wouldn't want to try them out just to find a good one.
It may fall under the banner of reinventing the wheel, but if you are using .NET, the FileSystemWatcher class, albeit without a UI, is pretty much as comprehensive as you can get, out of the box.
I'm sure you could knock something up with it in a very short time.
What about using Robocopy with the /MON or /MOT options? See http://ss64.com/nt/robocopy.html for more details.

Windows Computer Profiler

We create a lot of internal tools in order to work with the data we use. Occasionally we'll run into a problem with one of those tools on a designer or artists computer and will need to spend considerable time on there computer to try and diagnose where the problem may be coming from.
This creates problems because while a programmer is trying to diagnose an issue on the user's computer the user is unable to continue with their work. What we'd like to be able to do instead is run an app that will generate a report that a programmer can look at on their own machine in order to at least rule out some of the more common and obvious problems.
Example information we'd need would be all the environment variables, registry info and installed applications. Is there a decent existing tool that will accomplish this or would it be better to just roll our own?
Start > All Programs > Accessories > System Tools > System Information
or
Start > Run "msinfo32"
Then,
File > Export
and you can take the file back to your desk.
Using Windows Powershell setting up a script that can provide the needed information should be relatively easy. The script center is a great starting place to learn Powershell. If you like to listen to podcasts I would recommend The Powerscripting podcast.
This probably should be on ServerFault.com, since it deals with an end user's configuration and is not necessarily a programming issue.
That said, I would think that you should be able to write a WMI script to cover this.
You'd want to start here
http://msdn.microsoft.com/en-us/library/aa394585(VS.85).aspx

Resources