Solved

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

Posted on 2010-11-16
6
1,441 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
[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
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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
LVL 85

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.

688 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