views:

49

answers:

0

We used to prepopulate the user name in our Windows service installers, but under Win7/Windows 2008 MS has changed the behavior.

Our simple line of code in the installer

this.serviceProcessInstaller1.Username = Functions.GetRegistryPath("", "ServiceUserName");

no longer works and the dialog comes up without the user name prepopulated. I have tried various tricks, including running the MSI as administrator, and explicitly setting some more parameters, e.g.

this.serviceProcessInstaller1.Password = "x";
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.User;

Nothing works to get the username prepopulated.