Link to home
Start Free TrialLog in
Avatar of llarava
llaravaFlag for Afghanistan

asked on

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

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
Avatar of William Ramsey
William Ramsey
Flag of United States of America image

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.
Avatar of llarava

ASKER

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.

 
regedit /s works when user access to regedit is disabled through GPO
--IJ
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.....