Re: writing to registry in vista from guest account




"alexia" <alexia.bee@xxxxxxxxx> wrote in message news:053a8328-29c5-47f4-bc7a-8f1f1f367a38@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hello Arnold,

Thanks for the reply, though I'm a little confused (English is not my
mother's tongue).
I have few questions if I may:

1. My application needs to be able to run in any user type. It should
save user settings as he selected. Should I save it in
HKEY_CURRENT_USER (will this mean that each user will save it settings
in his own HKCU?)
or in xml file at "Application Data" folder?

Once again, I bring you back to *Virtualization* on Vista, because based on each user, they will have their own VirtualStore in the registry or in case of something happening with the file-system such as a folder.

<copied>

Registry virtualization works similarly. In this case, the HKEY_LOCAL_MACHINE\SOFTWARE hive is virtualized so that applications which attempt to store configuration information in system-wide portions of the Registry are re-directed to a new introduced structure under HKEY_CLASSES_USER\Classes\VirtualStore\MACHINE\SOFTWARE.

As with file virtualization, each user on a system will have their own copy of configuration information that was previously issued once on a global basis.

<copied>

<http://www.symantec.com/community/article/2665/folder-virtualization-concepts-windows-vista>



2. Even though I used manifest when building the application, I still
get the UAC prompt and need to enter admin password when running the
application. My assembly hasn't been digitally signed yet.


That is correct you're going to get prompted by UAC, even if you are using the manifest.

The key here is to make your application to only need Standard user rights to execute the solution. By making your application to work with Standard user rights, no UAC escalation or prompt is required for the solution to execute. You also don't need a manifest for the application, if it's made to run with Standard user rights and not Admin user rights.



3. My C# calls C++ dlls. Do I need to build the Dlls with manifest
also?


This is your problem I think where the calls to those C++ dlls which might be COM solutions require UAC privileged escalation to Admin rights in order to execute the solution.


4. I noticed that if UAC is disabled, I can't write to HKLM registry
while if UAC is enabled I can write.


Like I said, even with UAC disabled, your user admin account is not an account that has full admin rights on Vista.

There is only one user-admin account that has full admin rights at all times like it does on XP. That is the hidden admin account on Vista, the link that I gave you. No other admin account on Vista has the power of that hidden Vista admin account. And even in some situations that user account is denied access to critical areas.



I hope the programming in Windows 7 will be mush easier than
programming in VISTA. It seems that all the advantages programming in
C# is reduced if doing it in VISTA.


I understand that *Virtualization* is going away on Windows 7, but you have to recognize that Vista and Windows 7 are not like XP or Win 2k workstation O/S(s). Vista and Windows 7 are closed by default O/S(s) and they have been engineered to protect themselves from the user no matter what type of user account is being used.


http://www.developer.com/net/net/article.php/3695651



.



Relevant Pages

  • Re: admin password
    ... I was using the 'admin' as mine, so i created a new 'CompAdmin' and made it the administrator, then went back and made mine a standard, everything else is standard. ... If your password was setup as and you type or they all infer the same thing but not to Vista. ... I don't understand what you mean when you say "I learned about the need to have separate admin account" separate being the key word? ...
    (microsoft.public.windows.vista.general)
  • Re: Error 2738 / Error 0x80004005
    ... I also run vista as a admin, I turned off UAC and run the dos shell as ... but you should NOT be running on a daily basis in an admin account. ... It's not good practice and that is why in Vista accounts are created as Standard users by default, ...
    (microsoft.public.windows.vista.general)
  • Changing an Admin acct into a Standard acct
    ... I have been working in Vista for the first time for a couple of weeks now. ... I've been reading up on security issues in Vista and realize that I should have set myself up as a Standard user and only invoke the Admin account when I wanted to. ...
    (microsoft.public.windows.vista.security)
  • Re: is there a way to shut off all the permissions in Vista?
    ... programs I was trying to get set up wouldn`t let me take over as Admin so I ... I know vista is about security but it has gone ... admin wouldn`t work or it was too hard to get permission set up as admin. ... An Admin account can do ANYTHING on the computer..... ...
    (microsoft.public.windows.vista.general)
  • Re: Vista Bus to SBS2003R2 connectcomputer problems . . .
    ... On the Vista Workstation, right click on the IE icon on the desktop and choose run as Adminstrator ... protected mode also add the server FQDN or IP to the list of trusted sites. ... Also tried all flavours of running the procedure with admin rights. ... Small Business Server Network Configuration Wizard: ...
    (microsoft.public.windows.server.sbs)