HockeyFan Posted March 9, 2006 Share Posted March 9, 2006 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! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 9, 2006 Moderators Share Posted March 9, 2006 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! 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 More sharing options...
Moderators big_daddy Posted March 9, 2006 Moderators Share Posted March 9, 2006 Wouldn't it be easier to do this throuh group policy? Link to comment Share on other sites More sharing options...
HockeyFan Posted March 9, 2006 Author Share Posted March 9, 2006 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 More sharing options...
HockeyFan Posted March 9, 2006 Author Share Posted March 9, 2006 Not a very ethical request...Yes, I understand that it may sound that way, but its intent is not. Link to comment Share on other sites More sharing options...
CyberSlug Posted March 9, 2006 Share Posted March 9, 2006 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? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
HockeyFan Posted March 9, 2006 Author Share Posted March 9, 2006 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted March 9, 2006 Share Posted March 9, 2006 This might be one of those situtations that calls for MakeMeAdmin Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now