I have a software. It has GUI setup for windows and CLI install.sh for linux. On execution it asks user to accept license and on acceptance it asks for installation location, key, server ip, port, and a couple more option one after the other. I want to make the installation unattended so that the user double click a file and the next step is software installed. Any suggestions, thanks in advance.
The answer depends on what InstallShield project type you are using. I highly suggest Basic MSI. InstallScript custom actions are OK but don't use an InstallScript or InstallScript MSI project type.
Assuming the above, you create Secure Custom Public Properties so they can be passed at the command line. You also create custom dialogs so that the values can be entered during an interactive installation. Then you create validation custom actions that can guard against bad data in both scenarios. Finally you use the properties in Registry, INI, XML et al system changes so that they can be applied where needed for your application.
Your silent install then looks like:
msiexec /I foo.msi /qn INSTALLDIR=C:\FOO KEY=12345 SERVERIP=10.0.0.1
PORT=12345 /l*v install.log
Also be sure to understand the concept that properties aren't persisted automatically by MSI. You'll need some AppSearch/System Searches to retrieve the stored values for reuse during upgrade / patch / repair scenarios.
What you need is called Silent mode. Check your installation system's manual for this keyword.
Many installation systems support it - I can recommend you to use NSIS (/SILENT parameter) or Inno Setup (/SILENT, /VERYSILENT) if you did not started with creating your setup yet.
These are free (open source) installation systems and they are really powerful.
Be careful with this feature - many users are confused when they click the application icon and nothing happens (no window opens).
Ok I did this using expect tool (free). Here install.sh is the file I want to execute automatically and send are my options in response to the questions it asks during installation. Let me know if any problem following this.
!/usr/local/bin/expect
spawn "./install.sh"
set timeout 2
expect {WARNING: It is strongly recommended that you install RVS as root. Do you wish to run the installer as root [Y/n]}
send "Y\r"
send "xxxxxx\r"
expect {Press enter to read the License Agreement:}
send "ENTER\r"
expect {Do you accept the License Agreement [y/N]?}
send "y\r"
expect {Where do you want to install the tools [/usr/local/pkg/RVS/v3.1a]?}
send "ENTER\r"
expect {Where do you want to create links for tools [/usr/local/bin]?}
send "ENTER\r"
expect {Where do you want to create links for libraries [usr/local/lib]}
send "ENTER\r"
expect {Which license type do you wish to use [N/f/a]?}
send "f\r"
expect {IP address:}
send "1.1.1.1\r"
expect {Port:}
send "33\r"
expect {SERVERKEY}
send "xxxxxxxxxxxx\r"
expect {Do you want to install support for GNAT Pro {6.0, 6.1, 6.4} (You need a GNAT Pro license in order to use this feature) [y/N]?}
send "y\r"
expect {Proceed with the installation [Y/n]?}
send "y\r"
spawn "rvsinfo"
interact
Related
I am using SIFLess to install Sitecore 9.1 Update 1 on my local machine in order to get started with development with my team. However, the install is not creating certain databases on my system that are needed to get up and running, most notably the Reporting database. This of course causes problems when I deploy code from my team's repo to my local instance as it references these databases. I see that the SIFLess-generated PowerShell script has calls to a 'RemoveDatabase' function that references these databases in the uninstall method, but no code to create them in the first place during an install. The missing databases are:
MarketingAutomation
Messaging
Processing.Pools
ProcessingEngineStorage
ProcessingEngineTasks
ReferenceData
Reporting
Xdb.Collection.Shard0 and 1
Xdb.Collection.ShardMapManager
These are what I have gleaned from the uninstall logic in the PowerShell script generated by SIFLess. Again, no logic exists to create them in the first place in the install section. My team members all have these databases on their systems. What am I doing wrong? I am a Sitecore novice here.
Please make sure you are using the good package. You have to download the XP package, not XM. (Just to be sure here). Afterwards, the Database installation are done with DacPac found within the Sitecore Web Deploy Package ( *.scwdp).
Please, also make sure that within this scdwp you can see (can double click or extract) the database missing :
MarketingAutomation
Messaging
Processing.Pools
ProcessingEngineStorage
ProcessingEngineTasks
ReferenceData
And do the same with the xConnect SCWDP, and make sure you see the databse missing there :
Xdb.Collection.Shard0
Xdb.Collection.Shard1
Reporting
Sometimes, if you have tried the installation script more than once, you can have some undesired behavior. You are possibly trying to go forward with the wrong certificates. Also, some services were actually created on previous installation attempts.
Here is what I think should help you get through.
Clean your workspace
Remove your databases that are related to the installation if exists.
Remove your certificates (using certlm -> you can type in your windows search bar "cert" and then you should be able to pick "Manage computer Certificate".
On the left sidebar, Click on Personal > Certificates.
Remove your installation-related certificates
nameOfYourInstallation.identityserver
nameOfYourInstallation.sc
nameOfYourInstallation.xconnect
Open your Windows Services Manager (you can type in your windows search bar "services" and select the services app)
You should be able to see those services :
Sitecore Marketing Automation Engine - nameOfYourInstallation(might be one of your previous install)
Sitecore Processing Engine - nameOfYourInstallation
Sitecore XConnect Search Indexer - nameOfYourInstallation.
Write those down. Keep your service app open.
Using NSSM (probably installed already from some of your previous installed, if not, can use chocolatey ( https://chocolatey.org/packages/NSSM ) remove those services.
in a cmd : nssm remove serviceName
Note that you can remove them by right clicking etc. I just prefer the nssm way.
When its done, restart your computer (some services and in a state of removal, that needs a restart to be completely removed)
Try to install again.
Hope it helps, cheers !
Having the latest version 4.1.5 of ICXT for HCL Connections installed on WAS 8.5, I need to change some properties. The installation instructions said that we have a icxt-install.properties for installation, where we can set them. But it seems only possible during installation, not to change values which were already set.
How can I see what values are currently set and how to change them?
Backgrund
It's an ICXT installation without PDF export functionality, because this wasn't needed yet. But this has changed, so I want to enable it and develop some templates for our users. The selftest on https://cnxhost.internal/ic360/ui/selftest.html says
Is wkhtmltopdf installed? no
According to the documentation, I unpacked the binaries to ${CNX_SHARED_DIR}/icxt/pdfexport and restarted the WAS Appserver where ICXT is installed. But it's still not working. I assume that a predecessor admin or dev of mine changed this location, so I'd like to make sure that it points to my desired ${CNX_SHARED_DIR}/icxt/pdfexport path.
The script ${ICXT_INSTALL_DIR}/icxt-prepare.sh creates WebSphere Resource Entries. But just once during the installation. So we couldn't change the properties and re-run the script, as I assumed. To change it, open WebSpheres ISC web console and navigate through Resources > Resource Environment > Resource Environment entries
Now click in ic360
and Custom properties
Now you see a list of all the properties which were set by the installer. If some values were wrong (in my case wkhtmltopdf.command.exec), click on the entry and change the value field.
After conforming with OK and save, we need to restart the Appserver where ICXT is hosted in. If you don't know, look at the WebSphere enterprise applications, open any IC360 app and look in Manage Modules. In my case its CustomApps, which we can restart in Server > WebSphere Applicationserver.
Now reload the self test page and we see the wiki module check working fine:
I am new to WinSCP and am attempting to create a script file that will eventually be used with SSIS to download files from an SFTP site. A lot of the literature WinSCP includes explains the file downloading or uploading portions. For the time being, I just want to create a script to test the connection first and will build from there.
So far I saved the connection in WinSCP and have the following. The below code does not seem to function at all and I am not sure where else to go as I am still reading about the scripting for WinSCP. Is there a way or can someone point me in a direction to see if I am in fact connecting via through the script?
option batch on
option confirm off
open username#address
exit
Not sure what SSIS is (sorry) but I can tell you how I'd set it up from a windows batch file if that helps:
If you are open to using a different software, consider using cygwin. It mimics a linux shell so linux users on windows have a lot of linux utilities handy. That being said, there are some commands which can run on windows straight from command prompt (and thus batchable). What you'd need to do:
1) install cygwin
2) Create a "passwordless" login (using ssh-rsa authentication). To do this start your cygwin terminal and use the commands "ssh-keygen" and "ssh-copy-id" (more on that later)
3) Now you can run "sftp" from the DOS command prompt (does not require cygwin terminal) and sftp to your account. No password required because of step 2).
A few follow up info:
What can run from dos command prompt and what must be run from cygwin terminal?
If you go to the "bin" directory of cygwin (for me it's in c:\cygwin\bin) you can see all the cygwin utilities. Anything with "exe" extension can be run from dos command prompt. If no "exe" extension, must start cygwin terminal first
How to set up ssh-rsa authentication?
You can pretty much google "ssh login without password" and pull up a lot of results. This is common for setting up login from one linux system to another. You would be using the same steps using cygwin on windows. My instructions are here:
http://geekswing.com/geek/unix/how-to-ssh-login-without-a-password-using-ssh-keygen-quick-tutorial/
Storing session settings in WinSCP GUI and trying to access them from WinSCP script running in SSIS is generally a bad idea. I believe there's no example or guide on WinSCP site that would suggest doing that.
WinSCP stores its configuration in registry in HKEY_CURRENT_USER hive. The SSIS typically runs under a dedicated system account, that have its own HKEY_CURRENT_USER hive, and won't see the GUI configuration.
For details see WinSCP FAQ about your problem:
https://winscp.net/eng/docs/faq_scheduler
The best you can do is isolate your your script from configuration by using the session URL with the open command, instead of the stored site name.
See also https://winscp.net/eng/docs/scripting#configuration
Your actual problem can be completely different though. But that's hard to guess as you have not shared any details, such as error message, log file, etc.
I'm using WiX 3.5. Recently, the following WiX error started occurring frequently on the build server:
light.exe (,): error LGHT0301: Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/#Codepage, Package/#SummaryCodepage, Product/#Codepage, or WixLocalization/#Codepage; or make sure you provide the path to a valid Windows Installer database.
Which "database" does the error refer to? (None of the WiX source files have changed in a long time, so I doubt it's a code page problem.)
Other people have reported that this error may be caused by Trend Micro Office Scan, which is indeed installed on the build server. I asked the system administrator to exclude the build directories from the scan, but this error still occurs. How can I determine whether the virus scanner is the culprit? (The error doesn't always occur, so if I disable the virus scanner and the next build succeeds, I still don't know whether the error has gone away permanently.)
The "Disable the ICE validation" worked for me - just a setting through Visual Studio 2012 in the .Setup.
After studying the WiX source code and running Process Monitor, I found that excluding the build directories from the virus scan is insufficient.
Explanation: When light.exe runs, it creates the target MSI file in a temporary directory. (This file is the database that the LGHT0301 error message refers to.) After light.exe closes the MSI file, ntrtscan.exe opens the MSI file for read access and read-only sharing. Later, in the database validation step, light.exe tries to reopen the MSI file for read/write access, and a sharing violation occurs.
Solution: Exclude the temporary directory from the real-time virus scan. On Windows Server 2008, for example, this directory is C:\Users\«username»\AppData\Local\Temp.
This is a common problem with build processes and antivirus. The scanner will detect the new MSI package and try to scan it. Meanwhile the build process also tries to validate it by running the Internal Consistency Evaluators (ICE) suite and you get a failure because the database has a mutex on it.
You should just remove the virus scan from your build output folders. Alternatively decouple the validation from the Light command so that the antivirus scan relinquishes the MSI handle before you run the ICE validation.
I had the same problem which was actually really related to codepages and language settings of my system.
Adding English input language in Windows' regional settings solved the problem on my German Windows installation.
The real cause was Trend Micro real time scanning!
(The following is only for historical reference)
I followed #Michael Liu answer and solved the problem
I had the same problem.
I am not referring to Codepage (or SummaryCodepage) in any of those tags, or in fact anywhere in the WXS. Putting Codepage="1252" didn't change anything.
Finally, I tried adding
encoding="utf-8"
to the XML tag which previously only had a version='1.0' attribute. This fixed the problem, as described in "Failed to open the database" error. - SOLVED
It was also the antivirus program for me.
An easy way to check if the problem is related to the anti-virus program is to disable the ICE validation in the WiX project setting (using version 3.7). This worked for me, and is a permanent setting now, since in our company you can't change the setting of the antivirus software.
This is the most common error I found while using WiX. The easiest solution for this is go to Properties of your project → Tool Settings → (Check) Suppress ICE Validation.
I am using jenkins as my CI server for my .Net based project. I am using MS-Build plugin to build project from jenkins. It is working as expected, it sends an email when build gets failed. Now I also want jenkins to send email when build has warning in it. I could not find any plugin which provides this functionality out of box.
So I tried to use "Extended Email Notification", "Console Output Parsing" plugins. But it does not give me expected behaviour. Currently what I have acheived is sending a mail when warning occured. I mark build as unstable using "Console output parsing" plugin and send email using e-mail notification. But e-mail does not have details about warnings.
I came across few articles where it says we can use groovy script or jelly script and "Extended Email Notification" plugin to send details. But I don't how to fetch details of warning from parsing plugin. Can someone point me to correct resources or guide me to acheive this?
Look for
https://wiki.jenkins-ci.org/display/JENKINS/Text-finder+Plugin mark Build as "unstable" by parsing of log files. You can run downstream Jobs(if you have) also after "unstable" builds --> see job config. Status "unstable" is the "gray area" in Jenkins but has yellow color.
https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin sends E-Mails also for "unstable" builds with text extracted from build log files.
Jenkins is based on the assumption that a specific build (or "run") can either be "good" or "bad", hence the two-color scheme - there is no "gray area" for that matter.
Having said that, there are plugins to allow for a third state of "unstable",
which is also supported by the triggering mechanism.
Take for example the Text-finder Plugin or the Log Parser Plugin -
both will allow you to search keywords in files you specify and use that to downgrade a 'successful' build
to 'unstable' or a 'failed'.