0

I'm creating a Deployment Project in which I will deploy an executable - call it abc.exe and after the software is installed on the Target machine I need to run [INSTALLDIR]abc.exe /install with administrator privileges

As you may have guessed, I'm coming from a VS2012 environment where we used to have the option to create an InstallShield LE project to add such "custom actions" but in VS2017 we need to move on to a "Deployment Project" to create the .msi. And while I think I've correctly worked out that I need to look at the "Deployment Project Properties" and at its "PostBuildEvent" property, I cannot find any clearly relevant examples online on the correct syntax to use there. My "Google Fu" is failing me here as all I seem to be able to find is irrelevant stuff that references software much older than VS2017, or "Build Events" in the Compile options of individual DLLs or Executables which is NOT what I want.

Explicitly:

How do I reference the equivalent of [INSTALLDIR]

How do I specify that the executable needs to run with Administrator privileges

1 Answer 1

0

Right-click on the Project

Go to "View" in the context menu to expand its sub-menu

Choose "Custom Actions"

In the main page you'll see four sections, "Install", "Commit", "Rollback" and "Uninstall". Right-click on "Commit" and pick "Add Custom Action"

After that it will be quite similar to InstallShield LE

1
  • So I was wrong - it had nothing to do with the "PostBuildEvent" property in the project properties!
    – user6499401
    Apr 16, 2019 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.