Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > VisualStudio 2008 setup project adds allways HKEY_CURRENT_USER Software [Manufacturer] [Productname]
 

VisualStudio 2008 setup project adds allways HKEY_CURRENT_USER Software [Manufacturer] [Productname]

We have created an application and are building it with a VisualStudio setup project. Setup project allways add HKEY_CURRENT_USER -registry enty for local user's program menu folder - even thou I have removed it in VisualStudios registry view...

Problem is that when we install our applicationas administrative user for all user in machine: when user then logs in and starts application for the first time, then application makes configration (adds this application into local users program menu.

Our customers admin guys tell me that it should not work like that.. they would not like to have program menu items in HKEY_CURRENT_USER ?

Am i doing something wrong, or is this a feature :)

Cheers,

Pekka

_pekka_  Thursday, September 24, 2009 6:04 AM
It's a bit confusing because removing a registry entry from the Registry view in the IDE is nothing to do with shortcuts and the Start-Programs menu. I assume that you actually have a shortcut in your setup, and it's in the File System view somewhere in User's Program Menu. So there are two main reasons why you see the shortcut only in the installing user's program menu:

1) You haven't set InstallAllUsers to true in the setup project, or the installing user is clicking through the dialog where it says Just me or Everyone, and it's installing for Just me, which means only for the current installing user, not for everyone.
2) You have set InstallAllUsers true and the installing user does not have admin privileges, so the install is falling back to do a just me install. You can't do an Everyone install and change the system's program menu unless you have admin privileges.
Phil Wilson
  • Marked As Answer by_pekka_ Tuesday, September 29, 2009 11:48 AM
  •  
PhilWilson  Thursday, September 24, 2009 5:37 PM
Hi Pekka,

According to my test, when you create setup project and install the application to the user’s computer, it won’t write register enter into HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE by default.

I have also tested Phil Wilson’s suggestion. When you install the app for all users, you can login with a normal user account and run the app without any prompt. If you install the app for just me and copy the shortcut to the all users desktop and launch it from another account, it will say "The parameter is incorrect". But if you look into the application folder and launch the app directly, it runs properly.

That is to say, install for all users enable any normal user accounts (non-admin) on your computer to launch the app via shortcut. But if you install it for just me, other users cannot launch the app via shortcut.

I think you can create a simple application to test my opinion. Then turn to your current project to find if it writes any custom register key. If you have any problems, please feel free to tell us.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
  • Marked As Answer by_pekka_ Tuesday, September 29, 2009 11:48 AM
  •  
Kira Qian  Friday, September 25, 2009 5:33 AM
It's a bit confusing because removing a registry entry from the Registry view in the IDE is nothing to do with shortcuts and the Start-Programs menu. I assume that you actually have a shortcut in your setup, and it's in the File System view somewhere in User's Program Menu. So there are two main reasons why you see the shortcut only in the installing user's program menu:

1) You haven't set InstallAllUsers to true in the setup project, or the installing user is clicking through the dialog where it says Just me or Everyone, and it's installing for Just me, which means only for the current installing user, not for everyone.
2) You have set InstallAllUsers true and the installing user does not have admin privileges, so the install is falling back to do a just me install. You can't do an Everyone install and change the system's program menu unless you have admin privileges.
Phil Wilson
  • Marked As Answer by_pekka_ Tuesday, September 29, 2009 11:48 AM
  •  
PhilWilson  Thursday, September 24, 2009 5:37 PM
Hi Pekka,

According to my test, when you create setup project and install the application to the user’s computer, it won’t write register enter into HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE by default.

I have also tested Phil Wilson’s suggestion. When you install the app for all users, you can login with a normal user account and run the app without any prompt. If you install the app for just me and copy the shortcut to the all users desktop and launch it from another account, it will say "The parameter is incorrect". But if you look into the application folder and launch the app directly, it runs properly.

That is to say, install for all users enable any normal user accounts (non-admin) on your computer to launch the app via shortcut. But if you install it for just me, other users cannot launch the app via shortcut.

I think you can create a simple application to test my opinion. Then turn to your current project to find if it writes any custom register key. If you have any problems, please feel free to tell us.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
  • Marked As Answer by_pekka_ Tuesday, September 29, 2009 11:48 AM
  •  
Kira Qian  Friday, September 25, 2009 5:33 AM
Hi Phil - you are pointing me to right direction..

1) I do have a Folder and a ShortCut in User's Program Menu, as I want to show our app in user's menu.
2) I have set InstallAllUsers to true.
3) When I install software as admin_user I can start it without any problems (as admin user)
4) When starting as normal user, then Windows says "configuring ..."and then starts the app. After first time everything works fine.

SO I quess this has to do with the Shortcut in User's Program Menu, but is there any other way to have our app in user's MenuBar ?

Cheers,

Pekka
_pekka_  Tuesday, September 29, 2009 11:10 AM
Hi Kira,

You can repeat my problem as follows
1) Create a project (WindowsForm) and build it.
2) Create another project for same solution (SetUp project), and set install to all user's true
3) Add primary output from WindowsForm project into SetUp projects Application Folder.
4) Add a company_name -folder "FooBar Ltd" under "User's program menu"
5) Create a shortcut from Application Folder's primary_output and place it into "FooBar Ltd" -folder.

6) Install as admin
7) run as admin (everything ok)

8) login as "john doe normal user"
9) run from menu... and you should see a little window "Windows is configurating..."

Cheers,

Pekka
  • Edited by_pekka_ Tuesday, September 29, 2009 11:48 AMtypo
  •  
_pekka_  Tuesday, September 29, 2009 11:17 AM
Hello Pekka,

Thank you for posting the detail steps. But after following the steps, I still cannot reproduce the issue. The application still launch immediately when I click the shortcut in programs menu under another user account.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
Kira Qian  Wednesday, September 30, 2009 3:54 AM
This sounds normal to me, well it can be normal, let's say it that way. When you install using one account, any user-specific items get installed only for that user. For example, if you have got HKCU registry entries they get installed for the current installing user. They don't get installed for every potential user on the system. When some other user logs on, those items (like an HKCU registry item) is missing for this new user, so it gets created, and you see that progress dialog. You'll see something like this for files in user-profile folders too.
Phil Wilson
PhilWilson  Wednesday, September 30, 2009 8:52 PM

You can use google to search for other answers

Custom Search

More Threads

• Can ClickOnce install .NET Framework programatically?
• .NET framework installation detection
• make setup
• Adding New file to exisitng MSI programmatically (Not opening VS 2003)
• System update required
• Clickonce installation stops (fails) without error message
• Problems deploying on Vista
• Click-once deployment to many unknown server names.
• ClickOnce ISV Mode
• Path from Full File Name