views:

11

answers:

1

I have a setup project. Project has several dlls and one ini-file. I need to execute that ini-file to register my dlls.

How should I do it ?

Visual Studio 2008.

A: 

.ini files are for configuration; they aren't "executed".

Did you mean an .inf file? But .inf files are usually used as a simple substitute for a ful setup program, which you seem to have.

Anyway, for an .inf file, from Win32, you want to call ShellExecute() with the lpOperation set to "Install", and the lpFile set to the full path of the .inf file.

In .Net, call Process.Start with a ProcessStartInfo parameter. The ProcessStartInfo object needs it's Verb property set to "Install".

You setup program will probably need to be run from an Administor account for this to work.

James Curran