tekniik Posted July 29, 2009 Posted July 29, 2009 (edited) So the scenario is that we just moved to a new Intranet website on our domain. The intranet site is set as the default home page on our image. My objective is too change the home page via the registry in a log on script. So the very basic logic would be:If http://old_intranet is the start page change to http://new_intranetIf http://old_intranet is not the start page, do nothingThe reason for not just changing everyone all at once is that I work at a law firm and I know we will get a lot of help desk calls from partners if we change their yahoo finance (or whatever) home page. I know how to change the site for everyone and know I can run a reg query command to see what it is currently set too, just having a problem putting it all together. Any assistance would be appreciated.Domain - Windows 2k3Clients - XP SP2Thanks Edited July 29, 2009 by tekniik
Yzöwl Posted July 29, 2009 Posted July 29, 2009 Which key are you checking/changing `"Start Page"=` on?HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\MainHKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\MainHKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MainHKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\MainWhat is the 'exact string' instead of the following?http://old_intranethttp://new_intranetAlthough you can change the key to suit, the URL string could be more important to the formation of an appropriate script solution than you may think!
tekniik Posted July 29, 2009 Author Posted July 29, 2009 Thanks, I am looking to replace:HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MainThe old site is listed as http://luceweb and the new site is http://lucenet. Thanks!
Yzöwl Posted July 29, 2009 Posted July 29, 2009 Something along these lines should get you there:@Echo off&SetlocalSet K_="HKCU\Software\Microsoft\Internet Explorer\Main"Set V_="Start Page"Set O_=lucewebSet N_=http://lucenetReg query %K_% /v %V_%|Find "%O_%">Nul 2>&1&&( Reg add %K_% /v %V_% /d "%N_%" /f>Nul)
tekniik Posted July 29, 2009 Author Posted July 29, 2009 Tested on a few machines and it worked great.Thank You!!!
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