Mr.X Posted April 27, 2016 Share Posted April 27, 2016 I need a change script to change some registry entries for M$ Excel program (solely 2010, 2013 and 2016), to make it work along with Sandboxie. I can't do a fixed reg file since it has some variables that changes and become unique on every installation on every different scenario. Requirements: 1. The script needs to make a backup (reg file) of the following entries as a first function (here don't matter Office version or achitecture): HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open HKEY_CLASSES_ROOT\Excel.SheetMacroEnabled.12\shell\Open 2. Then, the script must be able to make the following changes depicted in the image: The image shows only Excel.Sheet.8 entry yet the script must consider Excel.Sheet.12 and Excel.SheetMacroEnabled.12 as well. To all the scriptmasters in here, thanks in advance for you help. Link to comment Share on other sites More sharing options...
gunsmokingman Posted April 28, 2016 Share Posted April 28, 2016 Here are some links for you to try and work out what you need done 1:\ Reading From and Writing to the Local Registry 2:\Changing Registry Data 3:\How Can I Create a New Registry Key Link to comment Share on other sites More sharing options...
Yzöwl Posted April 28, 2016 Share Posted April 28, 2016 As you haven't provided sufficient information to persuade me otherwise could you explain why, if your intending to change settings for the interactive user, you aren't making changes to HKEY_CURRENT_USER\Software\Classes instead of HKEY_CLASSES_ROOT. Please be aware that this Member has also asked this question elsewhere. Could you please tell me why if you're only wanting to change these settings on the PC's of your Brother, Son, Wife and yourself why you would wish to script something that would take only 1 minute to perform on each of the four machines once. Link to comment Share on other sites More sharing options...
Mr.X Posted April 28, 2016 Author Share Posted April 28, 2016 Did not know I have to explain why about my requests, anyway thanks for your "kind" help. Link to comment Share on other sites More sharing options...
Yzöwl Posted April 29, 2016 Share Posted April 29, 2016 Do a REG QUERY of each of the six known registry locations within a FOR LOOP and put the output into VARIABLES. Replace the last four characters of the saved VARIABLES with the new strings REG ADD the six known registry locations with the updated VARIABLES REG DELETE the three known keys 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