Unattended update: how to pass throught user settings to new installer? - install4j

I have to implement the following scenario:
Application is installed with user specific values like installation directory, server url, user home and more
User should start a stand-alone updater
updater should automatically check for update, download file and start the new installer in silent mode
After installation there should be a status message whether update was successful or not
Therefore I took the updater of the Hello sample app and removed the user input forms. Now the check is succesful and the file will be downloaded. But how to pass through the user input values to the new installer? Should I use the response file and set this one as an argument for the silent installation?
Thanks in adnvance
Hardie

The new installer will read the existing response file from old installation if you add a "Load a response file" action to the "Installation location" screen. The default project template already has this action in place.

Related

Delete updater media file after update

We plan to use the "Update downloader with silent version check". In this aspect we would like to delete the downloaded mediafile which contains the update after the update has been successful.
The "Download File" action has a checkbox for "Delete downloaded file on exit". However, we assume that this is deleted when the User interrupts the updation. After a successful install, the .exe file is not deleted.
Is there any built in provision with install4j that supports this (or) writing an own Delete files action would be the way to go forward?
You cannot delete the installer in the update downloader, because the update downloader will start the new installer and then exit. At the time when the update downloader exits, the installer is running and its executable cannot be deleted.
In the installer itself, you cannot delete the installer executable either. At the earliest, you can delete the installer executable in your own launcher when it is started the first time. You would have to program this kind of cleanup yourself.

How do I unstage a Moodle update

After logging in to my Moodle as admin, I clicked the link to update to the latest available Moodle version. However, the new version won't work with my hosting site's MySQL version. Simple enough, I just selected the cancel button. Nope. The cancel button does nothing. Additionally, whenever I log in as admin, I am redirected to the update confirmation page where I can't actually perform the update or cancel the action. The web hosting service restored a previous version from backup, but the very next time I logged in as admin I was right back at the same update page.
Is there any way to unstage/delete/remove the "I want to update my Moodle" flag/action/request/whatever from the Moodle database/data files?
Thank you for your help!
When you download the new version of Moodle, it overwrites the existing files. You need to move all your files from the Moodle code directory (NOT your Moodle data directory) into another directory, then download a clean copy of your previous version of Moodle (from Moodle.org) and place it in your original directory.
Once that is done, you will need to copy across your config.php file, along with any extra plugins you had installed.
After that, you should be able to log back into your site and it should be back to running as normal again.
Before you do any future upgrades, there is a compatibility check built into Moodle itself (I think it is somewhere under site admin > server, but I don't have a site open at the moment to check). It is worth looking at that before downloading the upgrade.

install4j uninstall previous installation

I am creating an update for an application built in install4j and I want to overwrite the files in the installation directory but keeping the configutation files. I manually edited some of them to never be overwriten but I cannot keep the files created by user input when installing it for the first time.
Is it possible to set a condition in the "Uninstall previous installation" so that it keeps the user's input? The user's input does not exist in the distribution tree. This means that I cannot manually edit it so that it is never uninstalled.
Why would you want to move the file? The response file you either load if it is an update or leave install4j to delete it.
The file is usually loaded on updates to use some variable the user set in the initial install, like a username, so you won't have to ask him again.

Jar file packaged in install4J has restrictive permissions

I'm testing out Install4J 5.1.5 and am running into a little issue. My original jar file I would like to distribute has full permissions-- anyone can open it (with something like 7zip)-- and modify/delete any entries in that jar. However this same jar-- when installed by install4j-- the permissions become essentially read-only. I can't modify/delete anything in the jar after installation-- gives me permissions issue.
The reason why I want to modify/delete is that there are a few properties files in the jar that get defined by the user during installation so I want to modify / delete whats already in there with the user's new files...
The only thing I can think of is that I set the default unix file and directory modes to 777. But this doesn't seem to work. Any ideas?
The installer has a helper process that runs with elevated permissions. This helper process is started by the "Request privileges" action that is by default added to the "Startup" node of the installer.
All actions whose "Action elevation type" property is set to "Elevate to maximum available privileges" are executed in the helper process.
If you want to modify the file in your application (i.e. not in the installer), you can use a "Add Windows file rights" action to make the file writable for everybody.

how to execute and read from a command line during installation of installShield exe

I am new to Install Shield, and i have a really critical requirement. In between the installation steps, the installer should run a clearcase command in the backend and then that command output should be given as an input to the next installer panel.
To be more specific, i have to give the user to select a ClearCase storage location of his choice. For this, i need to run "cleartool lsstgloc" command in the back end. This command retrieves a list of available storage locations. I should read this list and show to user in the next panel, from where he can chose the storage location of his choice.
How is this possible using installshield. Please help me.
You could write a custom action to run your command and store the output to an MSI property. You could run the custom action when navigating from the first dialog to the second and use the property on the second dialog to present some kind of list.
Or how about if the command line to the installer be assigned an MSI property which is the path. For ex, create an installer property named CCPATH. Then whatever launches the installer include that as an arg:
SETUP.EXE CCPATH=E:\CCSTORE\CASE12...
The installer properties can be used within the setup process as needed.