View Full Version : RunAs + HKEY_Current_User = ??

03-08-2008, 06:45 PM
Hi guys,

Here is my problem:

I'm working on a Installscript MSI project, my setup needs to be installed for all users, which means, change regional setting for all users exist on local machine. The registry setting of regional setting are under HKEY_Current_User/Control Panel/Internal. I successfully loaded user profiles(except for current login user) under HKEY_USER, change them and unload them. Then I changed registry setting for current user through HKEY_Current_User.

But, when I run this setup as Admin, the current user's setting did NOT change. I realized when I was in runas mode, HKEY_Current_User is NOT the real registry setting for current user, it was Admin's! Plus, as this user was already logged in, I was not able to load this user's profile into registry, which means, I lost his setting in the setup process.

My question is, is there a way I can change 'his' registry settings in the setup project? or I can't get this done in RunAs mode?