Solved

Need help to make some changes under the following registry hive HKEY_CURRENT_USER\

Posted on 2010-11-16
6
1,393 Views
Last Modified: 2012-06-27
Our users are do NOT have admin rights to their computers. I am facing the following problem since the MSI provided by MS http://support.microsoft.com/default.aspx?scid=kb;en-us;175500 needs admin right in order to be installed.

The problem is that if I deploy the MSI with SCCM I can choose to run it with admin rights however since the change is applied to the HKEY_CURRENT_USER\ hive I guess the change it is NOT applied correctly to the current user.

Is there anyway that I could make this change? Basically I need the MSI to be executed as the user so that the changes to the HKEY_CURRENT_USER\Software\Internet Explorer\ etc... are applied to the current user.

If SCCM can not be used is there anyway to do this with a script or ADM template via GPO?

Thank you
0
Comment
Question by:llarava
6 Comments
 
LVL 1

Expert Comment

by:wlramsey
ID: 34147357
I have ran many installs with a VBScript as their login script.  You could do something like this:

	Set Shell = CreateObject("WScript.Shell")
	Set objNetwork = CreateObject("WSCript.Network")
	Set objfilesys = CreateObject("Scripting.FileSystemObject")
        If objfilesys.FileExists(strfilepath32 & strfilename) Then
		WScript.StdOut.Writeline "Symantec (32) Installed"
	Else 
         	Wscript.stdout.writeline "Installing Symantec Antivirus (32), please wait..."
		'Run 32 bit installer
		Shell.Run chr(34) & "\\servername\path_to_install.exe" & chr(34)
       End If

Open in new window


Since this runs after the user logs in, it should have access to their HKCU Hive.

At least, I have never had any problems running scripts this way.
0
 

Author Comment

by:llarava
ID: 34147459
Thank you for your help but is not going to work.

The problem is that the MSI needs admin rights and changes have to be applied to the HKEY_CURRENT_USER\ hive
So if I run the script with any other user like the administrator then the registry changes will NOT be applied to the right hive.

Using a Registry Editor such as Regedt32.exe, open this key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles

Note If the Styles key is not present, create a new key that is called Styles.
Create a new DWORD value called "MaxScriptStatements" under this key and set the value to the desired number of script statements. If you are unsure of what value you need to set this to, you can set it to a DWORD value of 0xFFFFFFFF to completely avoid the dialog.

 
0
 
LVL 6

Expert Comment

by:ipajones
ID: 34147886
regedit /s works when user access to regedit is disabled through GPO
--IJ
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 34149398
Just add it to the logon script.
That's, for example, a one-liner in a batch logon script:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles" /v "MaxScriptStatements" /t REG_DWORD /d 0xFFFFFFFF /f

As VB script, it's a bit longer:

Const HKEY_CURRENT_USER = &h80000001

strComputer = "."

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Acme\Microsoft\Internet Explorer\Styles"

strValueName = "MaxScriptStatements"

intValue = CLng(&hFFFFFFFF)

objReg.CreateKey HKEY_CURRENT_USER, strKeyPath

objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, intValue

Set objReg = Nothing

Open in new window

0
 
LVL 65

Expert Comment

by:RobSampson
ID: 34150404
oBdA is right.  You don't need to deploy the MSI.  All the MSI does is run the registry change that you have mentioned.  Therefore, just use oBdA's code as a Logon script, and you will have applied the patch to all users' HKCU paths.

Regards,

Rob.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 34151821
Most installations modify prefs and the like on first run, and they have full access to hkcu by default, so that's usually when the erg entries are set....

Might even have a first run from the windows installer when the limited user logs on.....
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This collection of functions covers all the normal rounding methods of just about any numeric value.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now