Need an auto update programme that will install the software without any manual interference - installation

i want to create a programme to auto update the software on client machine my question is how to run auto-installer to update the software.Actually we can download the current version of the software and we need to start installation without any manual interference.Once user click on the install update software need to be installed automatically without any wizard. any help will be appreciated.Thanks & Regards Harry.

It depends on the installation technology you use.
With MSI, you can pass /passive switch to msiexec command to prevent any interaction; add /norestart to prevent automatic system reboot. In case of MSI, you can also use Windows Installer API functions to fully programmatically install the package.
UI level can also be controlled from within the MSI package: from no UI at all to fully fledged wizard-like GUI. For example, you can display wizard interface when user installs your application for the first time; when you're preforming upgrade, you can show user only the progress or you can completely hide the UI.

Like #AlexeyI says, it depends on the installer you're using.
For InstallShield-created 'setup.exe' installers, you pass the /s(ilent) switch. If you need to provide answers to dialogs you also supply a response file containing the responses you want to give.

Related

Inno Setup Automatic Setup update [duplicate]

I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java.
I often frequently release new versions and bug fixes.
I would like to know if there is a mechanism to install updates automatically?
Inno Setup does not have any built-in mechanism for implementing automatic updates.
You need to implement that yourself:
Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?)
If the application detects a new version, make it download an installer to a temporary location.
Make the application execute the downloaded installer. You can make the installer run in silent mode (/silent switch). The application should close itself, to unlock any files it is using, to allow files update.
This approach will need the update installer to prompt for Administrator privileges. If you need the update to proceed completely seamlessly, you will have to implement a service. For that, see Deploying application with .NET framework without admin privileges.

Auto Update Solution for VB6 Application

I am working on a VB6 application which has many executable and an Active X dlls.
And there are to be updated in c;lient machines to lates version once in a while which i am asking the user to update manually.
Can you please suggest me a way using which i can update it automatically from the files that can be available online.
Thanks.
Windows Installer has features supporting Patching and Upgrades. Using those techniques you can create various levels of "upgrade" packages.
Your application would need a separate "update" utility that is spawned when the user approves updating, perhaps in response to a prompt your program raises after checking for new versions.
This updater would check the current version and the remote site's catalog of updates to pick the appropriate package, download it to a temporary location, start Windows Installer to process the package (or packages, sometimes you might need to run several Installer runs), and clean up the temp location. Then you might offer to restrt the updated application or on some occasions need to reboot.
This updater would be a fancy form of the common "installation bootstrapper." As you can tell it needs some "smarts" in order to tell what package or packages to download and install in what sequence, when it needs to request rebooting, etc. This would probably be based on a downloaded "rules script" it obtains as part of selecting a valid update option.
After all, sometimes you can just apply a minor upgrade or patch upgrade, sometimes you need a more complete install or entire reinstall.
If your needs are extremely simple (just an EXE and maybe a few DLLs and OCXs - preferably using reg-free COM) you may not need to go to these lengths. However when you start adding in other considerations like multiple programs, data directory creation and security settings, possibly running a settings file conversion or even database conversion, DCOM, firewall, etc. configuration, database drivers or providers, etc. things get complicated quickly. Too complicated for simple snatch and grab updating.
And admin rights/UAC issues are a factor so you'll probably have to deal with privilege elevation.
None of this is trivial stuff. There are people who do little more than construct and test such deployment systems as their entire job.
If you use soemthing like Inno setup to install the application then an update is simple a matter of running that periodically.
You can either detect there is a new version available by checking a web site/local server, or just prompt to run the update after X days.

How to interactive a silently installing msi? (Progress data and cancel it)

For some reason, we are delivering a product with our own install GUI, that means, we will run the msi installation silently background.
By using the MSI API "MsiInstallProduct", I can install the product silently, but I have no idea how can I get the progress data of this installation and how can I cancel it.
Anyone has some ideas?
UPDATE June 2018: Although the tool shown below is no longer available for download, I found it via Wayback machine. I assume it is OK and legal to link to it, seeing as the tool was freeware. Updated links below.
UPDATE: This tool from Wise is regrettably not downloadable anymore. I am not sure if it is OK to distribute it either. It seemed to be a free tool distributed as part of their main Wise Package Studio suite, but I don't think it is open source. I wish they would release it as an open source tool.
The Wise packaging products have been discontinued due to a number of legal issues.
I believe you can get the progress via the MSI API, but if I were you I would just show the progress bar from the MSI itself after invoking the install via msiexec.exe.
MSI supports several different installation levels (full, completely silent, basic GUI, reduced GUI etc...). In your case it sounds like you want a basic UI. This yields a progress bar where you can hide the cancel button, and optionally show a completion modal dialog:
Install silently with progress bar, no cancel button and no modal dialog at end:
msiexec.exe /I "Test.msi" /QB-!
To avoid having to construct these silly msiexec command lines manually, use the msi command line builder tool from Wise: http://www2.wise.com/filelib/WICLB.exe (resurrected from Wayback machine).
Please run the download by virustotal.com for safety.
Related:
installation using msi.exec open help options every time
Silent Install of MSI
How to install an MSI package from a command prompt
How do I force the Windows MSI installer to perform a complete install?
Silent Installer with custom selection
Here is a sample project that appears to do what you are referring to:
http://www.codeproject.com/KB/cs/msiinterop.aspx
You need to specify an external UI handler using MsiSetExternalUI or MsiSetExternalUIRecord before MsiInstallProduct (the latter is nicer, but has a higher MSI version requirement). The function you specify will be called for each message Windows Installer wants you to process. This will give you the data, and a chance to respond tell it to cancel. If you require MSI 4.5 or later, you can use an embedded external UI handler DLL, which does not require a bootstrap.

