Pass parameter to app config file during MSI installation - Advanced Installer - advanced-installer

I have created MSI package using advanced Installer. It contains App Config to which i have to pass the siteURL which varies depending on location. I need to pass the siteurl to app config when msi is installed . Please help me with it. I am new to Advanced Installer

You can check the online user guide for Advanced Installer, it has a lot of useful info. For example the article on importing and editing XML config files.
Or how to add a custom dialog and write in the system the values captured from the end users.
EDIT: additional answer regarding command line
You can run the installation silently from the command line but you will still see the message box saying the package is built with a trial. You will not see the standard MSI dialogs. And the trial messages will be gone once you purchase license for Advanced Installer.
Please note that your command prompt window (cmd.exe) must be launched as administrator, if your installation is installing per-machine (i.e. you write in Program Files or HKLM registry hive). Otherwise the installation will fail silently and you will not know why, because on silent installation the OS will not show an error message.
Here is a command line example:
msiexec.exe /i C:\setup\installer.msi /qn ID="235424" SiteURL="www.example.com"
Please note that it is not recommended to use private properties, i.e. properties with lower case letters in their name, we recommend public properties, for example: SITE_URL.

Related

Generating updater.exe via Advanced Installer command line

I am trying to sign all executables + dll files in my application, within an Azure Pipeline, using Azure signtool for that. (doing basically the described here) - on the result of running dotnet publish.
Exception is updater.exe, because it is generated by Advanced Installer API or some other proprietary way. Signing the updater.exe file that lies inside Advanced Installer installation folder /x86/updater.exe - does not help (it will work, but the updater.exe that is deployed when installing the MSI is not signed, meaning it is generated during processing of the .AIP file, which happens after running dotnet publish)
Is there a way the updater.exe AI generates (with the custom icon, etc) to be created using AdvancedInstaller.com command line API ? How ?
The question has already been answered in the forums here:
https://www.advancedinstaller.com/forums/viewtopic.php?f=5&t=50297#p127034

How to run an MSIX installed application from the command line

I have an application packaged and signed as an MSIX, it installs and runs from the start menu. I'd like to be able to run the application from the command line too, for automated testing, but I can't see a way to do it. From powershell the docs suggest Invoke-CommandInsideDesktopPackage, but that requires developer mode which I'd rather not enable on test machines, and also is not the same as just running the app. What I'd love is a simple command line command that starts the app in the same way that the start menu does it.
By design, the binaries from an installation folder of an MSIX folder are not directly accessible through their direct path.
The correct way to run an app from the command line from an MSIX package is with the use of an execution alias. The following article contains more details about how an execution alias works and how you can define it in your package, no matter the tool you use to build the MSIX package.
- App Execution Alias
Also, here is a related question on SO.

Cannot compile the generated code. Please inspect the generated code via this exception's SourceCode property

I installed my private application which makes use of the Desktop Bridge and Dev Express XAF Winforms, from the Windows Store.
Then I uninstalled it using powershell
Remove-AppxPackage -Package *jobtalk*
Now when I try to reinstall from the store I get
Cannot compile the generated code. Please inspect the generated code via this exception's SourceCode property. The following errors occurred:
(0, 0): Error generating Win32 resource: Access is denied.
(0, 0): Unable to delete temporary file 'c:\Program Files\WindowsApps\jobtalk.jobtalk_1.0.1.0_neutral__8kpaqbvntb9aj\SBD.JobTalk.Workflow.Win\CSC88B14BFB7D314F00B0D1BB57EFD11.TMP' used for default Win32 resource -- The system cannot find the file specified.
[Update]
I think I need to install as administrator somehow.
The problem and solution are described at http://blog.delegate.at/
In order to contain app state, the bridge attempts to capture changes the app makes to AppData. All write to the user's AppData folder (e.g., C:\Users\user_name\AppData), including create, delete, and update, are copied on write to a private per-user, per-app location.

Can't run HermesJMS from SOAP UI

