Solved

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

Posted on 2010-11-16
6
1,413 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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…
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…

831 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