Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
Mr.X

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

Share this post


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

Share this post


Link to post
Share on other sites

Did not know I have to explain why about my requests, anyway thanks for your "kind" help.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...