Sign in to follow this  
Followers 0
HockeyFan

Help with registry changes

8 posts in this topic

Can anyone offer some advice on how to write a script that will change a non-admin's HKCU registry hive without using Runas? I know that when I use runas it loads the admins HKCU registry hive and changes are not made to the user's HKCU hive.

What I am trying to do is run a script that changes a user's IE Home Page and locks it so that it can not be changed.

; Script Start
AutoItSetOption("TrayIconHide", 0);0 = show icon (default), 1 = hide icon.
Break(0);1 = Break is enabled (user can quit) (default), 0 = Break is disabled (user cannot quit).
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ","http://www.google.com/")
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel", "HomePage", "REG_DWORD", 00000001)
Exit

Thanks! :o

Share this post


Link to post
Share on other sites



Can anyone offer some advice on how to write a script that will change a non-admin's HKCU registry hive without using Runas? I know that when I use runas it loads the admins HKCU registry hive and changes are not made to the user's HKCU hive.

What I am trying to do is run a script that changes a user's IE Home Page and locks it so that it can not be changed.

; Script Start
AutoItSetOption("TrayIconHide", 0);0 = show icon (default), 1 = hide icon.
Break(0);1 = Break is enabled (user can quit) (default), 0 = Break is disabled (user cannot quit).
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ","http://www.google.com/")
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel", "HomePage", "REG_DWORD", 00000001)
Exit

Thanks! :o

Not a very ethical request...

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Wouldn't it be easier to do this throuh group policy?

Share this post


Link to post
Share on other sites

Wouldn't it be easier to do this throuh group policy?

Yes, but we are not running AD and my organization what's to change all user's home page to the corporate site and not allow them to change it. This effects roughly 1000 or so PC's in the field.

I was trying to script something so that there were be no user intervention other than clicking on an exe.

Share this post


Link to post
Share on other sites

Not a very ethical request...

Yes, I understand that it may sound that way, but its intent is not.

Share this post


Link to post
Share on other sites

Does the Windows 2000/XP command-line version of runas (not AutoIt's function) have options like /profile and /noprofile and /env that solve the registry loading issue?

Yes, but that requires you to type in a password. :o

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0