Thus far my C# service finally does everything it's supposed to except it's obviously having some access problems due to the following in the installer code:
processInstaller.Account = ServiceAccount.LocalSystem;
Ordinarily, this looks like a time to follow the simple directions here, but in this instance, the end users don't know their own passwords--smart cards are used for login. On such a machine, I seem to be able to run around and merrily install whatever applications I wish, and my processes seem to run just fine when I log out.
Is there some way I can give the service the permissions of the user who installs it without compiling them into the code or prompting for them?
This was originally going to be a nice little tray app but then it turned out it needs to be able to run in the event the user has rebooted their machine and hasn't even yet logged in while having access to the user's personal files and network shares.
Sorry, can't be done in this way without a prompt.
See Install Windows service to run under user's credentials with ServiceAccount.User but don't prompt
Only other option is to run as a network service and constrain your permissions.