0

I'm currently using this guide in my C# Setup Project, to create a startup shortcut for my application. How do I add my program to the users start menu with VS2010 Setup Project?

But the thing is, i've followed this guide, and set my setup project property: InstallAllUsers to True, but when i do install the application, my startup shortcuts are created by creating a registry key in the HKEY_CURRENT_USER instead of in the HKEY_LOCAL_MACHINE, causing an auto-repair when a new user logs in on my machine, how can i prevent this? I've tried to download and install Orca, and edit the root of the registry to -1 and this do work, but feels like a silly workaround. Any suggestions?

Community
  • 1
  • 1
MMM
  • 311
  • 5
  • 14
  • 30
  • Can you explain what really is user related and what needs to be installed under current user? Maybe your software design is the problem. – coding Bott May 02 '17 at 12:52
  • Some [suggestion](http://stackoverflow.com/q/8841265/1997232) or maybe [this](http://stackoverflow.com/q/29743090/1997232) one, or [this](http://stackoverflow.com/q/8796328/1997232). – Sinatr May 02 '17 at 12:52
  • btw. which user should affected from the registry change? current users only. system users, because setup runs in that account. what about other users? – coding Bott May 03 '17 at 11:49
  • all users should be affected by these shortcuts. – MMM May 03 '17 at 12:13

1 Answers1

0

To access a user profile/registry it must be loaded. In fact if the user is not logged in, there is no profile to update by the installer. So the installer need to install the current user keys when the user is logged in. If you are in domain environments the profile is not on the client when the user is never logged on a pc. it will be copied first time to the pc, when the users login the first time.

Try to avoid creating user keys in per computer installations. Let the software you are installing do it - creating the keys in context that users which is using it.

coding Bott
  • 4,287
  • 1
  • 27
  • 44
  • so create the keys through a custom installer, or through the registry part of my setup project? – MMM May 02 '17 at 13:57
  • current user settings are never part of any setup, when you install per machine. let the software you are installing do the registry stuff in users context, when the users uses it. you could also consider a per user installation and NOT a per machine. but this installs the software into the user profile and not under program files. – coding Bott May 03 '17 at 11:47