0

I ve written an application and compiled this into a shared folder that users should be referencing.

I want to create an installer application which calls a seperate '.exe' and also checks that the user has read / write access to the shared fodler.

I ve been trying to do this using the File->New->Setup Project

I cannot see an option for writing code to call the seperate '.exe' and also do some cheks.

Any ideas please??

1
  • What is the separate executable and why do you need to call it? Commented Oct 11, 2009 at 9:02

4 Answers 4

1

To perform custom steps as part of your deployment/installation you can create a "custom action".

I have used this approach myself in the past and have found it very useful. (It might now be superseded by a newer approach, but I'm not aware of one).

This article gives a great tutorial on custom actions in .NET.

Sign up to request clarification or add additional context in comments.

4 Comments

If prerequisites are not met how do you stop the install using a custom action??
Also can you build a setup projet which does nothing apart from run the custom action???
You may want to look at Commit and Rollback Custom actions. The Commit custom action checks for pre-requisites and if not found, can throw an exception to cause the installation to Rollback. See: msdn.microsoft.com/en-us/library/aa371369(VS.85).aspx
If you want an installer with nothing but a custom action, you might be better off just creating a standard exe project and performing install steps there. As long as you provide a simple uninstall option you should be fine.
1

You should have a look at Inno Setup, it is far much easier to set-up and has many features, including a compiled scripting language if you need to do some checkings at the installation and/or de-installation.

There is also a GUI provided as 3rd party software.

Also, you don't need to install anything else when you install a package made by Inno Setup, it creates independent .exe installers (unlike .msi files).

2 Comments

Cant use third party software- Sorry
It's a free installer builder, are you sure it's not allowed in the case of your application?
0

You may consider creating a custom installer action in your setup project which allows you to run arbitrary code during different stages of the deployment.

Comments

-1

Take a look at the custom actions. It will allow you to execute arbitrary .Net code during installation.

Comments

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.