Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hkey_Current_User user not updating/ed with Hkey_User

Posted on 2008-06-09
8
Medium Priority
?
557 Views
Last Modified: 2010-04-21
I am trying to run a script to apply registry settings prior to runnig a job. One of the setting I'm applying is to uncheck "Hide Extentions for All Known File Types" in Explorer. The doc I've seen pointed me to the  "HideFileExt" value in Hkey_Current_User stating that any changes to the registry here would immediatly be updated to the current user in Hkey_Users (and visa versa).

I found that running the script doesn't work. Upon further investigation I found that changing the key in "regedit" for the Hkey_Current_User did not update the user in Hkey_Users and did not update the settiing in explorer. Updating the setting from  Folder Options in Explorer updates the user in Hkey_Users but not Hkey_Current_User.  Updating the user in Hkey_Users updates the setting in Explorer, but not HKey_Current_User.
0
Comment
Question by:pamarra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 21744520
Disable UAC inthe user management of Vista.
0
 

Author Comment

by:pamarra
ID: 21744585
Disabling UAC is not an option for security reasons.
0
 
LVL 5

Expert Comment

by:virtuatech
ID: 21744637
You need to find out the user's SID.   Use PStools psgetsid (http://technet.microsoft.com/en-us/sysinternals/bb897417.aspx).  Once you have that, you can go to the computer's HKEY_USERS key and find the user there.

psgetsid useraccountname

output should be something like:

SID for COMPUTER\administrator:
S-1-5-21-1229272821-117609710-725345543-500
0
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 
LVL 88

Expert Comment

by:rindi
ID: 21744754
Then you have to use the run as administrator option.
0
 

Author Comment

by:pamarra
ID: 21745962
Thanks Rindi and virtuateh for the input. it helps me understand my issue a l little better. There are two accounts in HKey_Users. Both have the same SID one ending in 500 (the hidden administer I think) and the other ending in 1000. My script needs to "Run as Administer" on the user account. When the the script runs, the Hidden adinistrator user gets updated when the Hkey_Current_User is updated. ( I'm thinking because I'm running as administrator) when the job ends I'm back in my standard user.  When I turn off UAC, and run a reg add to update HideFileExt in command prompt (NOT using "Run as administrator) it works. Is there a way to run a script as administrator  and then drop the admin privilages to point to the standard user or run a script that calls a job to run as admnistrator and another to run as standard user, my goal being to run a single job that performs all my tasks.

   
0
 
LVL 5

Accepted Solution

by:
virtuatech earned 750 total points
ID: 21746474
I'm not sure what script you're using, but in command prompt it's:
runas /user:domain\useraccount "regedit.exe"
Though it requires password input after that is executed.  Well, here's an idea: if you're using vbscript, you can do:
runas /user:administrator "cscript myscript.vbs"

Hope that helps.
0
 

Author Comment

by:pamarra
ID: 21797005
My script is actually a batch job. my final solution was to create 2 batch jobs. Run from the standard user comand prompt, the first job performs all the processes that need to be applied to the current user. It then calls the 2nd batch using the runas (administrator) command. I'm asked for the Administrator password and all my processes needing administrator priviliages are performed.  Thanks virtuatech, and enjoy the points! :)  
0
 

Author Closing Comment

by:pamarra
ID: 31465454
Thanks for the help. I've posted a comment explaining how I utilized your solution.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So who is this article for? If you are like most of the computer users out there, you probably only realize the meaning of 'System maintenance' after something goes wrong. This article is for you if you care about keeping your system working opti…
There are many reasons a PC runs slower than when it was new, ranging from malicious software intended to mess things up to simple general Windows use.  Your PC performance may slowly degrade over time without you noticing but when you buy a PC from…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question