Run an msi silently with arguments - command-line

I have created an msi which has 4 dialogs.
All 4 dialogs have single button like this:-
1st dialog :- Next Button (Text on Button :- Next)
2nd dialog :- Next Button (Text on Button :- Next)
3rd dialog :- Install Button (Text on Button :- Install)
4th dialog :- Finish Button (Text on Button :- Finish)
I want to run this msi silently through Command Prompt.
I checked solutions on net which tells this command:-
MyMsi.msi /quiet /qn /norestart
But i want to know, how can i specify next button click through CommandPrompt so that silent install goes on.
Please help.
Thanks in advance.

You cannot specify button clicks from the command line. However you can specify properties:
If there are any text edit boxes, check boxes or radio buttons, they will be associated with a property, and you can specify the property's value using a command line argument of the format PROPERTYNAME=DesiredValue.
If you can select features in your wizard, there are special properties, including ADDLOCAL, that you can specify to tell Windows Installer to select (or unselect) a list of features.
Directories can also be specified, if they're public (no lower case letters in their property names.) So if you can change the installation location, this is typically tied to a property named either TARGETDIR or INSTALLDIR, but it could be a different property depending on how you authored your package.
If, for example, there are custom actions that fire during the InstallUISequence, but not elsewhere, and are required for your package to install correctly, you should fix the authoring of your package to not require this. Otherwise it will not support silent installation.
Finally, if all your wizard pages are merely informative, then using merely /qn or /qb (aka /quiet or /passive) will be enough. This is often enough for a default installation.

I am able to do this like this:-
MyMSI.msi /QN
it will run the MSI in a silent mode and it will consider all the button clicks itself and go ahead and complete the installation.

Related

Why does a right click sent from pywinauto not change the state of the grayed out connect button in informatica, but a real mouse button click does?

I am trying to write a script using pywinauto to open a repository in Informatica powercenter workflow manager (v9.6.1)
After the below lines are executed, I get the context menu with the connect option as in the screenshot. Also notice the 'connect' button on the toolbar stays grayed out. If I use the actual mouse and click on the treeview item for the repository I want to connect to, the connect button turns green and enabled. But not when pywinauto sends the right click.
from pywinauto.application import Application
from pywinauto.keyboard import SendKeys
import time
app = Application().Start(cmd_line=r'C:\PowerCenterClient\client\bin\pmwflmgr.exe')
informaticaworkflowmanager = app[u'Informatica::WorkflowManager']
informaticaworkflowmanager.Wait('ready')
time.sleep(2)
systreeview = informaticaworkflowmanager[u'TreeView']
tree_item = systreeview.GetItem([u'Repositories', u'REP'])
tree_item.Select()
tree_item.Click(button='right',double=True,where='icon')
I tried using SendKeys to send 'c' followed by {ENTER} and it just returns without doing anything. Also if I use the actual keyboard on the right click context menu generated after the above pywinauto steps run- it selects the connect menu when i press c , but it just doesn't do anything when I press Enter. I think somehow the connect function is not enabled.
I am clueless if any other input is required by the application to enable it. I also tried using the informaticaworkflowmanager.MenuItem(u'&Repository->&Connect...') option but to no avail- it says it is disabled.
Any pointers to help get pywinauto to open a repository are welcome!
Just summarizing the comments...
First try running the script as Administrator. If it doesn't help, use method click_input(). It runs real click like a user does. Method click() sends WM_CLICK or BM_CLICK which is probably not handled by the app in grayed button state.
If you run the script as Administrator, it should inherit privileges for child process by default. There is no special flag in method start() because some functions may not work if target app process has higher privileges. Anyway elevation usually requires confirmation from user and this Security Confirmation dialog can't be automated by OS design (even click_input() with hard coded coordinates won't work while this dialog was shown, I checked it a while ago).

Edit Default rules from script in Beyond Compare

I have two files which I compare using Data Compare and I want to edit default rules from the script. I tried manually from BC interface and it worked, but I need to manipulate the rules within the script.
This is my script so far:
data-report layout:side-by-side &
options:ignore-unimportant,display-mismatches,line-numbers &
output-to:"%3" output-options:html-color "%1" "%2"
Any ideas how could I do that? I am using Beyond Compare 3.
Thanks in advance.
Beyond Compare doesn't support editing Data Compare session settings with a scripting command.
As a workaround, open a graphical Data Compare session. Click the Rules toolbar button (referee icon). In the Columns tab, edit the column settings you want to use in your script. Change the dropdown at the bottom of the dialog from Use for this view only to Also update session defaults before you click OK. The modified default session settings will affect your script.

How to change value in property file which is part of Installation tree

I am trying to create installer for desktop application using Install4J. I have correctly selected the directories which should be part of installation tree.
In that directory, I have one property file say db.property which contains db password and url and other details. In installer, I have provided screen where user can enter all db details which should be changed in db.property file.
In installer, I want this property value setting screen first and then Installation should start. If I set Installation option first (in Installer section) and then value selection screen, it change the value but if I set value screen first and then installation then it doesn't.
My understanding is: If installer run first so value setting screen found db.properties as it got installed and change value but if value setting screen first set so it could not found property file as it is not installed yet and could not change value.
If my understanding is proper so what can be the workaround to achieve this?
Thanks in Advance
You can ask the user for input in screens before the installation screen. Related actions, such as an action that modifies a property file, should be added to the "Installation" screen, after the "Install files" action.

Special keys in Eclipse Issue - IDE always asks for confirmation

Last days I have an issue with eclipse when I press special keys inside the eclipse
IDE.
e.g when I press Ctrl+C
then a small window appears on the bottom right corner of the IDE which
is like this:
Copy | Ctrl+C
The same is for other keys.. I got:
Inline Editing|Enter (when press Enter)
Paste|Ctrl+V (when Ctrl+V)
It is really slowing down typing because it gets the focus and need confirmation clicking
on the right part of the small window.
Does anyone know how can I fix it?
Thank you!
The pop-ups you are seeing are the "keybinding conflict" popups. These are common when you have two different plugins defining the same keybinding and looks like these. This may happen if you installed some plugin which attempts to override the default bindings.
You may investigate your current bindings using "Window>Preferences>General>Keys". Enter the binding (eg. "Ctrl+C") in the filter field (it has "type filter text") and see all the commands that have this key combination bind to. If you have two different commands with same "When" parameter, then there's a conflict.
You may "unbind command" and then bind it again. Or try using "Restore command" button.
Also you may try to un-install the ill-behaving plugin, if you don't need it actually.

install4j: how to disable the option for a second install on an update

I created my first installer with install4j. Now I tried an update of my application, and it works, but I am asked if I want to make an update or an additional installation.
I only want the option for update. How can I do this?
Thanks,
Christian.
Disable the "Alert for update installation" property on the "Welcome" screen of your installer and use
context.isUpdateInstallation()
in condition expressions to hide certain screens (for example the "Installation location" screen)