How to execute custom action only in install (not uninstall) - installation

I'm sure this is fairly easy, but I've kind of had a hard time with it. I've got a custom action that executes a different (non-msi) installer on installation. Unfortunately, I've noticed that it also executes the installer on UNinstallation!
I've looked through the options but I cant' seem to find out how to stop this. If anybody could help me I would be incredibly grateful.
Also, how do I set a custom action to go off only during UNinstall? Any help is greatly appreciated guys!

Add a condition on the action so it's only triggered during installation, not uninstallation.
Action run only during Install
NOT Installed AND NOT PATCH
Action runs during Install and repair
NOT REMOVE
Run on initial installation only:
NOT Installed
Run on initial install or when repair is selected.
NOT Installed OR MaintenanceMode="Modify"
To only run an action during uninstall use the following condition:
REMOVE~="ALL"
To only run an action during upgrade:
Installed AND NOT REMOVE

An example:
<InstallExecuteSequence>
..
<Custom Action="QtExecIdOfCA" Before="InstallFinalize">NOT Installed</Custom>
..
</InstallExecuteSequence>
..
..
<CustomAction Id="QtExecIdOfCA" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
Notice! Condition is added to the <Custom> tag and not the <CustomAction> it confused me, because Custom is followed by Action attribue

A bit of a correction:
Finally, to only run an action during uninstall use the following condition:
REMOVE="ALL"
This seems more appropriate as the property REMOVE contains the features being uninstalled.
So if I do a modify to remove one feature, REMOVE is true and the action that was to execute only on uninstall executes on modify.
More details here on MSDN

Please be careful with REMOVE=ALL. It is not available before installvalidate sequence.
And check below links for more details:
http://msdn.microsoft.com/en-us/library/aa371194(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa368013(v=vs.85).aspx

A condition on the custom action, probably with a matching custom action to do the uninstall. Not sure what tools you're using, but assuming the secondary install is tied to a component, I would use that component state. A state of =3 means a target state of installed. A state = 2 means a target state of absent. Note that the state won't be set if there is no change.

Related

MOD_OREKA configuration on Freeswitch

Has anyone successfully configured mod_oreka? I have been trying but for some reasons control doesn't pass into the module.
Thanks!
Just did, and stumbled upon your question by googling for something else (related).
Here's what I did:
cd into my freeswitch source directory, in src/mod/applications/mod_oreka and then make && make install, since it wasn't compiled by default the first time.
edit the configuration for the module, inside your freeswitch installation directory, open conf/autoload_configs/oreka.conf.xml and add:
<param name="sip-server-addr" value="1.1.1.1"/>
<param name="sip-server-port" value="59150"/>
Get into the fs_cli and do reload mod_oreka or just restart freeswitch
In your calls, make sure to start the application oreka for every call you want to record:
<action application="oreka_record"/>
These instructions were useful and are the official reference for the module: https://freeswitch.org/confluence/display/FREESWITCH/mod_oreka
Hope it helps!

How do I make a WiX installer force VS to install templates?

I've got a WiX installer that is meant to update VS 2010 templates after installing them. The code I'm using is as follows:
<CustomAction
Id="InstallTemplates"
ExeCommand=""[VISUALSTUDIODIR]devenv.exe" /installvstemplates"
Directory="VISUALSTUDIODIR"
Execute="commit"
Return="check"
HideTarget="no"
Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="InstallTemplates" Before="InstallFinalize"></Custom>
</InstallExecuteSequence>
In the above, VISUALSTUDIODIR refers to the correct location, and templates are correctly deployed. However, it seems that the command does not get called, so no templates are actually installed. What am I doing wrong?
WiX has built-in functionality to do that. Add a reference to WixVSExtension.dll and add the following authoring:
<CustomActionRef Id="VS2010InstallVSTemplates" />
Make sure that VISUALSTUDIODIR is an actual directory in your MSI package (it's saved in Directory table). This is a requirement for this type of custom action.
Also, try creating an installation log and search for your custom action to see what happens.

Can't seem to get Wix to install driver

I followed the tutorial here: http://www.codeproject.com/KB/library/driver-install-with-wix.aspx but it just doesn't seem to want to work - the DPInst exe never actually seems to run? All the files are being laid-down correctly - I even noticed that in the tutorial they missed a quote.
My custom action looks like this:
<CustomAction Id='Install_M2_Driver'
Execute='deferred' Directory='DRIVER_ROOT'
ExeCommand='"[dirDpInst]DPInst.exe" /SA /PATH "[dirM2]"'
Return='ignore' />
I even tried replacing the DPInst.exe with a simple exe that echoed the arguments back to me, everything looks good, if I actually run the command from the command-line while the echo message box was up it would bring up the DPInst install GUI.
Found it, need to turn impersonate off:
<CustomAction Id='Install_M2_Driver'
Execute='deferred'
Directory='DRIVER_ROOT'
Impersonate='no'
ExeCommand='"[dirDpInst]DPInst.exe" /SA /PATH \"[dirM2]\"'
Return='ignore' />

Need a help on setting Reinstallmode and Reinstall

Im having MSI ,for minor update ,i will be updating only build number with no product code change. i try to paramters to msiexex .
msiexec /i sample.msi Reinstall=ALL ReinstallMode=amus in command prompt.Inspite of setting in command prompt,I tried to update msi property through orca. I added 2 properties to Reinstallmode and reinstall properties to orca.But they are not working.It gives me error message.Product of same version has already installed.
one more question which i had is
I tried to set custom action condition property = "Not Installed" .SO tht during repair mode ,i will not invoke custom action.Only one time invokation.
If i try to run msiexec /i sample.msi Reinstallmode=amus Reinstall="All" will custom action be invoked or it will not invoke.
~Mahender
I suppose the properties you pass are not set because you missed the correct spelling. Both REINSTALL and REINSTALLMODE properties should be all UPPERCASE. Such uppercased properties are called public properties, and only public properties can be passed via command line.
Hope this helps.

Override Working Folder with Starteam/CruiseControl

For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view.
I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work.
Has anyone been able to do this?
Are you looking for the project's workingDirectory element instead of the starteam override?
<sourcecontrol type="starteam">
<executable>C:\Program Files\starbase\StarTeam 5.4\stcmd.exe</executable>
<project>ProjectName/ViewName</project>
<username>UserName</username>
<password>Password</password>
<host>127.0.0.1</host>
<port>49201</port>
<autoGetSource>true</autoGetSource>
<overrideViewWorkingDir>C:\temp\ProjectName</overrideViewWorkingDir>
</sourcecontrol>
Works fine for me with ccnet 1.4.3 and Startem Cross-Platform Client 2008 R2. Make sure XML is valid. I had overrideViewWorkingDir tag not properly closed and ccnet was ignoring it. Found it by running ccnet.exe from the command line instead of as a service. Also you can use Process Explorer from SysInternals to view command line arguments passed to stcmd.exe
Make sure your working folder properties are set to a relative and not a full path (ex: MyFolder instead of C:\MyProject\MyFolder) or it will override the override. I've seen files checked out to some very odd places in the past when people mistakenly put in full paths when adding a folder to a view.

Resources