![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| | #4 (permalink) |
| | 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 Specs![]() |
| | #5 (permalink) |
| | 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 Specs![]() |
| | #6 (permalink) |
| | 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 Specs![]() |
| | #7 (permalink) |
| | 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 Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| HKEY_LOCAL_MACHINE problem | Vista performance & maintenance | |||
| No rights on HKEY_Local_Machine registry map 'optionalcomponents' | Vista General | |||
| HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Lsa | Vista General | |||
| Hkey_local_machine\components | Vista General | |||
| HKEY_LOCAL_MACHINE\BCD00000000 ? | Vista General | |||