Add a custom action after chained msi done - installshield

i have an ism which contains two chained msi.
curentlly, the installer in the end do the two chained msi as the last action and then finish.
can i add a custom action after the chained msi?
i want to do it after the chained msi done
thank you in advance!

You cannot add a custom action per-se. There are a few options I've used in the past, depending on your needs one of them may suit you:
If your installer always runs with UI, you can add a custom action at the end of the User Interface Sequence (after ExecuteAction). This will get executed only after all chained MSI packages were run.
If you don't need access to the MSI properties (or can read the data from the registry or somewhere), you can just create another basic MSI that does what you need, and chain it as the last MSI to run. MSI packages are executed in the order specified in 'Order' column of the ISChainPackage table.
InstallShield Support recommends this approach (there are several threads about it in their support forums).
Finally, if your custom action can be implemented using an MSI Transform, consider doing that. Transforms are applied after all chained MSI were run.

Related

Passing Arguments to custom action in MSM from MSI - Installshield

Screenshot of custom action
edit: where should I mention the property as attribute? and how will the property created in MSM be exposed by the exe and how should it be set?
I am using an Basic MSI project to install a Merge Module, which internally invokes an .exe using custom action in differed mode. I would like to pass arguments to the custom action while invoking the exe. How can I pass arguments dynamically to the custom action?
You cannot do that directly. You're only hope is that the custom action uses public properties as input parameters and pass the updated value for those properties when you call the MSM.

launching application after silent install

Installshield 2014 professional: Basic MSI (NOT setup.exe)
Using Project assistant, I set launch application checkbox (default TRUE) on SetupCompleteSuccess dialog.
Usually it works fine.
But on silent mode, it does not work.
How and When can I call IS_LAUNCH_MY_PROGRAM_PLEASE custom action or execute application on installed dirctory.
As an aside, my reaction to this is that you shouldn't do it. If you do, it should be conditional and require the person installing your software to include a property on the command line that requests the program launch.
That said, the problem is that the dialogs are not shown during a silent installation (Windows Installer skips the entire InstallUISequence), so the actions on them will never run. Instead you'd have to schedule a custom action in the InstallExecuteSequence, and use UILevel (and a custom property) to condition when this action runs.
Note that there's a strong likelihood that this will run your application in the wrong context, or even as the wrong user, as typically one has to pre-elevate in order for a silent installation to succeed. So again, keep the request to install an application and the request to run it separate. People using systems like SCCM will curse your installation otherwise.

IISConfig.exe arguments for custom action in Microsoft Release Management

after creating an application pool in IIS(8.0) using Release Management 2013 Update 4, I need to customize the predefined action.
I would like to set Load User Profile in the advanced application pool settings true instead of false. I assumed I could use -loadUserProfile as an argument in Release Management.
Apparently the arguments are not similar to the parameter names in IIS. The release was rejected and the log file showed: ERROR: loaduserprofile : Unknown Option.
Release Management is using IISConfig.exe to execute the arguments. Even knowing that, I was unable to find a list of arguments or "Options" which can be used for the IISConfig.exe.
I would be glad to know how to solve that Problem. Not only in that specific case but in general.
Find the details of the IIS tool here:
https://msdn.microsoft.com/library/vs/alm/release/overview
Scroll to IIS Deployment Agent.
There does not seem to be any way to change the Load User Profile. You can write your own tool to accomplish that (and share it here :))

How to debug custom c# action that executes sql

I am running custom action that suppose to execute some function in provided dll.
this function connects to sql db and do some select with return, but i cannot see the return value.
How can i debug this function in dll, or check if it is really executed.
I've use C++ custom action DLLs, so I'm not entirely sure how a C# custom action DLL differs. However, I usually use the method Ondrej mentioned: logging to the MSI log file and/or message boxes that pause the custom action execution so I can attach to the process via Visual Studio.
Are you familiar with how that is done?
InstallShield has native SQL script handling for most of your needs. This will automatically give you a lot of logging in the MSI log file. However returning result sets is one thing it doesn't do.
The best thing to do is write your managed C# custom action using Windows Installer XML (WiX) Deployment Tools Foundation (DTF). This builds custom actions that appear as C++ custom actions to the Windows Installer and is fully compatible with InstallShield.
Inside of a DTF custom action you can use session.Log() to record useful debugging information in the Windows Installer log file. You can also attach a debugger to the custom action and step through it if you want. See the following for more information:
Deployment Tools Foundation (DTF) Managed Custom Actions

Windows installer security/credential question

Folks,
I've got a strange issue at the moment with a visual studio 2010 built MSI...
When I run the msi, it performs a few tasks, then executes a tool we built - this tool then carries out some more advanced work we couldn't do within a custom task.
The issue here, is then when the msi starts my custom built tool, it doesn't execute it with the same credentials as I start the MSI with (i.e. my administrative login).
Is there a parameter I can pass to an MSI to enforece this? Or perhaps I can pass the credentials to the process when I start it?
My process is started using Process process = Process.Start(procInfo) nothing fancy. I've also noted the ability to pass in a parameterised username/password/domain, but this will vary depending on the user who is installing - can this be extracted from the installer somehow?
Any help (or questions) welcomed.
Dave
EDIT: for clarity... I'm running the MSI under my domain account, and I want my custom process to run under that 'context'. At present, it starts (regardless of whether I start as administrator or not) under the SYSTEM account (rather than mydomain\me). I'm using Windows Server DataCenter edition if that helps...
I should also add, I think this is a policy issue, but I've no idea what to check/where to check...
By default Windows Installer runs custom actions as the current user. If the MSI is elevated, custom actions will run as the elevated user.
Please note that if you are running the MSI as an Administrator, it doesn't mean your custom actions will have full Administrator privileges. On Vista or higher any user can gain Administrator privileges through elevation.
So if your custom actions need Administrator privileges, make sure they use the msidbCustomActionTypeNoImpersonate flag so they run under the local system account.
If this is not the problem and you just need access to the current user data, can you please give me more details?

Resources