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!

wvc
Posts: 2
Joined: Fri Oct 19, 2012 11:05 pm

Determine whether Visual Studio is running

I'm developing an installer for a package that includes a Visual Studio plug-in. I want to define a launch condition that prevents the installer from running if any version of Visual Studio (devenv.exe) is running. Is there any way to do this with Advanced Installer?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Determine whether Visual Studio is running

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can use our "Detect Process" custom action. Also, please take a look on our "Detect or stop a process" article.

You can proceed like this:
- Go to "Custom Actions" page and add a "Detect Process" custom action with sequence, scheduled before "Wizard Dialogs Stage -> Searches" action group, like this:
  • Action Data: devenv.exe
- Select the above custom action and, while pressing the Shift key, drag it before "Install Execution Stage -> Searches" action group. From "Custom Action Properties" right pane enable the "Execute only once if present in both sequence tables" execution option.
- Go to "Launch Conditions -> Custom" tab and add a custom launch condition like this:
  • Condition: AI_PROCESS_STATE = "Stopped"
    Description: Your Launch Condition Description
- Build and run your project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wvc
Posts: 2
Joined: Fri Oct 19, 2012 11:05 pm

Re: Determine whether Visual Studio is running

Thanks, Daniel. That's definitely helpful.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Determine whether Visual Studio is running

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”