Testing windows installers - windows

I work at a software company,
And we have a product for Windows OS that is installed using a custom installer.
We want to have an automated system that will run the installer on a daily basis, make sure that everything is installed and functional (application installed, appears in Add/Remove, shortcut created, registry keys created, browser addons installed, etc)
I also want to test the functionality of the app by using a GUI macro of some sort.
Is there anything like what i'm looking for?

We ended up using TestComplete 9 from SmartBear: https://smartbear.com
Its doing exactly what we need, and it has many advanced features like connecting to remote virtual computers for parallel testing.

Related

How to automatically run a VB6 compiled software as Administrator and in Compatibility mode

We have an ERP application which is built in VB6 and it was running just fine till a few of our customer upgraded all their systems to Win7.
This software is programmed in such a way that it registers a few plugins (found in plugin folder) which are COM based at runtime. Now when the software is run by user without setting Compatibility Mode and Run as Administrator setting it fails and crashes.
I know we can manually set both Compatibility Mode as well as Run a Administrator by right clicking on program executable and then going to its properties. But this looks very unprofessional.
I think there will be some way to tell Win 7 to automatically run a software in Compatibility Mode and Run as Administrator.
Please help me.
Compatibility is an administrative function, not a development or deployment function. It is better to fix the application where possible, especially to remove any requirement for elevation.
There are plenty of tools for investigating the issues so you can correct them. However globally registering "plug ins" at runtime is a nasty one. VB6 component self-registration is always global unless registry virtualization can redirect it. Why not create installers for the plug-ins that can run elevated once during installation?
There are ways to set compatibility less manually, even as part of installation - though Microsoft discourages this. Maybe take a look at:
Compatibility Fix Database Management Strategies and Deployment
However the effort required might be better spent on remediating the problem. Support costs will be less over time.
As the other answers have said, you shouldn't need to run all the time elevated.
If you want to register the plugins after its started (as a normal user), you can use ShellExecute() with the "runas" verb to run regsvr32.exe, or use COM elevation which has been discussed many times before.
You can indicate that an application must run as admin by specifying it in the Application Manifest, which in an xml file that you can either embed or deploy with your application.
Once your application is running with admin rights it should be able to register and load the plugins. You should not need to run in compatibility mode to access the COM plugins.

Install multiple softwares with one installer (install wrapper?)

I'm looking for a solution to run multiple setup files (.exe and .msi) in sequence without any user input. The idea is to have everyone in my workgroup to have the same development tools (eclipse, python, cygwin, etc) by running one installer. Besides creating a batch script, is there a software out there that could create such a wrapper of installers?
Thanks!
From my knowledge there aren't any tools which create this type of wrappers, or if there are they are not MSI-based. This is because Windows Installer is very restrictive when it comes to running multiple installers simultaneously.
You can try using a setup authoring tool which supports package prerequisites. This way you can create a dummy package which installs nothing, but still handles all the applications you want installed.
If you want some suggestions don't hesitate to contact me.

Automate an OS check, three installers, and two registry appends

I need to create a single installer that I can distribute to machines running one of Windows XP or Vista. The installer needs to do the following:
1) Check if the OS is XP SP3 or Vista. If it's vanilla XP or SP1, run an MSI. This will install Remote Desktop 6.1.
2) Run an executable. This is the installation file for a VPN client application.
3) Run a RemoteApp deployment MSI.
4) If the OS is XP, edit the registry as per http://support.microsoft.com/kb/951608 in order to enable Network Level Authentication for Remote Desktop. This requires appending to existing registry keys (i.e. not overwriting their existing values).
Initially, I'd hoped to do this with a simple batch file, but I read that it's impossible to append values to a registry key -- I can only create new ones or overwrite old ones. I've looked into a couple of GUI installers, but I haven't found one that will simply run another installation executable. I've also looked at NSIS, but learning an entirely new scripting language seems a bit like overkill.
Any simple solutions out there?
Isn't an append to a registry key a matter of reading the current value, concatenating your new data and overwriting the key with the combined result? I would think that would be doable in a batch script.
I'm going to recommend NSIS only because it's what I use for my application installers, it has never let me down when I need to add new functionality, and I've enjoyed every minute of learning the language (which really isn't that bad).
I've looked into a couple of GUI
installers, but I haven't found one
that will simply run another
installation executable.
NSIS can easily run executables and MSI installers. It can also give you their return codes so your installer's logic can react to errors, etc.
learning an entirely new scripting
language seems a bit like overkill
I'd say it really depends on how long you will need to maintain this installer. If it's just setting up a test project on in-house machines, then yes it might be overkill to learn a new language. But if this installation is a process that your clients/business partners/etc will see, I think it's well worth the effort to learn a GUI install package, whatever it may be.
Some more things to think about: NSIS has plugins that make life easier when it comes to dealing with UAC, registry redirection, and detecting OS versions

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.

Build new computer using Scripts

I would like to automate the process of setting up a new PC, this would include downloading and installing the latest windows and office updates; installing software from a network share (some software will require a restart so the script would need to be able to login and continue) adding PC to a domain and setting up local user accounts.
Is this possible and what would be the best scripting language to achieve this?
Check out nLite. Allows you to pre-configure many options, slipstream updates and service packs, etc.
The standard method in enterprise IT is the Microsoft Deployment Toolkit (MDT). Even if another OS deployment technique (SCCM, BigFix, SpecOps...) is used, the Windows images are often developed in MDT.
There is no better guide to getting started than Johan Arwidmark's book series "Deployment Fundamentals". There is also material at Windows Noob.
You could integrate Chocolatey, BoxStarter or Ninite for app management after the OS is deployed.

Resources