I am trying to run HermesJMS from soapUI 5.2.1 on Windows7 x64
The preferences and path to hermes config are set correctly.
The problem is that I cannot write to C: drive. So I had to install SOAPUI and Hermes in alternative places. I have changed hermes_home, java_home and hermes_config to my actual paths. Paths do not contain whitespaces etc. When I run hermes.bat from command prompt, it starts correctly.
However, when I try SoapUI -> Project -> right click -> start HermesJMS - nothing happens. Things are as bad that I even couldn't find anything useful neither in soapui nor in hermes logs.
File structure is as follows:
hermes_home = ...\SoapUI-5.2.1\hermesJMS
hermes_config = ...\SoapUI-5.2.1\hermesJMS\cfg
Does anyone have an idea what could be going on? Or for a start where can i find stdout and stderr of a script which starts hermes from SoapUI?
Here are the steps to configure SoapUI with HermesJMS:
Preferences: In SoapUI tool, go to File -> Preferences -> Tools and set the path for HermesJMS, which is mentioned here in the documentation. Then, save the preferences.
Start HermesJMS: Now, select your soapui project. Right click -> Start HermesJMS. At this point, a dialog will be shown requesting user to choose for the hermes configuration directory where it looks for the file called hermes-config.xml. Default location it looks for is under {user.home}\.hermes.
You already mentioned hermesJMS is already configured to connect with TIBCO EMS, so you will be having that file on your system.
Configuring JMS: I believe this may not really applicable for you. But, in case if someone is needed, here are the detailed steps provided, citing the documentation.
-- Here for activemq from the official site.
-- Here for TIBCO EMS. And here, there. Also find some information relevant to EMS connection issues here.
Permissions Issue on C Drive:
There is no constraint from SmartBear that SoapUI needs to be installed in a specific drive on the computer. So, you are free to install the software on your machine where you have the rights to do so.
Does anyone have an idea what could be going on? Or for a start where can i find stdout and stderr of a script which starts hermes from SoapUI?
Best thing you could do is to go the logs to find what is going on. You can find lot of useful information from the logs when the situation requires. SoapUI logs can be found under {user.home} when you invoked it from windows -> start menu. If you start SoapUI from command line (go to SOAPUI_HOME\bin) using soapui.bat script, then you should be able so the log on the console itself also log files can be found in the same directory where you invoked.
This time the above instruction should resolve your issue.

Windows x64 RabbitMQ install error with Erlang environment var (ERLANG_HOME)

