Custom install actions

2020-08-01 04:59发布

I have now found numerous examples and am none the wiser.

The brief is simple. During install time a form of dialog should pop up and ask the user for DB credentials. These should then be used to create a registry entry. The path of the key is always the same but the key itself is a DB Connection string generated from the user input.

It should ask for a server, db name, user and password. It would be nice to have a 'test' button but not essential.

This is for a windows service.

It looks like I go about adding a class that inherits from installer and override the install and uninstall methods. That's about as far as I get before the information becomes garbled.

The information is not in my book :). Any ideas how I can present the user with a form when installing my service, and using the responses to the form to generate a registry key.

Cheers

p.s.

In response to responses ;). The environment is Visual Studio and the target system is windows 2003. The server has been developed using the .net framework V2.

This is a standard setup project created in visual studio that installs the service.

2条回答
老娘就宠你
2楼-- · 2020-08-01 05:39

Visual Studio is very limited as an installation author, and I'm not even sure it's possible to achieve what you're after with it. If you're bound to using Windows Installer, I suggest taking a look at WiX. If not, NSIS might be the tool for you.

查看更多
【Aperson】
3楼-- · 2020-08-01 05:51

You should start by describing your environment - are you targeting Windows Installer? Which installation authoring software are you using. Also note that a plain text registry value is probably no the best option for storing user credentials.

查看更多
登录 后发表回答