Marcus
Marcus

Reputation: 9439

Separate program to install & configure console app?

I have a simple console app that clients will install on their server which sends data to our API. They need to type in their username/password for our API and the program remembers this and uses it when the app is run using a daily scheduled task.

How can I create a GUI to let the end user type in their username/password (for our API) which the console app can read? Since the app needs installed (xcopy + set up of scheduled task), I presume I can do this in the same program?

Currently I'm using the Visual Studio Application Settings to store the username/password when they are passed as parameters to the app. When the app is run without parameters, it uses the stored data (which is encrypted with DPAPI).

Upvotes: 1

Views: 237

Answers (2)

NewRK
NewRK

Reputation: 449

I believe you don't need to create separate installer. Just check in your console app if the settings contains standard password? If yes - prompt for a new one. It means you don't need to create separate interface for installer.

Upvotes: 0

aleroot
aleroot

Reputation: 72616

You have two option :

  • Open a WinForm
  • Ask the user name and password interactively directly in the console application

As suggested by rene you can use a switch on the command line of the same application, or you can create a separate application to do it, in the case of a separate application maybe the winForm solution would be the best choice.

Upvotes: 1

Related Questions