Installing an exe file -VBSCript

I use the following command to run a exe file which is in the network drive through a vbscript:
wsh.Run """\\lonmsc01\apps$\EWebEditPro\Version 4\ewebeditproclient4.exe"""
This installation pops up with dialog boxes to choose the setup type As Resintall or Remove and proceeds on by clicking on Next to finish the set up.
Is there any way I could disable the UI and install it silently?
The whole idea of using vbscript to silently install software is a bad idea. User interaction or at least user notification should be involved in all software installations unless you're a network admin using an Enterprise management tool. This struck me as sneaky, so I did a search for the exe you mentioned.
A quick google search indicates this may be malware you're trying to install... At least according to the Prevx site, it's listed as potential spyware. You're not asking us for help in silently installing malware, are you?
At any rate, even if this is legit (which it probably is) it's a bad idea. In today's world, silent installs should be completely disallowed.
http://spywarefiles.prevx.com/spywarefilesweek.asp?mk=43998135
Depends on what setup utility was used. Mose installers have a silent or quiet operator. Try calling the setup with the parameter /?, it might tell which parameters you can pass him. Or you just try different switches, like /silent, /quiet etc.

Hide the uninstaller in Add/Remove Programs?

I am creating windows installer project using Visual Studio 2005.
Is there an option make it so that my project does NOT have an uninstall option in Add/Remove programs?
One of my customers has asked me to do this.. Here's Why: Because the installer is a patch to an existing program. After uninstalling, the program no longer works because the patched files get uninstalled. Instead of figuring out a way to restore the replaced files (which we haven't been able to do with this installer), we're wondering if it is possible to disable the uninstall.
You just need to set ARPSYSTEMCOMPONENT=1 in the Property table of the installer using Orca (Can't be done directly in Visual Studio from what I know)
This is commonly used when a program installs dependencies and you don't want the user to uninstall dependencies by hand, they need to use a specific uninstall script you've provided or something.
Personally, I would author the patch as a patch and prevent the patch from being uninstalled.
Also I suggest picking up a copy of The Definitive Guide to Windows Installer which will give you some explanation on how, why and where you should use tricks such as this. As well as giving you a really good understanding of the windows installer fundementals and help you to design a better installer in the long run. All the examples in the book use Visual Studio + free tools from the Windows Installer SDK.
Edit: The user still has full control to uninstall via MSIEXEC, via a custom uninstall shortcut that you provide, all this does is hide the entry in Add/Remove Programs (ARP)
Edit2: Sample VBS to add the property (if you want to do so as part of an automated build process)
Dim installer, database, view
Set installer = CreateObject("WindowsInstaller.Installer")
Set database = installer.OpenDatabase ("test.msi", 1)
Set view = database.OpenView ("INSERT INTO Property(Property.Property, Property.Value) VALUES('ARPSYSTEMCOMPONENT', '1')")
view.Execute
Set database = Nothing
Set installer = Nothing
There might be, but to be honest, that's a horrible, horrible idea. It's not your call to tell a user what they can and cannot do with their machine.
And if the user shouldn't have the ability to do so, then that is usually determined by an administrator and the user is not given the right to uninstall anything by virtue of their account type, which again, is not something you should have influence on.
You don't know who his "users" are. This may not be for end-user software at all. We write a lot of custom software that's installed in a NOC; it doesn't put any uninstall info into add/remove. (We're using Nullsoft's NSIS and not the Visual Studio installer, btw...)
It's way too silly to say something like "This is always a horrible idea". There are many cases in modern software where uninstalling dependencies can true and thoroughly f--- the machine at hand up.
Open Source Software ideals are only useful for people who WANT to be able to break their machine.

Resources