Install MySql With default Configure automatically with install4j on Linux - linux

I building a installer for my application and want to install mysql With default Configure on user PC automatically. how to install mysql automatically without be user set Configure(example password,user,instance)? On linux
1.How i install MySQL on Linux with install4j ?
2.How to run .sh file in install4j?

You can run any third party installer with a "Run executable or batch file" action.
The mysql installer has a quiet mode that can be invoked like this:
msiexec /i "path to msi file" /qn INSTALLDIR="mysql installation dir"
For the "Run executable or batch file", you have to set the "Executable" property to
${installer:sys.system32Dir}\msiexec
and the "Arguments" property (in the "..." editor) to
${installer:sys.installationDir}\mysql.msi
/qn
INSTALLDIR=${installer:sys.programGroupDir}\mysql
If you add the mysql msi file to the distribution tree at the top level and it's named 'mysql.msi' and if you want to install it to %PROGRAMFILES%\mysql.
Configuring the instance can be done with the MysqlInstanceConfig.exe helper, see https://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard-cmdline.html for more information.

Related

NSIS and PATH env variables

In my installer, I embed cmake and others installers.
During installation the user install, through my installer, cmake and add cmake to the path.
At this point if I open a command prompt and type cmake, it is actually recognized.
But in the installer I run the following command:
ReadEnvStr $1 %COMSPEC%
ExecWait '"$1" /c cmake XXX'
But it tells me cmake isn't recognized. How is that possible? I just open a command prompt before in c:/windows/system32/cmd.exe and type cmake and it was recognized so why this code does not work?
It is like the paths env variables was not updated somehow. Of course if I reboot it works fine but I would like to avoid it.
Thanks for your help.
Environment variables are inherited from their parent process by default. Explorer.exe is the only application that listens for environment changes and therefore if you start a new process from the start menu it will run with the updated environment.
You can update the installer process environment and it will be passed to the ExecWait child:
System::Call 'kernel32::SetEnvironmentVariable(t "foo", t "bar")'
When dealing with long path strings you really should be using the EnvVar plug-in.

How to get default installation directory for IBM MQ in linux and unix?

`I have used MQ_INSTALLATION_PATH in linux
when i execute above in the path /opt/mqm/bin via root it cannot display nothing but when i execute it in the path /opt/mqm/samp/bin it displays MQ_INSTALLATION_PATH .. before i should execute crtmqenv -p command
So what a solution to get installation path of IBM MQ?
MQ v7.1 and higher support multiple installations on the same server. The command setmqenv when sourced will setup some environment variables to allow you to use a specific installation. One of the variables that is set by setmqenv is $MQ_INSTALLATION_PATH. You can display the value of this variable with the command echo $MQ_INSTALLATION_PATH.
$ echo $MQ_INSTALLATION_PATH
/opt/mqm
If the installation has been setup as default using the setmqinst command, then various symlinks will be created under /usr/bin pointed back to the mq installation directory. You can display the installation directory by running the /usr/bin/dspmqver command and looking for InstPath in the output.
You can also directly call the command dspmqver -f 128 to have it return just the installation path:
InstPath: /opt/mqm
If the install is not setup as the default install and you do not know which directory MQ is installed in you can look at the /etc/opt/mqm/mqinst.ini file which will have a stanza for each installation on the server. The installation path is listed after FilePath= under each Installation stanza.
$ cat /etc/opt/mqm/mqinst.ini
Installation:
Name=Installation1
Description=
Identifier=1
FilePath=/opt/mqm

How to disable an extra window to restart system even after selecting not to do so in files in use dialog in installshield

I am doing an upgrade for the existing exe file using installshield. when installing the update , in files in use dialog I select the option to automatically close and restart the application instead of the other option to reboot the system.
But I get an extra window which tells me to restart the system again after installation is complete. How to disable this window? Please help :)
You can try to run the installation silently with REBOOT=ReallySuppress (update the paths). Please note that I haven't had the chance to test all these command lines:
msiexec.exe /I "C:\IsWiX.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
/I is for install
/QN is silent mode
/L* is verbose logging
If you have an EXE file instead of an MSI file I would extract the MSI to an administrative image (file extract from setup.exe basically) using the following command:
setup.exe /a
Then specify an extract location for the files in the EXE file. You can also run it directly with the Installshield command lines for EXE files. Something like:
Setup.exe /v"REBOOT=ReallySuppress /qn"
Or silently with logging:
Setup.exe /v"/l*v c:\test.log REBOOT=ReallySuppress /qn"
There are also some simplified command line macros from Microsoft. Most of the time these can be used. Other times you need the full command line interface.

How to install application as windows service using NSIS script?

I have written nsis script for my java project. I have successfully created a exe file using this nsis script. Final step of my installation process is installing my application as windows service using a batch file. I have installed successfully through command line using following code
"c:\program Files\program Files\test\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop
same commands I have executed through nsis script is not working well. I have tried the following code
Exec '"$INSTDIR\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop'
$INSTDIR refer to this directory c:\program Files\test.
Use ExpandEnvStrings to expand %classpath% before the exec...

Error while installing program

I got the following error message during the installation of the program :
"1: ALLUSERS property is not 1 - this MSM cannot be used for a per-user or fallback-to-user install 2: 2"
Binaries for installation were compiled by Install Shield v 12.
Could anyone help me, please?
Your setup program includes a merge module that only supports machine-wide installations. If your program contains the installation scope dialog box (Install for: All users on this computer / Just for me), select the first option. If it doesn't, run it from the command line using:
msiexec /i YourSetup.msi ALLUSERS=1

Resources