Jump to content

[REQ] - Script to change some Excel's registry entries


Recommended Posts

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:

v4d4PBi.png

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


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

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

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
  • Recently Browsing   0 members

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