AdkMan

I'm building an installer using a VS 2005 setup project. I'm enabling the option for the user to decide whether to install for "Everyone" or "Just me" when they run Setup.exe.

What has me confused is how to accommodate this decision on the application side. How can I find out at run-time what type of install was performed so that I can go to the right places for my file and registry data Or are there functions that make this transparent to the app, (ie they just go to the right place and get the stuff)

I can't seem to find this info no matter how hard (and long) I look...

Thanks!



Re: ClickOnce and Setup & Deployment Projects Getting app install info at run-time

PhilWilson

If you create a registry item containing [ALLUSERS] case-sensitive with the brackets it should resolve to a value of 1 for a per-machine installation.




Re: ClickOnce and Setup & Deployment Projects Getting app install info at run-time

AdkMan

Thanks for your thoughts.

What has me confused about doing it this way is the ramifications when running under a limited account. A user doing a "Just Me" install under a limited account wouldn't be able to write a registry entry in a globally accessible location like HKEY_LOCAL_MACHINE correct

This is the train of thought that spawned my initial question. It would seem that preferred behavior for Vista and beyond is to require least privilege. Isn't there a way to determine how an install was performed without having to write to privileged space




Re: ClickOnce and Setup & Deployment Projects Getting app install info at run-time

PhilWilson

Maybe the User/Machine hive would be better if you're worried about limited users. It's likely that a limited user wouldn't be able to write there, true, but not a certainty in an environment where group policy can elevate installations on behalf of limited users.

Just me is no more relevant that Everyone if the installing person is a limited user. It's the privilege of the user that matters, not whether it's per-user or per-machine, and whether the setup tries to write to secured parts of the system or not. Everyone isn't a guarantee that a user can run an install that writes to secure parts of the system.

What problem are you trying to solve here What's the app going to do diffferently if the product was installed per-user vs per-machine