Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Registry in a Least Privileged Environment

Reply
 
Old 03-12-2007   #1 (permalink)
will f


 
 

Registry in a Least Privileged Environment

Greetings.

I work on an application which I would like to be able to run on Vista in a
"least privileged environment," and I have a some questions regarding the
registry in Vista.

1. Am I right to understand that, in a least privileged environment, apps
should not write to HKEY_LOCAL_MACHINE\Software anymore?
2. Is it MS's recommended practice that app should write to
HKEY_CURRENT_USER\Software instead?
3. In the case where I want an app to run with the same settings under
all user accounts, is there a registry hive for "ALL Users," or would I be
better off saving global app settings in a flat file under the C:\Users\All
Users directory?

I will be grateful for any help.

will f



My System SpecsSystem Spec
Old 03-12-2007   #2 (permalink)
Jon


 
 

Re: Registry in a Least Privileged Environment

"will f" <null@nospam.net> wrote in message
news:%23zGPXRLZHHA.984@TK2MSFTNGP04.phx.gbl...
> Greetings.
>
> I work on an application which I would like to be able to run on Vista in
> a "least privileged environment," and I have a some questions regarding
> the registry in Vista.
>
> 1. Am I right to understand that, in a least privileged environment,
> apps should not write to HKEY_LOCAL_MACHINE\Software anymore?
> 2. Is it MS's recommended practice that app should write to
> HKEY_CURRENT_USER\Software instead?
> 3. In the case where I want an app to run with the same settings under
> all user accounts, is there a registry hive for "ALL Users," or would I be
> better off saving global app settings in a flat file under the
> C:\Users\All Users directory?
>
> I will be grateful for any help.
>
> will f
>



Be a man and write where you like. Don't get pushed around by a set of
guidelines.

--
Jon

My System SpecsSystem Spec
Old 03-12-2007   #3 (permalink)
Dave Wood [MS]


 
 

Re: Registry in a Least Privileged Environment

Here's a quick attempt to answer these:

1/ Yes
2/ Yes
3/ In general changes to the system that effect all users should require
admin rights. So you could save 'all users' settings in HKEY_LOCAL_MACHINE,
and allow individual users to override the defaults in HKEY_CURRENT_USERS,
or you could save defaults in a file.


"will f" <null@nospam.net> wrote in message
news:%23zGPXRLZHHA.984@TK2MSFTNGP04.phx.gbl...
> Greetings.
>
> I work on an application which I would like to be able to run on Vista in
> a "least privileged environment," and I have a some questions regarding
> the registry in Vista.
>
> 1. Am I right to understand that, in a least privileged environment,
> apps should not write to HKEY_LOCAL_MACHINE\Software anymore?
> 2. Is it MS's recommended practice that app should write to
> HKEY_CURRENT_USER\Software instead?
> 3. In the case where I want an app to run with the same settings under
> all user accounts, is there a registry hive for "ALL Users," or would I be
> better off saving global app settings in a flat file under the
> C:\Users\All Users directory?
>
> I will be grateful for any help.
>
> will f
>


My System SpecsSystem Spec
Old 03-12-2007   #4 (permalink)
will f


 
 

Re: Registry in a Least Privileged Environment

Mr. Wood.

Thanks. One more question that maybe you can answer - or point me to a
resource for more Vista registry info.
I need to add some file associations to the registry, so that files created
by my app can be opened by just double-clicking on them. I normally write
the following:

Key: HKEY_CLASSES_ROOT\.xyz
Value Name: <default>
Data: xyzfile

Key: HKEY_CLASSES_ROOT\xyzfile\Shell\Open\Command
Value Name: <default>
Data: C:\Program Files\Company\MyApp\MyApp.exe %%1

Will Windows Vista permit me to create and enforce these file associations
even for a standard user account?

Thank you for your help.

- will f

