msi silent installation. There is still dialog UI appears after the installation - dialog

I use silent installation for msi product using command line. When the installation finishes, there is an information wizard dialog appearing. My problem is why does that dialog appear even though I used silent installation command. The silent installation in my case handles only the next button prompts. Is there someway to also handle the last information dialog that appears after installation. the command I used for this is (msiexec /i Product.msi /qn )

If you ran the msi with /qn and still saw a dialog appear then the UI isn't coming from MSI it's coming from a custom action. It is a violation of best practices to author UI to appear in a silent installation but odds are the person who wrote the MSI doesn't know that and didn't test the silent install.
The only thing you can do is examine the MSI using ORCA and create a transform to eliminate the custom action. I can't tell you exactly how to do that because I would need to look at the exact MSI to know what needs to be changed.

Related

InstallShield partially removes program after cancelling its removal

I've got an Installscript MSI project that's behaving a bit oddly.
Following a successful installation, if I launch the installation file again, I get a pop-up with a question:
"Do you want to completely remove the selected application and all of its features?"
This, of course, is the expected behaviour.
If I select "No", the "InstallShield Wizard Completed" dialog is displayed, and it notifies me that "The wizard was interrupted before [the application] could be completely installed."
Again, this is all within expected behaviour.
The unexpected bit is that after closing this dialog, the application is partially removed from my machine. The installed files and registry keys are still present, but it no longer appears in Windows' "Apps & features", and if I run the installation file again it starts a new installation, as if the application had never been installed.
I tired enabling maintenance mode, but to no avail. Cancelling the maintenance dialog triggers the same partial removal.
Any clue what's going on here, or ideas to fix this?
I have also faced this issue when long back I was working on InstallShield scripting.
The unexpected bit is that after closing this dialog, the application
is partially removed from my machine. The installed files and registry
keys are still present, but it no longer appears in Windows' "Apps &
features",
Have you implemented the uninstall script functions in your installscript for uninstalling or updating the installation? You may look into these functions and verify the logic for those particular features or components.
and if I run the installation file again it starts a new installation,
as if the application had never been installed.
In the installer folder, where you have your installshield setup.exe, you have TEMP folder in that folder you have "Installation.ini" file, there it tracks the instances it has installed with that particular name.
So it might be because installshield is removing the entry from installation.ini file and when you are trying to install the same package again you are able to do this.

How to know if user click in "Cancel" UAC during initialization?

I have a NET Framework 4.5.2 in Inno Setup wizard, and i have a problem with Windows 8.1:
My C# application verify if Windows have NET Framework 4.5.2, and if dont, we call the instalation generated by Inno Setup and install with Silenty/Hidden options.
The problem is, if the user are not admin, and a UAC window open asking if he want do execute or not the application (from Inno Setup). If user click on cancel, how i can know that the instalation dont have finished or dont even started ?
Theres a way to know if he have cancel without looking if NET Framework are in registry/regedit ? I say that, because on Windows 8.1 the Release version from NET Framework are only updated after reboot the system.
Inno Setup-made installer returns exit code 2, when it did not finish for whatever reason (including UAC cancel).
Though I'm not sure why you need to check for UAC cancel specifically. You want to know, if the installation failed for any reason, right? So check for any non-zero exit code.

Completely silent mode for Installscript installation

I have an installscript projects which accepts some prefined command line arguments. Depending upon the arguments passed to it, certain features are selected and installation is performed.
I want this installation to be without any User interaction, even the dialogs should not be visible on the screen like we have /qn mode for msi installation.
How can I achieve it for installscript project.
You can construct a command line based on the information found here: Installshield Setup.exe Command line settings.
Some Installshield Installscript setups need a response file created to run silently, and even then there might be cases where it doesn't run entirely silently. This is just how this project type works. Response files are created by running Setup.exe with the /r option.
More information here.

InstallShield 2012 - prerequisites

Is there any way in InstallShield to show the prerequisites which is being redistributed along with the setup.exe are already installed on the target system, like the image below, which shows what is pending on the target system. What if I want to show that this is already installed?
There's nothing in the UI that shows this. You can run setup.exe /debuglog and read through it to figure out what was skipped:
Q105473: INFO: Setup.exe Command Line Parameters
FWIW, I get in the habit of also implementing the check in the MSI ( AppSearch / LaunchConditions tables ). This way if the setup.exe is bypassed and the MSI directly invoked you'll still make sure to not get into a bad state of missing prereqs. If this is too much work for you, you can use the SETUPEXEDIR property to enforce that the MSI was launched by setup.exe.

Install errors in InstallShield 2008 Premier Edition

I have a setup which has been created using InstallScript MSI project type. This problem is encountered by our client and he wants a quick solution.
Let's assume I have initiated the installation from a path like
C:\Setup_V_1.0.0931.1
Inside this folder I have Setup.exe through which I will install the product. After installation or after some days pass I will change the path to:
C:\New\Setup_V_1.0.0931.1
and this time I want to modify the setup. Actually we are supporting 3 features: Server, Client and Service.
This time I want only Client and not Server. So I will click on the Setup.exe or click on Uninstallation Icon in the Startup Menu which will lead to Maintenance Mode there you have an option to Modify, Repair or Remove. I choose Modify and select the feature, but as the installation progresses, this error message will pop up:
Setup could not find a file on the specified path or Disk. Please check
that the proper disk is inserted or specify a new path. Unable to
locate file c:\New\Setup_V_1.0.0931.1\setup.msi
Then, another popup will be shown saying:
Error: 1706. No Valid Source could be found for product. The Windows
Installer cannot continue.
The next error message is:
Error: 1603. Fatal error during installation. Consult Windows Installer
Help (Msi.chm) or MSDN for more information.
But if I change the path to its original location, it works fine.
How can I solve this?
I event checked in this registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\{Product-Key}
This key contains a lot of information inside InstallProperties. There is a key called InstallSource and its value is C:\Setup_V_1.0.3909.1\. Even after changing this value installshiled is still showing errors.
I found the same registry information for Uninstallation Information:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Product-Key}
In your properties change ReinstallMode (or maybe Reinstall I forget which) from omus to vomus
the v means cache your install, so it will put your .msi file in c:\windows\installer so it can be used later.
When installing a MSI, Windows Installer saves the original MSI path in registry (the InstallSource entry you mentioned). When running the MSI in maintenance mode, Windows Installer will use this path to find the installation data (CAB files).
When you move the MSI, the path stored in registry is no longer valid, so Windows Installer cannot find the installation data.
A possible solution is to use "Add or Remove Programs" or "Programs and Features" in Control Panel to modify the installation. This way the cached MSI is used.

Resources