Support for dynamic installer parameters? - install4j

We are evaluating install4j as a replacement for JWrapper and have come across one necessary feature that we are not sure how to implement. Our application is 3-tier with a Java client application, and we are using JWrapper for client install/update with its 'dynamic parameterisation' feature to inject params into the installer media file at download time. The best example of these parameters would be the hostname of the application server the installer was downloaded from, since we do not have a single fixed server that we can hard-code.
We need the downloaded installer to require no interaction from the user, as they cannot be expected to know the values for these parameters.
So I guess the short form of my question would be: Is there any way we can get parameters known only on the server (after the installer media has been built) into the installer when it is launched on the client?

This is generally not possible because it will break the signature of the media file. The only way is to pass the information as an argument or in a file next to the media file.

Related

.Net Executable in Azure Function

Background: I have a series of console apps that modify a database. They are provided to us. We have access to the code, however, we must make as little as code change as possible. They are console apps that use entity framework 6.
My question is two-fold.
What is the best way to deploy these guys as Azure Functions? My current thinking is the Powershell option. This would allow just running the executable with no code change.
Depending on the best method to deploy them. How do you get the connection string passed down to the executables configuration?
if the requirements not to refactor the console apps but migrating these.
you may create generic function .csx file and convert console application to an Http service in Azure Functions. the good things of this is to allow specific inputs (and output parameters) of arguments to the console.
you can refer to functions dotnet migrating console apps and enjoy your migration.

How to specify multiple alternative Download-URLs for dynamic bundle JRE

Is it possible to configure the generated install4j setup-program in such a way that it tries two different URLs, one after the other, to download a dynamically bundled JRE?
In my use-case, I would need a behavior that if the download from the first URL failed (because the host is not reachable, for example) it would try the second URL?
I've found an advice in the documentation saying:
[...] Adding an FTP download URL will increase the chance that the download will work on Unix-like systems behind restrictive firewalls.
So it sounds a little bit as if it is possible to add another URL (FTP in this case).
How can I add such a second URL and could it also be a HTTP URL?
As of install4j 7.x, no fallback HTTP URLs can be configured.

How to execute a local file from GWT?

I want to run a third-party application from gwt for manipulating a local file and after this send file to server. I released the feature for uploading and sending file to server, but between these steps I want to change something in this file (with 3-rd party application installed on client machine). The main problem is that the applet cannot be used because nor Chrome, nor Mozilla do not support it. Are there some examples of other tools and technologies to do this?
The FileReader and FileWriter api can be used to work with local files. I think the htmt5rocks has a good example of how this can be done with javascript. These processes can be used with GWT elemental FileReader and Writer. I've added links to the javadoc below.
http://www.html5rocks.com/en/tutorials/file/dndfiles/
http://docs.sencha.com/gxt/4.x/javadoc/gwt-2.7.0/index.html?elemental/html/FileReader.html
http://docs.sencha.com/gxt/4.x/javadoc/gwt-2.7.0/index.html?elemental/html/FileWriter.html
Answer is simple: GWT is client-side technology. You cannot run 3rd party application installed on client side, access local drive files or so.
If you want to change some local file fromt GWT application, then you need to expose Java Applet, do operation on server side and then process it.
Why are you saying Firefox and Chrome don't support it?

Building customer based installation packages with install4j

I am developing an application which has customer specific configuration (2 text and 2 binary files). The use case supposes that customer downloads an installation package (I am going to use install4j) and install it on target platform (Mac or Windows). So all installation packages should be different for different customers.
I am considering 2 possible scenarios for implementation:
Generate new installation package per customer request on server side (cons: I need to have install4j for Linux, which is server platform)
Have a half-generated installation package and inject customer data somehow to the package by customer request (cons: I am not sure this is quite possible at all)
I never used install4j before and don't know how to implement 1 or 2. Their documentation is far from ideal. They doesn't have examples or consider cases like this, so any suggestion is very appreciated.
You cannot modify an installer after it has been built. The main reason is that it would break code signing. So you would need to generate a new installer for each configuration. If you deploy on Mac OS X and Windows, you need install4j Multi-Platform Edition which also works on Linux.
Alternatively, you could ask the user to provide credentials in the installer, then you could download the appropriate files on demand with "Download file" actions.

Automated deployment of web site

I'm planning to do an automated deployment of a website,but im kind of stuck at this moment. I have looked at MS-Deploy, it got all the functions for deploying Website. I have a created a Web application package (.ZIP file) and I tested this on my local machine it is deploying website i.e
Create Web application under default website
Publishing files in c:\inetpub\wwwroot directory
Set ACLs on directories,etc
But i want to achieve few more extra steps for example:
Check whether Web application exists in Default Website, if not
create a Web application
Check whether Application pool exists, if not create a App pool
(given name) with a specific credentials and Assign App-pool to Web
application
Before it deploys take a backup copy of existing Web application (IF
exists)
publish offline page (app_offline.htm)
publishing the files to application directory
Replace the AppSettings section(in web.config file) to with actual values
Encrypt Web.config connection string
If there is any error whilst installing web application, rollback the web application to its previous version
The question is whether can i achieve all these functions via MS-Deploy or do i need to write any script, please suggest me what scripting language should i use
Please let me know if you need more information.
Thanks in advance
I'm not an expert on this topic but have been doing a bit of research on automated deployment with MSDeploy lately, and think I can offer the following;
This is default behaviour if you use the iisApp provider.
I know you can do this with the appPoolConfig provider, but I'm unsure as to how you would run this and #1 together as part of the same package. Perhaps as part of a pre- or post-sync command?
This is standard in v3, as long as it's set up on the server. Not used it myself, but read this anyway.
Fiddly. Not supported in MSDeploy, but you can vote for it if you want. Also, check out this SO answer (and also worth checking out PackageWeb, but the same answers' author).
Not sure I follow. This is done as part of a successful deployment, surely?
Use web.config transforms and optionally the aforementioned PackageWeb for a neat way to do this. Also check out Web Publish Profiles.
Difficult. My understanding is that the encryption is based on the machine.config, so you'd either have to run a post-sync script which would run some sort of remote Powershell script on the remote server to encrypt the web.config using aspnet_regiis, or you'd have to encrypt the config as part of your build process and then muck about with custom keys and the RSA provider (some info here).
I hope that helps. As I said, I'm no expert, so happy to be corrected by those more knowledgeable. Maybe also worth mentioning that MSDeploy is a lot more powerful if you use it via the command-line rather than creating packages from VS, although there is a bit of a learning curve to go with it.