"Dave Wood [MS]" <davewood@online.microsoft.com> wrote in message
news:O9Ou%23zMZHHA.2432@TK2MSFTNGP03.phx.gbl...
> Here's a quick attempt to answer these:
>
> 1/ Yes
> 2/ Yes
> 3/ In general changes to the system that effect all users should require
> admin rights. So you could save 'all users' settings in
> HKEY_LOCAL_MACHINE, and allow individual users to override the defaults in
> HKEY_CURRENT_USERS, or you could save defaults in a file.
>
>
> "will f" <null@nospam.net> wrote in message
> news:%23zGPXRLZHHA.984@TK2MSFTNGP04.phx.gbl...
>> Greetings.
>>
>> I work on an application which I would like to be able to run on Vista in
>> a "least privileged environment," and I have a some questions regarding
>> the registry in Vista.
>>
>> 1. Am I right to understand that, in a least privileged environment,
>> apps should not write to HKEY_LOCAL_MACHINE\Software anymore?
>> 2. Is it MS's recommended practice that app should write to
>> HKEY_CURRENT_USER\Software instead?
>> 3. In the case where I want an app to run with the same settings under
>> all user accounts, is there a registry hive for "ALL Users," or would I
>> be better off saving global app settings in a flat file under the
>> C:\Users\All Users directory?
>>
>> I will be grateful for any help.
>>
>> will f
>>

>



My System SpecsSystem Spec
Old 03-12-2007   #5 (permalink)
Dave Wood [MS]


 
 

Re: Registry in a Least Privileged Environment

Yes, HKEY_CLASSES_ROOT is actually a 'merge' of
HKEY_LOCAL_MACHINE\Sotware\Classes and HKEY_CURRENT_USER\Software\Classes,
so if you add your keys in HKEY_CURRENT_USER\Software\Classes they will show
up in HKEY_CLASSES_ROOT for just that user.

"will f" <null@nospam.net> wrote in message
news:uwYixkNZHHA.4872@TK2MSFTNGP03.phx.gbl...
> Mr. Wood.
>
> Thanks. One more question that maybe you can answer - or point me to a
> resource for more Vista registry info.
> I need to add some file associations to the registry, so that files
> created by my app can be opened by just double-clicking on them. I
> normally write the following:
>
> Key: HKEY_CLASSES_ROOT\.xyz
> Value Name: <default>
> Data: xyzfile
>
> Key: HKEY_CLASSES_ROOT\xyzfile\Shell\Open\Command
> Value Name: <default>
> Data: C:\Program Files\Company\MyApp\MyApp.exe %%1
>
> Will Windows Vista permit me to create and enforce these file associations
> even for a standard user account?
>
> Thank you for your help.
>
> - will f
>
> "Dave Wood [MS]" <davewood@online.microsoft.com> wrote in message
> news:O9Ou%23zMZHHA.2432@TK2MSFTNGP03.phx.gbl...
>> Here's a quick attempt to answer these:
>>
>> 1/ Yes
>> 2/ Yes
>> 3/ In general changes to the system that effect all users should require
>> admin rights. So you could save 'all users' settings in
>> HKEY_LOCAL_MACHINE, and allow individual users to override the defaults
>> in HKEY_CURRENT_USERS, or you could save defaults in a file.
>>
>>
>> "will f" <null@nospam.net> wrote in message
>> news:%23zGPXRLZHHA.984@TK2MSFTNGP04.phx.gbl...
>>> Greetings.
>>>
>>> I work on an application which I would like to be able to run on Vista
>>> in a "least privileged environment," and I have a some questions
>>> regarding the registry in Vista.
>>>
>>> 1. Am I right to understand that, in a least privileged environment,
>>> apps should not write to HKEY_LOCAL_MACHINE\Software anymore?
>>> 2. Is it MS's recommended practice that app should write to
>>> HKEY_CURRENT_USER\Software instead?
>>> 3. In the case where I want an app to run with the same settings
>>> under all user accounts, is there a registry hive for "ALL Users," or
>>> would I be better off saving global app settings in a flat file under
>>> the C:\Users\All Users directory?
>>>
>>> I will be grateful for any help.
>>>
>>> will f
>>>

>>

>
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Wise Registry Cleaner vs AusLogics Registry Defrag vs CCLeaner? Vista performance & maintenance
aministrator privileged Vista General
Registry Semi-Disaster: I am an idiot - used 2 registry 'cleaners' Vista General
XPOST: Fast boot, delay after 1st login if privileged action required Vista installation & setup
Fast boot, delay after 1st login if privileged action required Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46