Passing a paremeter to a Custom Action - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jkanalakis
Posts: 1
Joined: Sun Jul 11, 2010 1:28 am

Passing a paremeter to a Custom Action

I'm trying to register a New Project Template to Visual Studio 2010. Essentially, at the end of the install, when all the files are copied over to the target, i need to run the following command:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE/devenv.exe /installvstemplates

I've created a "Custom Behavior Search" called VS2010EXE that searches the registry for HKLM/SOFTWARE\Microsoft\VisualStudio\10.0/InstallDir and put "devenv.exe" in the property. I also set the type to "retrieve the raw value". I'm assuming that this should return a full path to the executable.

In the "Custom Actions" section, I've added an "InstallFinalize" action and set the property name to VS2010EXE defined above. The source type is (*.exe) and for the command-line, I've entered "/installvstemplates", assuming that this would append /installvstemplates as a command line parameter. The execution properties are set to syncronous/ignore return code, immediate execution, and eecute always. Lastly, the execution condition expression is set to "NOT Installed".

As far as i can tell, everything is setup properly. But devenv.exe is never called and the templates do not install.

Does anyone have any advice or ideas? Does Advanced Installer have any logging to reveal what's really happening behind the scenes?

Thank you,

John K.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Passing a paremeter to a Custom Action

Hello,

Create a New Search from the Search page, then right click it->Add Location->Registry

Set the key to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS\ .
Fill in the 'Name' field with 'EnvironmentPath'. This Value stores the path to devenv.exe.
Type: Retrieve the raw value.

Under InstallFinalize standard action add New Custom Action-> Property Source .
In Property Name field place the name of your search result property, in the Command Line field place the command line necessary to install the template.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”