Microsoft Office settings copy to another profile on Windows 10

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
falcios
Posts: 43
Joined: 02 Mar 2017 05:38

Microsoft Office settings copy to another profile on Windows 10

#1 Post by falcios » 20 Sep 2023 05:22

I backed up most of my Microsoft Office settings, some of which include
Excel Templates
Normal Template
Toolbars
AutoCorrection ACL Files

How do I copy these settings files to 5 different profile names.

In the script, I don't want to repeat all the commands for each profile. I would like to have only one set of commands and have DOS ask for my input as to what the profile name to copy to and to makes changes accordingly.

I hope this makes sense.
How can I go about creating a script as I mentioned?

Thanks in advance

Aacini
Expert
Posts: 1914
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: Microsoft Office settings copy to another profile on Windows 10

#2 Post by Aacini » 20 Sep 2023 12:25

First of all, I encourage you to carefully read this post (that is placed at beginning of this forum, so you surely have seen before).

Then, I invite you to read this funny post.

Finally, you should edit your question and add all the missing details...

Antonio

Batcher
Posts: 74
Joined: 16 Apr 2009 10:36

Re: Microsoft Office settings copy to another profile on Windows 10

#3 Post by Batcher » 20 Sep 2023 20:06

NoAsk.bat

Code: Select all

@echo off
set "Profile1=C:\Users\UserA"
set "Profile2=C:\Users\UserB"
set "Profile3=C:\Users\UserC"
set "Profile4=C:\Users\UserD"
set "Profile5=C:\Users\UserE"
for %%i in ("%Profile1%" "%Profile2%" "%Profile3%" "%Profile4%" "%Profile5%") do (
    if exist "%%i" (
        REM your copy commands
        copy "xxx" "%%i"
    )
)

Batcher
Posts: 74
Joined: 16 Apr 2009 10:36

Re: Microsoft Office settings copy to another profile on Windows 10

#4 Post by Batcher » 20 Sep 2023 20:10

ExcludeProfile.bat

Code: Select all

@echo off
for /f "delims=" %%i in ('dir /b /ad "C:\Users" ^| findstr /v /b /e /c:"%username%" /c:"Public"') do (
    REM your copy commands
    copy "xxx" "%%i"
)

falcios
Posts: 43
Joined: 02 Mar 2017 05:38

Re: Microsoft Office settings copy to another profile on Windows 10

#5 Post by falcios » 21 Sep 2023 06:32

Thanks Batcher for your help.

I will give it a try. I have a basic knowledge of DOS commands. I hope I can make your batch file work for my situation.

Thanks in advance.

Post Reply