Jump to content

Help with registry changes


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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...

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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...