Silent Installer For Windows built via Inno Setup [duplicate] - vb.net

This question already has an answer here:
How to make the silent installation by using Inno Setup?
(1 answer)
Closed 8 years ago.
I have a installer for my program that has been built using INNO Setup. I want to convert this installer to silent installer/unattended installer, such that the user doesn't have to enter anything and the files gets extracted to a predefined location.
I have done my homework and found out that it can be done via command line parameters, but I don't expect my user to go through all the pain.
I just want an exe, which on double click should install my application. Is it possible to enter some parameter in the INNO script to make the installer as silent ? (I didn't find any pointers to this)
Any help is appreciated :)

You should change your requirement.
It doesn't matter whether AVS declare it as suspicious or not, users will in general consider something malware if it performs drive-by-installs without letting them know about it. It is not "hassle" for users to confirm they want to install when they run the installer -- and that is all that Inno requires for a non-silent install.
You can skip every page in Inno except one in a non-silent install. You can decide whether that one is the welcome page (just shows general intro text), the ready page (shows information about where it will be installed), the dir selection page (to let them choose where to install), or even a custom page. Inno doesn't mind which single page you want to show, as long as you show at least one.
The only case where it is acceptable to jump straight to "installing" without any preamble is when the installer is being run from another program at user request (eg. your application found an updated version of itself, asked the user if they wanted to install it, then downloaded and ran the installer). In this case, the parent application should be using the command line to request a silent install.

Related

Show maintenace/repair/uninstall dialog when a user re-installs the same exact version of WiX

I am new to Wix. I am using WiX 3.10.
The problem is that when I install a new .msi that I made, everything runs fine. However, when I re-install the same exact version (nothing changed), it goes straight to the "Finish" Screen.
What we would like to do is tell the user that he/she has the version already installed, or make a maintenance/repair/uninstall dialog appear instead when executing the same exact installer on their computer.
I have been able to prevent downgrades using the MajorUpgrade element in WiX, I just need to be able to tell the user that the version of the software is already installed in their computer or make a maintenance/repair/uninstall dialog appear
currently all I have is :
Using this code, when i click to install the second time, the screen goes directly to the "Finish" screen.
I have not found any discussion like this on the Wix Forums here nor in the Wix Users QA site.
Any help would be greatly appreciated.
Regards
Jay
WixUI_Common comes with the repair/change/remove dialog, just put it after your verityReadydlg, adn the second time you install the same version, it will go to the maintenance dlg
1
1
1

how to catch installation progress and return-value from an installer in vb.net

I'm developing a windows application (using vb.net) that can install various versions of runtimes like vc++, Direct X, .net frameworks etc on a PC. My program must be able to to run the runtime installers (msi & exe) one at a time in the background and do the following:
1.Check weather the runtime is already (previously) installed or not.
2.Show the installation progress in a progress bar in the main form of my program.
3.And at last get the return code (exit code) from the installer to indicate weather the installation was successful or not.
What are the codes required to perform the above tasks?
Also I want to know what are all the possible return codes(values) an installer can return.
All of those redistributables might have different command line options, so it's not likely to be one answer for everything.
It's not clear how you can get the installation progress. It's almost certainly impossible or very difficult. You're asking how you can run a program that will "steal" the output of some other program, and in many cases that will be Windows Installer. If I had a program that fired off a Windows Form program, then you're asking "how can I get the content of that program and steal the output messages". That's not an install question, it's a Windows messaging/windows message loop question.
The detection methods used by those setups are coded internally (or configured as internal data), so you're also asking how the code in all those programs detects that the dependency isn't installed (on multiple OS versions and 32-bit and 64-bit), and some of that might be available on the web but it's unlikely that it is readily available for every redistributable.
You might also have an issue with EULAs. Some redistributables need a EULA to be accepted and might not install unless it's accepted, or some may have a command line option that includes something like (just an example) ACCEPTEULA=1.
Basically you should:
Find the command line options available for all those redistributables to see if they have an option that displays only progress, then let them show that.
Similarly, see if they have documentation that tells you if the exit code means success or not.
Don't bother trying to find all the detection methods for everything - just run the redist, and if the target is already installed it won't do anything.
Finally, you are re-inventing the wheel. WiX, the Bootstrap Manifest Generator, InstallShield, Advanced Installer (and so on) all provide bootstrapper programs that already do this as prerequisites for installing software. Nobody writes code to do this any more because there are existing solutions.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa376931(v=vs.85).aspx
1638 for already installed. 0 for successful installation. Yet mind 3010 which stands for success but pending reboot.
About showing progress in parent window .. this may be not a trivial task. Hopefully someone else can give you a hand with that.

