3

I need to execute a Console Application script after installing my application. Depending on the Windows version, it adds some data to the Registry.

How can I do this using a Visual Studio Setup Project?

Note: I'm saying after because I read in How to execute custom action before installing files when using VS's Setup Project? that it isn't possible to do it before, but it doesn't really matter in my case.

1 Answer 1

4

Simply add the custom action under Install node. I don't really understand what you mean by "console application script", but if you mean a BAT file you can write a custom EXE which launches it through ShellExecute.

If you are using a DLL, make sure that "InstallerClass" custom action property is set correctly:

  • False for Win32 DLLs
  • True for .NET Installer Class actions
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer. That's what I was doing, but after doing this is necessary to set the InstallerClass property to False ;) Just edit your answer to add it and I'll accept your answer.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.