I'm ask/answering this question because it hung me up & it's likely someone else will have the same problem.
Install of RabbitMQ x64 v2.8.6 on Windows Server 2008 x64.
After Erlang install using default install location to C:\Program Files\erl5.9.2, I'm attempting to start the server via running the rabbitmq-service.bat. Fail:
Please either set ERLANG_HOME to point to your Erlang installation
or place the RabbitMQ server distribution in the Erlang lib folder.
Problem is the .bat file does not have the correct subpath. with 5.9.2 (R15B02) version of erlang. My ERLANG_HOME directory is set correctly, but the script does not use it correctly for this version of Erlang, which, it appears to this Erlang noob to have a new subdirectory called "erts-5.9.2" which is causing the problems. Maybe someone intimate with these scripts can describe how to make this work correctly without the hack workaround I'm about to describe?
1- Set environment variable:
Variable name : ERLANG_HOME
Variable value: C:\Program Files (x86)\erl6.4
note: don't include bin on above step.
2- Add %ERLANG_HOME%\bin to the PATH environmental variable:
Variable name : PATH
Variable value: %ERLANG_HOME%\bin
This works well.
There are several RabbitMQ control .bat files on windows. Every one you use needs to get changed to reflect the Erlang path correctly. In this example, I'm editing the rabbitmq-server.bat because it's one of the easier ones... any of the .bat files you want to run will need this hack to get them to work, with the rabbitmq_service.bat file being the most involved to adjust.
editing that rabbitmq_server.bat file, you can see on about line 48 or so there's a check to see if the erl.exe is found, but the path isn't correct:
if not exist "!ERLANG_HOME!\bin\erl.exe" (
that path does not match the file structure for the 5.9.2 version of Erlang. I fixed this by simply removing this path check from about line 48 to 58, then, where the .bat actually makes a call to the erl.exe on about line 129 which reads:
"!ERLANG_HOME!\bin\erl.exe"
I simply hardcoded the path to my erl.exe:
"C:\Program Files\erl5.9.2\erts-5.9.2\bin\erl.exe"
With the pathing correct, the rabbitmq .bat files will run.
I had the similar issue, modifying ERLANG_HOME in .bat files did not work. Then I tried echo %ERLANG_HOME% in command prompt, that did not print the environment variable value(I could see that ERLANG_HOME environment variable has been created under advance system settings), that lead me to believe that I need to restart server for 64 bit installation of Erlang. After rebooting server, It worked like a charm. I hope this helps someone.
Just to share an up-to-date answer as of 2019: On Windows Server 2019, after setting up the environment variable, a restart is required to solve the problem.
I got into same kind of problem.
I solved it by doing three changes as given below.
Update Path variable "ERLANG_HOME" : "C:\Program Files\erl8.0" in Environment Variables.
Upadte "Path" variable "Path" : ";%ERLANG_HOME%\bin;"
Give urself FULL CONTROL permissions over "Program Files" in C drive.
It worked for me in this way.
This problem still occurs in Erlang 18.3 (erl7.3) and RabbitMQ 3.6.9 on Windows when upgrading from any older version of RabbitMQ to version 3.6.9. The solution as already stated here is to manually set ERLANG_HOME with 'setx -m ERLANG_HOME "C:\Program Files\erl7.3"' before starting the service.
What happens is that the RabbitMQ 3.6.9 installer removes the environment variable ERLANG_HOME from the system while removing the older version of RabbitMQ. Then, when it proceeds to the installation step, it does not put back the ERLANG_HOME variable. Then, the batch files that start up RabbitMQ cannot find Erlang. They try to find Erlang's home directory using "where.exe" but it always fails after an upgrade.
RabbitMQ's installer also does not kill all of the Erlang background processes, causing many of its files to be undeletable due to the Windows "file in use" problem. This leaves behind "files in use" in %APPDATA%\RabbitMQ and "C:\Program Files\RabbitMQ." These processes are "erl.exe," "erlsrv.exe," and "epmd.exe." The RabbitMQ installer should taskkill these processes after shutting down the RabbitMQ Windows service.
RabbitMQ is rather clunky on Windows.
Download Erlang or OTP - Only one Version of OTP should be installed
Download RabbitMQ installer
Install both exe file as Administrator
Set class path for Erlang. (Setting classpath is a bit troublesome, so follow these steps)
Set a new path with name ERLANG_HOME and value C:\Program Files\erl-23.1 (do not copy bin folder here)
Edit System "path" and add %ERLANG_HOME%\bin
Go to Start - Open rabbitmq command promt and run
rabbitmq-plugins enable rabbitmq_management
Navigate to localhost:15672
Use guest/guest to login
Interesting that this worked for you. There is record of a two bugs in Erl5.9.2 that cause an incomplete installation where %ERLANG_HOME%\bin is not installed.
Either of
* Installed 64bit erlang on 32bit machine
* "The program can't start because MSVCR100.dll is missing from your computer."
https://groups.google.com/d/topic/erlang-programming/wGtFLzapiQ0/discussion
Try 5.9.1 or any other version. They also mention making the future versions of the installer alert you if it fails.
I just had the same problem mentioned here. I installed otp_win64_R15B02 on a Windows 7 machine and everything worked perfectly, but I used the same installer on a Windows 2008 server and the bin directory was not created. I then uninstalled otp_win64_R15B02 and downloaded the otp_win64_R15B02_with_MSVCR100_installer_fix and the bin directory was created.
I suspect the reason it worked on my Windows 7 system is that I have Visual Studio installed and the required libraries were already available which allowed the otp_win64_R15B02 installer to work correctly.
Oh, and if you're installing Erlang to run RabbitMQ the RabbitMQ install will succeed with the broken installer but installing otp_win64_R15B02_with_MSVCR100_installer_fix after RabbitMQ will not work, just un-install and re-install RabbitMQ to resolve this.
Just give C:\Program Files\erl10.6\ not C:\Program Files\erl10.6\bin\erl.exe in the environment variable. If you open the server.bat file I came to know the issueenter image description here
I think this is encoding issue on windows.I see a correct value but I write echo %ERLANG_HOME% on console the value come with question mark. These steps fix it.
1.go environment variable window
2.edit ERLANG_HOME item
3.copy the value, open notepad and paste there
4.copy again on notepad and paste to edit window
5.apply and exit window
6.close command line tools and reopen
7.run rabbitmq bat file.
I solved it in a quick and dirty way,without naming path variables
I've opened the bat file and replaced every occurrence of
!ERLANG_HOME!\bin\erl.exe
with hard coded path for example might be diffrent path for you because of diffrent version
C:\Program Files\erl10.3\erts-10.3\bin\erl.exe
and replaced
%RABBITMQ_HOME%\escript\rabbitmq-plugins
with
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.14\escript\rabbitmq-plugins
Even I was this problem. The issue was the environment variable ERLANG_HOME=c:\Program Files\erl9.0 which was never existed.
I cross checked the path. The correct path was c:\Program Files\erl9.3.
After correcting the
ERLANG_HOME=c:\Program Files\erl9.3
the problem solved. So, definitely it is a path issue.
In my case, it should be installed erlang using admin role running
If above solutions doesn't work for you then you can try following
Find another compatible version of erlang for your rabbit mq e.g. for rabbit 3.7.x erlang version 20.3.x to 22.0.x all are compatible .
Right click newly downloaded erlang version and from properties select the option to unblock the file .
Run the erlang with admin persssion .
Re run rabbit mq exe

Resources