How to get Installshield to enter repair mode from Setup.exe? - installshield

Our installer has a setup.exe file which internally contains the Msi.
Once installed, the option to repair is available from the programs and features right click context menu.
However when repair is selected, a dialog is shown which gives the option to browse for the msi.
Since the msi is nested in setup.exe, and since the installer was not able to find any appropriate msi in appdata, this has rendered the repair functionality all but useless.
Is it possible to change the installer, so that it can repair from setup.exe?

You have three main options, depending on which scenarios you want to support:
Just double-click the setup.exe, and if the msi is already installed it will run in maintenance mode. You can select to repair it from there. This is good for a one-time scenario.
Run setup.exe with the /a argument, which creates an administrative installation point for the install. This can just be a folder on your desktop, or anywhere you like. This is also good for a one-time scenario, and should be compatible with launching repair from Programs and Features.
Configure your installation to cache the .msi package by using the setting in the Releases view. This should enable all maintenance scenarios for everyone, at the ongoing cost of some hard drive space.

Related

How to disable UAC programmatically to install a program by LE installshield for all users

I have an installation setup created by LE instalshield under VS2012. This setup.exe installs the application, registers some DLLs and activeX files and adds some registry entries as pointers to the location of an SQL server database. This application is to be run by all the users in a group policy created by the IT of their institution. The installation is done under the full administration privileges.
If the UAC of the win 7 is not fully lowered, some DLLs and OCXs are not registered (although the required registry keys are written in the MACHINE area of the registry without any problem!). So in order to avoid this I have to manually lower the UAC to its lowest level before running the Setup.exe. This solves the problem with the registration of DLLs.
But sometimes even though the installed program works for the installed login, it does not work for other logins within the same group/users. So how can I create a setup.exe under LEinstallshield that would 1) not require manual lowering of UAC, 2) install for all users under the same group policy?
Thank you for all your help.
You should be asking why your installer isn't compatible with UAC instead of asking how to disable UAC. If you are authoring a clean MSI using the registry tables (COM extraction) instead of using COM self-reg or other custom actions, it should just work.

How to create ProgramData folder with InstallShield?

Using InstallShield LE with Visual Studio 2013, dev and target machines are Windows 7.
How do I create a folder under ProgramData and place a file in it? I have a text configuration file that I need to put there so the user can edit it as needed.
[I know this isn't a forum for ranting, so use your imagination to insert some nasty non-family-friendly comments about InstallShield here.]
InstallShield is a Windows Installer authoring tool. InstallShield rants aside, let's talk about the Windows Installer pain of what you are trying to do.
Installing per-user components is a pain. It requires a repair in each user context to populate the file. It's very ugly and has issues such as source resolution.
There is an easier way. Install a "seed" of the file in [ProgramFiles]Company\Product or [CommmonAppData]Company\Product and when the user runs your program copy the file to the users ProgramData if it does not exist.
This way you keep it simple for the installer, only add a few lines of code to your startup and don't have to worry about MSI trying to "fix" the user config file when the user edits the content because the installer doesn't know anything about it.
Easy, heh? Application design and Installer design have to go hand in hand.

Enable 'Run as an Administrator' for Windows 7/Vista application (VS2012/InstallShield2013)

I'm using VS2012 & InstallShield2013 to generate installer file.
Some of the installed user couldn't run this application on WIn 7 OS. But they can get into the installed directory
and right click 'Run as an Administrator' it works.
The icon on the desktop, when i right right click there is no option like 'Run as an Administrator'.
I checked in the InstallShield directory C:\Program Files\InstallShield\2013LE\Support\
There are three files:
SetupExe.Admin.manifest,
SetupExe.Highest.manifest,
SetupExe.Invoker.manifest
So I followed this article : http://helpnet.flexerasoftware.com/installshield20helplib/Content/helplibrary/SpecifyingRequiredExecution.htm
and selected Required Execution Level 'Invoker' and Include MSI Engine:yes in the 'Release Setup /Single Image'
How can i enable the option to right click 'Run as an Administrator'?
It's important for me to fix this problem, for the users of Win 7 32/64 & Win Vista.
I'm totally confused about these files. Please help me.
The settings you reference in InstallShield will not affect how your application itself runs; instead they only change the privileges setup.exe requires when launched.
As for your application, there are a number of potential moving pieces that can affect whether the "Run as administrator" option shows up in the context menu in Explorer:
If the exe referenced by the shortcut has a manifest that requires administrative access, it will always run elevated, and the Run as administrator option will not appear
If the exe referenced is detected as an installer, Windows may choose to act as though it has a manifest requiring administrative access, and thus the Run as administrator option may not appear
If the Program Compatability Assistant (PCA) has decided the program needs administrative access, ditto
If the shortcut's compatibility settings have been modified to select "Run this program as an administrator", ditto
If UAC is disabled, Explorer may choose not to show Run as administrator
Some of these scenarios may persist across uninstallation and reinstallation; Windows can be very aggressive in its attempts to improve the end-user experience. However in all these cases, the end result is that your application would launch as an administrator.
If you always require administrative access in your application, you are strongly advised to implement the first of these: embed a manifest that includes the requiresAdministrator setting. This is equivalent to what the settings you reference change for setup.exe, but must be done in your application's executable.

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