Windows Vista Forums
Vista Forums Home Join Vista Forums Tech Publications Windows 7 Forum Vista Tutorials Webcasts Tags

Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

app data in HKEY_LOCAL_MACHINE

Update your Vista Drivers
Reply
 
Thread Tools Display Modes
Old 03-17-2007   #1 (permalink)
Jens Müller
Guest


 

app data in HKEY_LOCAL_MACHINE

Hell,

I write an app that stores data for all users into the
HKEY_LOCAL_MACHINE\Software\... path. In Vista, somehow the data is
stored but not visible in regedit under this path. What happens to it?

Also, I used to let it run for all users with the
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run entry.
This seems not to work any more. What can I do here to start an app for
all users?

Thanks,
Jens


My System SpecsSystem Spec
Old 03-17-2007   #2 (permalink)
Jesper
Guest


 

RE: app data in HKEY_LOCAL_MACHINE

It got virtualized:
http://msdn2.microsoft.com/en-us/library/aa965884.aspx

"Jens Müller" wrote:

> Hell,
>
> I write an app that stores data for all users into the
> HKEY_LOCAL_MACHINE\Software\... path. In Vista, somehow the data is
> stored but not visible in regedit under this path. What happens to it?
>
> Also, I used to let it run for all users with the
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run entry.
> This seems not to work any more. What can I do here to start an app for
> all users?
>
> Thanks,
> Jens
>
>

My System SpecsSystem Spec
Old 03-18-2007   #3 (permalink)
Jens Müller
Guest


 

Re: app data in HKEY_LOCAL_MACHINE

Hello,

> It got virtualized:
> http://msdn2.microsoft.com/en-us/library/aa965884.aspx


Ok thanks. Now I have the problem that sometimes my app is run as
administrator and sometimes not. Both times, the values that are read
from the registry are different.

How can I find out if my app has full rights or not?

Thanks,
Jens

My System SpecsSystem Spec
Old 03-19-2007   #4 (permalink)
Jesper
Guest


 

Re: app data in HKEY_LOCAL_MACHINE

You will need to inspect the token used to launch the app. Specificallly, you
need to enumerate token groups and find out if the Administrator's group is
present and not set to deny only. If so, you can write to HKLM. If not, you
need to write elsewhere.

"Jens Müller" wrote:

> Hello,
>
> > It got virtualized:
> > http://msdn2.microsoft.com/en-us/library/aa965884.aspx

>
> Ok thanks. Now I have the problem that sometimes my app is run as
> administrator and sometimes not. Both times, the values that are read
> from the registry are different.
>
> How can I find out if my app has full rights or not?
>
> Thanks,
> Jens
>
>

My System SpecsSystem Spec
Old 03-19-2007   #5 (permalink)
Phil Wilson
Guest


 

Re: app data in HKEY_LOCAL_MACHINE

IIRC, the IsUserAnAdmin API returns the right answer, true if you're
elevated, false otherwise. In .NET, I suspect that WindowsPrincipal.IsInRole
("Administrators") does the right thing, although I haven't tested that one.
--
Phil Wilson
[Microsoft MVP Windows Installer]

"Jens Müller" <jens_0.no.-spam@hotmail.com> wrote in message
news:%23aqeViZaHHA.3612@TK2MSFTNGP04.phx.gbl...
> Hello,
>
>> It got virtualized:
>> http://msdn2.microsoft.com/en-us/library/aa965884.aspx

>
> Ok thanks. Now I have the problem that sometimes my app is run as
> administrator and sometimes not. Both times, the values that are read from
> the registry are different.
>
> How can I find out if my app has full rights or not?
>
> Thanks,
> Jens



My System SpecsSystem Spec
Old 03-19-2007   #6 (permalink)
Jesper
Guest


 

Re: app data in HKEY_LOCAL_MACHINE

I don't think that will work. The problem is that in Vista you have admins
that are currently admins, and admins that can become admins by accepting a
UAC dialog. The IsUserAnAdmin API does not distinguish between the two.

"Phil Wilson" wrote:

> IIRC, the IsUserAnAdmin API returns the right answer, true if you're
> elevated, false otherwise. In .NET, I suspect that WindowsPrincipal.IsInRole
> ("Administrators") does the right thing, although I haven't tested that one.
> --
> Phil Wilson
> [Microsoft MVP Windows Installer]
>
> "Jens Müller" <jens_0.no.-spam@hotmail.com> wrote in message
> news:%23aqeViZaHHA.3612@TK2MSFTNGP04.phx.gbl...
> > Hello,
> >
> >> It got virtualized:
> >> http://msdn2.microsoft.com/en-us/library/aa965884.aspx

> >
> > Ok thanks. Now I have the problem that sometimes my app is run as
> > administrator and sometimes not. Both times, the values that are read from
> > the registry are different.
> >
> > How can I find out if my app has full rights or not?
> >
> > Thanks,
> > Jens

>
>
>

My System SpecsSystem Spec
Old 03-20-2007   #7 (permalink)
Jens Müller
Guest


 

Re: app data in HKEY_LOCAL_MACHINE

> I don't think that will work. The problem is that in Vista you have
> admins that are currently admins, and admins that can become admins
> by accepting a UAC dialog. The IsUserAnAdmin API does not distinguish
> between the two.


That's ecactly the issue. Thanks anyway.
Jens

My System SpecsSystem Spec
Reply
Update your Vista Drivers

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hkey_local_machine\components Lazaruslong Vista General 1 08-22-2008 11:27 AM
KHz sample rate data and other key data fields missing from audio/media file properties view tophy Vista file management 4 04-14-2008 09:35 AM
appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY keepout Vista General 15 09-15-2007 08:50 PM
HKEY_LOCAL_MACHINE\BCD00000000 ? SwampYankee Vista General 3 09-12-2007 09:04 AM
hkey_local_machine\system\currentcontrolset\control\update lostinto Vista account administration 0 01-03-2007 04:48 AM


Complimentary Industry Resources

Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today!




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 2005-2008

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 47 48 49 50 51