![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Registry rights under Vista Hello, I am a developer. What parts of the Windows registry are writable and readable under an Standard User account? I assume that branches off HKEY_CURRENT_USER\Software are okay, but I need to be able to make changes for all users. If this can only be done under an Adminstrator account I still have a problem. I can create a key under HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator account, but I get an access violation when I try to create it by calling RegCreateKeyEx from within my application. Is this the right location in the registry for all-user information, and, if so, how do I write to it from within an application? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Registry rights under Vista "DavidW" <no@xxxxxx> wrote in message news cV8l.125866$sC4.70343@xxxxxxQuote: > Hello, > > I am a developer. What parts of the Windows registry are writable and > readable under an Standard User account? I assume that branches off > HKEY_CURRENT_USER\Software are okay, but I need to be able to make changes > for all users. If this can only be done under an Adminstrator account I > still have a problem. HKEY_CURRENT_USER of other users. Quote: > I can create a key under HKEY_USERS\.DEFAULT\Software in Regedit in an > Administrator account, but I get an access violation when I try to create > it by calling RegCreateKeyEx from within my application. Is this the right > location in the registry for all-user information, and, if so, how do I > write to it from within an application? Have look at the Windows Installer - it is designed to support the installation type that you need. http://msdn.microsoft.com/en-us/libr...88(VS.85).aspx Unfortunately, this is not very simple or intuitive as we'd like it ![]() Your team or project lead should be able to guide you further. Good luck, --PA |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Registry rights under Vista Tyro wrote: Quote: > You are a developer?? And have no knowledge of Vista? Microsoft > provides that to you. created in RegEdit but the same key cannot be created from an application? It is not under RegCreateKeyEx in the VC++ documentation. Microsoft probably provides the answer to just about every question asked here...somewhere. The hardest part about writing software used to be designing and writing your code. Now it is finding the right information. Quote: > You sound like a hacker. Quote: > > Tyro > > > "DavidW" <no@xxxxxx> wrote in message > news cV8l.125866$sC4.70343@xxxxxxQuote: >> Hello, >> >> I am a developer. What parts of the Windows registry are writable and >> readable under an Standard User account? I assume that branches off >> HKEY_CURRENT_USER\Software are okay, but I need to be able to make >> changes for all users. If this can only be done under an >> Adminstrator account I still have a problem. I can create a key under >> HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator account, >> but I get an access violation when I try to create it by calling >> RegCreateKeyEx from within my application. Is this the right >> location in the registry for all-user information, and, if so, how >> do I write to it from within an application? |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Registry rights under Vista Pavel A. wrote: Quote: > "DavidW" <no@xxxxxx> wrote in message > news cV8l.125866$sC4.70343@xxxxxxQuote: >> Hello, >> >> I am a developer. What parts of the Windows registry are writable and >> readable under an Standard User account? I assume that branches off >> HKEY_CURRENT_USER\Software are okay, but I need to be able to make >> changes for all users. If this can only be done under an >> Adminstrator account I still have a problem. > You're right. Standard user account cannot modify global system > branches or HKEY_CURRENT_USER of other users. Quote: Quote: >> I can create a key under HKEY_USERS\.DEFAULT\Software in Regedit in >> an Administrator account, but I get an access violation when I try >> to create it by calling RegCreateKeyEx from within my application. >> Is this the right location in the registry for all-user information, >> and, if so, how do I write to it from within an application? > This is one of locations. > Have look at the Windows Installer - it is designed to support > the installation type that you need. > http://msdn.microsoft.com/en-us/libr...88(VS.85).aspx the app's installation to enable it to write to that location once it's installed and someone runs it. I did notice that if the app was launched from the installer (i.e., checkbox to launch when installation complete) the accesses worked, but they did not work on subsequent launches. Quote: > Unfortunately, this is not very simple or intuitive as we'd like it ![]() attribute? I'm using InnoSetup for the installer. Quote: > Your team or project lead should be able to guide you further. Quote: > Good luck, |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Registry rights under Vista DavidW wrote: Quote: > Can you give me an idea what I'm looking for? Some sort of installation > attribute? I'm using InnoSetup for the installer. that can be automatically "elevated", so it can do "administrative" install for all users. This is the only valid way to install a system-wide app by a no-admin user (if enabled by policy). Or, you can redesign the app so that it can be installed locally for each user, and not require tampering with global system locations. I haven't used Inno for a while - maybe their latest versions support what you need. The version I knew, did not. Regards, --PA |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Registry rights under Vista "DavidW" <no@xxxxxx> wrote in message news cV8l.125866$sC4.70343@xxxxxxQuote: > Hello, > > I am a developer. What parts of the Windows registry are writable and > readable under an Standard User account? I assume that branches off > HKEY_CURRENT_USER\Software are okay, but I need to be able to make changes > for all users. If this can only be done under an Adminstrator account I > still have a problem. I can create a key under > HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator account, but I > get an access violation when I try to create it by calling RegCreateKeyEx > from within my application. Is this the right location in the registry for > all-user information, and, if so, how do I write to it from within an > application? > able to edit other user or machine registry data since Windows 2000. http://msdn.microsoft.com/en-us/library/ms995853.aspx The only difference in Vista is that by default, unelevated admin users can't either. http://www.kinook.com/blog/?p=40 You might want to rethink whether you really have to do it, but if you must modify the registry for all users, during installation (require admin rights), you could make a subkey of HKEY_LOCAL_MACHINE editable by all users. -- --------------------- Kyle Alons http://www.kinook.com |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Registry rights under Vista Kyle Alons wrote: Quote: > "DavidW" <no@xxxxxx> wrote in message > news cV8l.125866$sC4.70343@xxxxxxQuote: >> Hello, >> >> I am a developer. What parts of the Windows registry are writable and >> readable under an Standard User account? I assume that branches off >> HKEY_CURRENT_USER\Software are okay, but I need to be able to make >> changes for all users. If this can only be done under an >> Adminstrator account I still have a problem. I can create a key under >> HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator account, >> but I get an access violation when I try to create it by calling >> RegCreateKeyEx from within my application. Is this the right >> location in the registry for all-user information, and, if so, how >> do I write to it from within an application? >> > Your question applies to much more than Vista. Non-admin users > haven't been able to edit other user or machine registry data since > Windows 2000. http://msdn.microsoft.com/en-us/library/ms995853.aspx for an administrator. It works in XP. Quote: > The only difference in Vista is that by default, unelevated admin > users can't either. > http://www.kinook.com/blog/?p=40 either. The call just fails with "Access denied". Quote: > You might want to rethink whether you really have to do it, associated with it apply to all users. Most of my registry values are in HKEY_CURRENT_USER. Quote: > but if > you must modify the registry for all users, during installation > (require admin rights), you could make a subkey of HKEY_LOCAL_MACHINE > editable by all users. don't mind switching to HKEY_LOCAL_MACHINE). |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Registry rights under Vista DavidW wrote: Quote: > Kyle Alons wrote: Quote: >> "DavidW" <no@xxxxxx> wrote in message >> news cV8l.125866$sC4.70343@xxxxxxQuote: >>> Hello, >>> >>> I am a developer. What parts of the Windows registry are writable >>> and readable under an Standard User account? I assume that branches >>> off HKEY_CURRENT_USER\Software are okay, but I need to be able to >>> make changes for all users. If this can only be done under an >>> Adminstrator account I still have a problem. I can create a key >>> under HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator >>> account, but I get an access violation when I try to create it by >>> calling RegCreateKeyEx from within my application. Is this the right >>> location in the registry for all-user information, and, if so, how >>> do I write to it from within an application? >>> >> Your question applies to much more than Vista. Non-admin users >> haven't been able to edit other user or machine registry data since >> Windows 2000. http://msdn.microsoft.com/en-us/library/ms995853.aspx > I know, but the difference with Vista is that the RegCreateKeyEx call > fails even for an administrator. It works in XP. > Quote: >> The only difference in Vista is that by default, unelevated admin >> users can't either. >> http://www.kinook.com/blog/?p=40 > And that appears to be what's killing me. I don't get an elevation > prompt either. The call just fails with "Access denied". prompt isn't triggered by behavior that requires elevation. It is triggered by the file name or the manifest embedded in the executable. Google for runAsInvoker vs runAsAdmin. Once you mark your program runAsAdmin then the elevation prompt will appear and RegCreateKeyEx will succeed. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to access a registry entry wo no access rights | Vista security | |||
| Registry Search Tool... Cleaning Up Vista Registry... | Vista General | |||
| No rights on HKEY_Local_Machine registry map 'optionalcomponents' | Vista General | |||
| Wise Registry Cleaner vs AusLogics Registry Defrag vs CCLeaner? | Vista performance & maintenance | |||
| Registry Key Error - Insufficient Access Rights | Vista performance & maintenance | |||