Installshield 2014 Basic MSI Hide features dynamically not installing features - basic-msi

I have created a Basic MSI Installer using InstallShield 2014 for a server/client program and have to hide features dynamically based on the License Key of a database that is installed prior to our Server app being installed. I have created conditions for the features that need to be hidden, setting the InstallLevel to 0 if they are not licensed and 1 if they are licensed. I am getting the license key after the SQL Login dialog (because the installer wouldn't know what database to look in otherwise) but conditions are evaluated during the CostFinalize action, which runs before the dialogs are created. So after I get the license key and run some other custom actions to determine the availability of each feature, I call the CostFinalize action before the CustomSetup dialog is shown.
I am getting the correct behavior for the features that need to be shown, and you can select or deselect said features in the dialog, however, when the installation executes, the selected feature is not installed....and the log file says that the feature is not selected for install, even though the user clearly selects it. Why would this be happening? Is there another approach to hiding features dynamically (I have tried the FeatureSetData function in an InstallScript action, but to no avail)?
Also, after I added the conditions to the features, whenever I try to uninstall the program from the Programs and Features app, I get an Error 1606 Could not access network location. It's like the registry key gets messed up when there are conditions on the features...Any help would be greatly appreciated.

I found the problem...If you set the features InstallLevel to 0 to start with and have a condition that sets it to something greater than zero, then it will not install the feature, regardless of whether it's selected. If you invert this logic and start with the features InstallLevel set to 1 and have a condition that changes the installlevel to 0, it will hide or show the feature AND it will be installed properly. This also caused the error 1606 I was getting on the uninstall...
Also, if anyone ever has components that get installed that aren't supposed to be installed, then you might try switching the Dependency Checking to none. For some reason, the .NET dependency check that InstallShield does causes certain components to install all the time, even if their assigned feature is turned off. Hope this helps someone in the future.

The CostFinalize can also be run by a dialog to refresh the feature list. Here are the steps:
In the Next PushButton of the SetupType Dialog, create a new item at the top.
Event: DoAction
Argument: CostFinalize
Condition: 1=1
In my case, I was hiding a feature based on a previous dialog and needed it to reevaluate conditions in the Program Feature.
Condition: Level:0 GLOBAL_VAR=0
Condition: Level:1 GLOBAL_VAR=1

Related

Vaadin: How do I get rid of vite?

The description of "Vite" was tempting and I was stupid enough to enable this new feature. Since then I am stuck with endless UI recompile loops! I.e. each time after I logged into my application the frontend gets recompiled AGAIN and the application restarts. ||-(
Disabling Vite in the lower right control-dialog is not accepted, it remains activated. How do I get rid of this unbaked feature again?
This is using Vaadin 23.1.7 and Java 17.
In Vaadin 23.1 you can remove the feature flag by deleting it from src/main/resources/vaadin-featureflags.properties.
Note that Vaadin 23.2 uses Vite by default. If you want to continue using Webpack going forward, you need to instead add this feature flag to the properties file:
com.vaadin.experimental.webpackForFrontendBuild=true

Can I disable Driver Signature Enforcement on Windows 7 and 10 programatically

I have an EV certificate for signing drivers etc.
As of July 2021 however Microsoft has decided to stick their nose in and require all drivers (.sys etc) to be submitted to them for dual signing.
It is quite a task to do so and as of right now their partner website has a bug when creating a new account and this has been dragging on for the past 3 weeks.
Anyway my question here is, can I temporarily via a Registry change or whatever, disable the Driver Signature Enforcement process.
I did find one article that stated the following ;
Type the command: bcdedit.exe /set nointegritychecks on and then press Enter to run the command.
I do not want to use that method as it is manual and does not seem to work for me.
I also saw the following which I tried ;
2. Look for: [HKEY_CURRENT_USER\Software\Policies\Microsoft\Wind ows NT\Driver Signing]
3. Change the BehaviorOnFailedVerify key value to "0" for ignore, "1" for getting just warning mesage and "2" to block completely.
This does not work either at all.
The only thing that works for me is to disable via the usual F8 process.
Has anyone had success or seen a way of disabling the Driver Signature Enforcement programatically ?
Is there a way of hooking into that F8 process perhaps whatever it happens to be doing ?
Thanks

Detecting Quick Access command state

We have an application that is using Windows Ribbon Framework for an UI. The app itself is written in Delphi and uses Windows Ribbon Framework for Delphi to interface with the ribbon API.
Our ribbon XML places few commands into the Quick Access toolbar. Use can then remove/add commands either by using the built-in ribbon mechanism (selecting the drop/down button and clicking on a command name) or by selecting More commands command which opens the configuration dialog.
The problem I've encountered is that I cannot find a way to get the current state of commands in the QA collection (whether they are visible or not).
In the example above (picture) I would like to detect that first five commands are checked and that the last is not so I can prepare the configuration dialog accordingly.
I have no problems enumerating the IUICollection and accessing the items stored inside. I can also get the UI_PKEY_CommandId for each item. I cannot, however, find a way to read the checked/unchecked state. I tried reading UI_PKEY_BooleanValue and UI_PKEY_Enabled for all items in the collection, but they do not return that state.
I have also tried to monitor IUICommandHandler.UpdateProperty but it doesn't get called when such item is checked/unchecked (except that it is called with the UI_PKEY_Label key).
Does ribbon API even support this functionality?

Windows installer self-healing using ProvideComponent

I have an application(app1) that uses another application(app2)'s DLL to do some things. The problem is that I need to have some current user registries set for the DLL to work. If I call app2 from the advertised shortcut it will invoke windows installer self-healing and populate its registries. However if I've just installed app2 from another user,logged in for the first time, and used app1 it will fail as the DLL will not have it's registries populated.
With this in mind I tried to use the Self-Invoked Resiliency method to trigger MSI self-healing.
The "HKCU" feature is the top feature containing a single component "HCKURegistry" which only contains registry keys. The keypath for the "HCKURegistry" component is a key in the HKCU hive.
I'm using Delphi XE3 and here is the line of code:
szProductCode :='{293A0959-6ECF-4026-929B-ECC777934525}';
szComponent:= '{45282475-634F-4222-81BA-030FA63703BD}' ;
MsiProvideComponent(pwidechar(szProductCode),pwidechar('HKCU'),pwidechar(szComponent),INSTALLMODE_DEFAULT, lpPathBuf,#pcchPathBuf);
When, however, my app1 executes this line the Windows Installer displays a windows installer "Preparing to install..." window and stays like this forever. If I click "Cancel" it says "Canceling..." and stays like this until I kill the app from the task manager.
The Event log shows two items:
Detection of product '{293A0959-6ECF-4026-929B-ECC777934525}', feature 'HKCU', component '{45282475-634F-4222-81BA-030FA63703BD}' failed.
Detection of product '{293A0959-6ECF-4026-929B-ECC777934525}', feature 'HKCU' failed during request for component '{45282475-634F-4222-81BA-030FA63703BD}'
A possibly relevant information. When I trigger the self healing the normal way I get the same two lines but the second one has additional sentence (the keypath registry key for the component):
Detection of product '{293A0959-6ECF-4026-929B-ECC777934525}', feature 'HKCU', component '{45282475-634F-4222-81BA-030FA63703BD}' failed. The resource 'HKEY_CURRENT_USER\Software\MyData\SomePath' does not exist.
I moments of desperation I tried using:
res:=MsiReinstallFeature(pwidechar(szProductCode),pwidechar('HKCU'),REINSTALLMODE_USERDATA);
And swapping INSTALLMODE_DEFAULT for REINSTALLMODE_USERDATA in the MsiProvideComponent call. Both behaved differenty in that they did not put anything into the Event log. Otherwise they both stuck in "Preparing to install..." just as the original call...
I'm stuck on this for a while now. Can someone spot what I'm doing wrong?

Can I hide selected area/iteration nodes in TFS 2010?

In order to make sure that obsolete versions of the product aren't selected for a work item's iteration, I would like to be able to cloak certain iteration nodes from view, when opening a new work item.
For example, if the current production version of my site is 3.5, and 3.6 and 4.0 are in development, I want to make sure that when a user creates a new work item, versions that are older than 3.5 (e.g. 3.4, 2.7) will not be selectable.
I can conceive of a way to do this creating a custom control, but I'd like to avoid those, as they'd require development of both desktop and web controls, and would have to be deployed to all users.
Any ideas, directions, or just an "it can't be done", would be appreciated.
Thanks,
Assaf.
I am not sure if you can hide it as a selection.
However you can set the security for "Edit work items in this node" to deny and they will not be able to save workitems with the area or iteration selected.
I'm 90% sure it can't be done.
I haven't tried this myself:
Along the line of access control, I believe if you deny "View this node" permission on a user then she will not be able to see this node at all. Be aware that she will probably not be able to see the work items that are under this node, but I guess you are fine with that.
Another thing to note is that this solution might not work with Administrators (because if all Administrators are denied view permission and cannot see the area path then it's lost forever).

Resources