Installing multiple instances of an Application with Wix Toolset

I simply need to install multiple instances of my application saving them in different folders, with no shortcut on desktop.
In other words, when the App is already installed in a Folder, if I double-click the .msi file once again, the installer shouldn’t ask me if I want repair or remove my App, but it simply should permit to install it in a new folder.
How can I solve this problem?
I used to work with this kind of installations before, and I would agree with #Nikolay - it is rather an exception, than the rule when it comes to Windows Installer based installations. Component rules are often tricky to follow, and multiple instances aspect adds some complexity on top. So, think twice before you go this road.
Being complex, it is still possible. Years ago I published the article of how to start authoring multiple instance installations with WiX 3.6. Note that this version of WiX simplifies it significantly. It's not a short read, so here is a quick digest:
You won't be able to achieve the "install each new instance with double-clicking MSI file" behavior. You have to have a bootstrapper - something that passes correct command line parameters to msiexec.exe.
Don't try to support unlimited number of instances - try sticking with reasonably big number. Do you imagine someone installing your app 10 times on a machine? 50? 100? Make a sane choice - this will be the number of your <Instance/> elements.
Although you only have to decorate non-file data components with MultiInstance attribute, I don't think it will break if you add it to all of your components.
Although I explained the patching of multiple instances in that post, I would only use it in production if I had no other choice.
What you are asking for is not normal in Windows. Normally, each program (product) is installed only once. I.e. each installation package has it's ID (called "ProductID"). If that ID already registered in the system as installed, the system will not allow you to install the second product with the same ProductID, but start change/remove.
What you can do:
Don't use Windows Installer (and WIX), use ZIP for example, or some self-extracting archive, or some other program which does not register installed product in the system.
Use command line to change product id before installing if you want MSI and Windows Installer for whatever reason. Try googling on "use transforms to install the same MSI multiple times". Thus you can have the same MSI per-transformed before installation, so that it looks as a different one to the system.
Install per-user, if that's good enough for you (i.e. don't install to Program Files, install to user folder)
Maybe there are other options...

Adding software setup to installer

I'm writing an installer for an application. Most of the installer is done and working, but I have on more step outstanding. I need some way to add a setup window to the installer, that will take user input like server address and port, etc. and write these to the relevant files for system start-up. This preferably done through a GUI of sorts inside the installer.
I've tried creating an executable file that runs after installation, but this does not always execute on different systems.
Is there a way to add a GUI to the installer itself that executes after the directory structures and files have been put into place?
Thanks in advance.
In general you should seriously consider doing this as a standalone app that runs when the app first runs and needs configuring. Then it's a program that runs in a user context and can be tested and debugged in the normal way. At least consider what the user is going to do if they want to change the server address or the port - will they need to uninstall your app and reinstall it just to change the server details or the port?
The GUI may not run correctly when started from the install for a number of reasons. It may be initiated with the system account if it's a deferred CA. It wasn't started from the interactive user shell, so it probably won't have any idea of a working directory. It's being run from an msiexec.exe process running in the system directory and maybe with a system account - that's not really the place to be doing your GUI configuration.
I assume you're using WiX, it doesn't say so in your question but it's tagged with WiX.
I would have a read of http://wix.tramontana.co.hu/tutorial/user-interface-revisited (or http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/ has a relatively easy to read example), you can add or edit any of the dialogue boxes in the installer, you'll need to download the source to get at the built in dialog, and it does require some "play" to get everything quite right but worth it to get a professional looking installer.

Create a bootstrap that passes arguments to the msiexec

I need to create a bootstrap for my WiX project I've tried using setupbld.exe but it will only allow me to create an executable that will show my UI or one that will behave as a silent installer but not both.
I need to be able to run the resulting executable with argument that will tell it wether or not to show the UI during installation.
I've found this post by John Robbins that explains how to re-build the setup.exe stub used in the creation of the bootstrap but I was hoping there is a simpler way to do what I need.
Does anyone know of a way to create a bootstrap that I use to run either as a simple (with UI) install or as a silent install.
I've seen dotNetInstaller recommended on the WiX mailing list a lot, should be a lot more flexible than setupbld.exe but I haven't used it myself.
Update: If you've got budget to purchase software, try the bootstrapper that comes with MSI Factory (the demo just displays a nag screen before launching the bootstrapper). We use this ourselves and it's been worth every penny.
AT the end I've used 7zip to zip the MSI in a self extracting archive.
You can add a "config" file to let 7zip which files to run when opening the executable.
Check out 7zip's manual for more details.