You would think that Microsoft would make it easy to deploy Office 2013 with Group Policy! Well, they don’t – at least not in a traditional sense. To quote Microsoft, “the setup architecture for Office 2013 uses multiple .msi files and the Office Setup program is an executable (.exe) file.” Smelling spin, I tried out Bing’s new Hidden Meaning Translator:
In this walk-through, we are going to deploy Office 2013 with Group Policy Scripts and try to retain a bit of our sanity. Here goes!
Prep the Content
If your Office 2013 installation files are not currently on a network share, copy them to that location now. The share/folder permissions need to allow Domain Computers the ability to read/execute. If you currently use MDT for imaging, you can store the source files on the DeploymentShare. If you currently do not have a share, check out the “Sharing the Package” setting in this article.
Within the network folder containing setup.exe, right click and open an administrative command prompt. Type setup.exe /admin to launch the Microsoft Office Customization Tool. If you don’t have the right click option to launch an administrative command prompt, set it up now!
The Microsoft Office Customization Tool (OCT)
Once OCT has launched, create a new setup customization file and wait while the default settings are generated.
To start with, you will want to configure the following:
- Install location and organization name – Organization Name
- Licensing and user interface:
- Configure KMS or MAK product keys
- Accept the EULA
- Display Level: None
- Completion Notice: Unchecked
- Suppress modal: Checked
- No cancel: Unchecked
You will also want to modify the Setup properties to add a new property. To do this, select Add and type SETUP_REBOOT for the name and Never for the value.
You might also like to set what features/products are installed. You can do this under Features and Set feature installation status. I prefer to set any product that we use to Run from my computer. This ensure that all installation files are available when needed.
Finally, save this file to the Updates folder on your network share. This will ensure that setup.exe sees this file and incorporates your changes.
Configuring Config.XML
On your network share, open up your proplus.ww (or the *.ww folder that you have). Next, open config.xml in NotePad. If you use KMS, you can paste in the following text after the last <!– line:
<Configuration Product=”ProPlus”>
<Display Level=”None” CompletionNotice=”No” SuppressModal=”No” AcceptEula=”Yes” />
<AddLanguage Id=”match” />
<AddLanguage Id=”en-us” ShellTransform=”Yes” />
<Setting Id=”SETUP_REBOOT” Value=”Never” />
<Setting Id=”REBOOT” Value=”ReallySuppress”/>
<Setting Id=”AUTO_ACTIVATE” Value=”1″ />
</Configuration>
If you are using a MAK as your licensing type, you will need to add this line: <PIDKEY Value=”PRODUCTKEY_INQUOTES_NODASHES” />
Save this file and exit NotePad. If you are interested in the other settings for this file, see this TechNet article.
Create the Office 2013 GPO
The steps above configured Office to silently install. Now, we need to get that install onto our clients. Create a new GPO and a security group named APP_Microsoft Office 2013. Scope the GPO so that it only applies to your newly created security group.
Edit the GPO and navigate to Computer Configuration\Policies\Administrative Templates\System\Scripts. Set the Specify Maximum wait time for Group Policy Scripts setting to 1200. This will give the installation script a 20 minute period to run instead of the default 10 minutes.
Now go to Computer Configuration\Policies\Windows Settings\Scripts. Double click on Shutdown and then select Show Files. Right click and create a new text document. Name the file OfficeInstall.bat. Paste in the following script (which is based off of this Office 2010 Installation Script on TechNet):
setlocal REM ********************************************************************* REM Environment customization begins here. Modify variables below. REM ********************************************************************* REM Get ProductName from the Office product's core Setup.xml file, and then add "office15." as a prefix. set ProductName=Office15.PROPLUS REM Set DeployServer to a network-accessible location containing the Office source files. set DeployServer="\\SERVER\SHARE\Microsoft Office 2013 X86 2013\setup.exe" REM Set LogLocation to a central directory to collect log files. set LogLocation="\\SERVER\SHARE\Microsoft Office 2013 X86 2013\logfiles" REM ********************************************************************* REM Deployment code begins here. Do not modify anything below this line. REM ********************************************************************* IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86) REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key :ARP64 reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName% if NOT %errorlevel%==1 (goto End) REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS) :ARP86 reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName% if %errorlevel%==1 (goto Office) else (goto End) REM If 1 returned, the product was not found. Run setup here. :Office %DeployServer% echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt REM If 0 or other was returned, the product was found or another error occurred. Do nothing. :End Endlocal
You will need to edit the set DeployServer and set LogLocation lines to point to your setup.exe file and your (optional) log location. If you do choose to store log files on a network server, be sure to modify the logfiles folder permissions so that you computers can write to it. Be sure to add in your script to the shutdown script menu!
Note – some readers have had issues with the shutdown script option. If you want a more consistent install experience and don’t mind it impacting startup times for a bit, set the script as a startup script.
Configuring Microsoft Office with Group Policy Administrative Templates
So far, you have a completely silent Office install that is being pushed as a shutdown script with Group Policy. You will likely want to configure a few settings (such as autorecover times, default file types, etc) with Group Policy Administrative Templates.
You can download the complete Office 2013 ADMX set here. After downloading, extract them into your Group Policy Central Store. If you don’t have a central store setup, you can use this great (admittedly bias) guide to set one up.
Dumb Joke Alert: Why did the processor like the motherboard so much? Because he was BIOS! <- It’s funny because it sounds like bias! 🙂
Anyways, we enable the following settings in our environment:
Computer Configuration:
- Microsoft Office 2013 (Machine)/Updates: Enable Automatic Updates
- Microsoft Office 2013 (Machine)/Updates: Hide option to enable or disable updates
User Configuration:
- Microsoft Office 2013/First Run: Disable Office First run on application boot
- Microsoft Office 2013/Privacy/Trust Center: Automatically receive small updates to improve reliability
- Microsoft Office 2013/Privacy/Trust Center: Disable Opt-in Wizard on first run
- Microsoft Office 2013/Privacy/Trust Center: Enable Customer Experience Improvement Program
- Microsoft Outlook 2013/Account Settings/Exchange: Automatically configure profile
- Microsoft Outlook 2013/Outlook Options/Preferences/Calendar Options: Weather Service URL
For the weather service URL, specify this value (replacing your CITY/STATE in the URL):
http://weather.service.msn.com/data.aspx?weasearchstr=Brunswick-GA&src=outlook
And that is it! You can now deploy Office 2013 with Group Policy! Now carefully test the upgrade and enjoy that shiny (and bright) Outlook! If you want to learn more about Group Policy and how it will make your life easier, then subscribe to DeployHappiness and get great weekly tips (plus your free guide to the Windows 8 Administrative Start Menu)!
Questions:
Why a shutdown script:
I use a shutdown script so that user logons are not slowed at all. If you manage your desktop BIOS (and enable autostart), you can deploy it as a startup script.
Why isn’t the config.xml or the .MSP file specified in the install script?
If both of these files are in their correct locations, setup.exe does not need to know their location. Your config.xml file can be in the setup root (same folder as setup.exe) or in the product folder (proplus.ww). The MSP should be in the Updates folder.
Why do you write 1200+ word walk-throughs?
Because I love you guys. If you have any question/issues/comments about this deployment guide, be sure to leave your thought below.
I used the script and it works great, however, my company is cheap and we’re not installing office on everything. I was hoping to use item level targeting to run the script, however, that isn’t an option with scripts in GPO. Does anyone have any recommendations on how to do that?
You would need to change the security filtering side of the GPO. Instead of authenticated users, scope the GPO to just a security group. You would probably want to create a new security group and name it something like APP_Microsoft Office.
Thanks for the info! Not able to get the weather url to work. Have seen this referenced elsewhere to be a problem. I am using Office 2016 and Windows 10. The Weather Bar indicates the city and “Requesting” from which it never comes out of. Any ideas on how to get this to work? The url I would like to use is “http://openweathermap.org/” and the city set to Atlanta. Thanks!
By chance, is anything on your network blocking that connection request? A firewall possibly or web filter?
Hello,
Thank you so much for putting this together! I have used it with some success, but my problem is it leaves Lync 2010 behind. I configured my Office install with the OCT and was trying something very basic, but it is not working. I am fairly limited in my scripting skills, and was trying to get this basic script to work, but it does not. I have tried it as a startup and shutdown script. I am sure it is too simple and I am missing somethings.
\\network install location\Lync 2010\LyncSetup.exe /Silent /Uninstall
\\network install location\Office 2013 Pro Plus 32 bit\Office 2013\setup.exe
If this is too simplistic and I am missing a lot, do you know of a way to add a check for and uninstall of Lync 2010 to you good script?
Mike
Hey Mike – that solution should work fine. You can optimize it a bit by change the first line to call the Lync uninstall file on the computer. Use the Find Uninstall string tool from here: https://deployhappiness.com/resources/tool-downloads/
Run it and see what the local uninstall command for lync is. Call that command instead of your network uninstall command. If a machine doesn’t have the local uninstaller available, it will skip it faster.
Thanks Joseph! I will cobble it together and let you know….appreciate the response.
Mike
Yeah, not sure what is going on. I took your advice and used the msiexec with the uninstall file as the first line of my script followed by the second line to run the Office 2013 install which I configured to remove Office 2010. I made the 2 lines a batch file and applied it as a startup script to an OU with the computer acct. in it. Made sure the scope and delegation was correct and even ran a gpresult from the computer. The result file showed that the script ran successfully but but nothing happened. I ran the batch file from the computer with my domain admin acct and it removed Lync 2010, but the Office install did not start. So I ran the setup from the install location and it ran….not sure why my simple startup script did not work, but I may try to incorporate the Lync uninstall line into the script you configured. Thanks for the advice and help. I’ll let you know if the other plan works.
Mike
Good luck Mike!
Joseph,
I added a couple of lines to your script to uninstall Lync 2010 and it worked like a charm. Thanks again for getting back to me of stuff and for putting this together. This is what I added near the bottom of your script:
taskkill /f /im communicator.exe /t
taskkill /f /im ucmapi.exe /t
msiexec /x {81BE0B17-563B-45D4-B198-5721E6C665CD} /q
Mike
Awesome news! Glad you got everything sorted out.
Hi,
have you post an artical about office 2016?
Thanks!
Not yet Sam but I hope to have one up soon!
Hi,
Thank you for an awesome step by step guide you saved me.
No problem at all!!
Natasha, how did you get it to work as a system/pc shutdown script? Since the setup.exe spawns from the bat file which then finishes and the pc then shuts down before setup.exe completes. Did you do something in the windows office customization file? it seems odd I can’t get the pc to stay on for a shutdown script but you can doing the identical thing. Does yours work for a startup system script too?
Hi, I added mine as a startup script rather than a shutdown script.
During the startup script, is it able to finish before the user is able to login? That’s the problem I’m having. Doing it as a shutdown script requires multiple reboots.
It finishes it to an extent, when the user clicks on any of the Microsoft products for the first time it then pops up with ‘Please wait while Windows configures Microsoft Office…’ which doesn’t take long at all to finish – not even 3 minutes.
Hey. First off thanks for this great site and awesome articles. I know it has made my life a LOT easier. I believe I am missing something fundamental with this deployment. for the setup, I am using the setup.exe for deploying 365 from Microsoft. This exe has no /admin option. furthermore I am have an issue when running the shutdown script manually it comes up with options for the exe and does not install. It seems as though I have a incorrect setup folder. Can you please start with explanation on what setup files we need and where we can acquire them? Or if I am missing something else, please explain. Thanks for the article!
Thanks Jareth – I am not sure if this article will help but I did find this: http://blogs.technet.com/b/microsoft_in_education/archive/2013/11/11/what-are-my-options-to-deploy-office-365-proplus.aspx
Thank you very much for this! worked first time
No problem Aaron! Thanks for letting me know.
HI Aaron, how did you get it to work as a system/pc shutdown script? Since the setup.exe spawns from the bat file which then finishes and the pc then shuts down before setup.exe completes. Did you do something in the windows office customization file? it seems odd I can’t get the pc to stay on for a shutdown script but you can doing the identical thing. Does yours work for a startup system script too?
sadly I cannot get it to work. it runs manually with the script but does bring up the UAC box “do you want to allow the following program to make changes to this computer”. If I do yes it runs, Not sure if the UAC will be an issue tjough for a system shutdown script. I also noticed that the script did not use start /wait for the setup.exe so I thought the install was just being killed on shutdown. I noticed the other script did have it. So I added that and it did now take 20mins before a shutdown but did nothing. no msi’s being installed. Any ideas? very frusting it should all be so hard. I will try a startup script. shutdown could be problematic due to exe’s spawming multiple processes.
see this for , http://serverfault.com/questions/245393/how-do-you-wait-for-an-exe-to-complete-in-batch-file
after further research it appears the setup.exe when run breaks away from the calling bat file, so the bat file finishes while the setup runs. so as a shutdown script it cannot work since the setup.exe is then killed with the shutdown procedure. Using start /wait does not work either, it just launches a dos box and no setup.exe is actually launched. has anyone found and resolved these issues? I have it working as a startup script fine now. And it allows users to login and use their pc while it finishes off the install naturally.
Hey Peter – when it runs as a shutdown script, does the computer run for 10 minutes and shutting down or shutdown quickly?
it shutdowns quickly, as expected. all processes are terminated. I’m not sure how you can inform the OS to delay shutdown if the setup.exe breaks away from the calling bat process. I know the OS waits for the bat file to complete but it does know about the spawned setup.exe as a process to wait for. Unless there is some group policy setting needing changing.
So I’m a bit baffled how you got it to work as a shutdown script. Check yourself, you should see the setup.exe when run immedialty returns control back to the bat script and it completes.
after hours with the config file error message i found out, that i have to use
for my office 2013 proplus (german) version.
maybe it will help anyone and thank you man for the post.
No problem Mo! Thanks for letting us know what solved your problem.
Hi, for those of you having issues with the installation batch file shown above, try this. This is what I am using to upgrade from MS Office 2007 Enterprise to 2013 Professional Plus…
:: Upgrade Microsoft Office on Windows Computers
SET log=\\dc1\netlogon\Microsoft\Office\log
SET sucess=Office-Updated.csv
If exist “C:\Program Files (x86)” goto x64
goto x86
:x86
echo “using x86”
SET ostype=x86
if exist “%programfiles%\Microsoft Office\Office15\winword.exe” goto log2
echo “uninstalling office 12”
if exist “%programfiles%\Microsoft Office\Office12\winword.exe” start /wait \\dc1\netlogon\Microsoft\Office\office2007\setup.exe /uninstall enterprise /config wwsilentuninstallconfig.xml
echo “office 12 uninstalled; installing office 15”
if not exist “%programfiles%\Microsoft Office\Office15\winword.exe” \\dc1\netlogon\Microsoft\Office\office2013x86\setup.exe /config ProPlus.WW/config.xml
echo “office 15 installed”
goto log
:x64
echo “using x64”
SET ostype=x64
if exist “%programfiles%\Microsoft Office\Office15\winword.exe” goto log2
echo “uninstalling office 12”
if exist “%programfiles%\Microsoft Office\Office12\winword.exe” start /wait \\dc1\netlogon\Microsoft\Office\office2007\setup.exe /uninstall enterprise /config wwsilentuninstallconfig.xml
echo “office 12 uninstalled; installing visio 15”
if not exist “%programfiles%\Microsoft Office\Office15\visio.exe” start /wait \\dc1\netlogon\Microsoft\Office\visio2013x64\setup.exe /config VisPro.WW/config.xml
echo “visio 15 installed; installing office 15”
if not exist “%programfiles%\Microsoft Office\Office15\winword.exe” start /wait \\dc1\netlogon\Microsoft\Office\office2013x64\setup.exe /config ProPlus.WW/config.xml
echo “office 15 installed”
goto log
:log
If %log% ==None goto end
FOR /F “tokens=2,3” %%A IN (‘ping %computername% -n 1 -4’) DO IF “from”== “%%A” set “IP=%%~B”
echo %computername%,%ostype%,%IP:~0,-1%, %DATE% @ %TIME% >> %log%\%sucess%
goto end
:log2
If %log% ==None goto end
FOR /F “tokens=2,3” %%A IN (‘ping %computername% -n 1 -4’) DO IF “from”== “%%A” set “IP=%%~B”
echo %computername%,%ostype%,%IP:~0,-1%, %DATE% @ %TIME%. The application suite was already installed. >> %log%\%sucess%
goto end
:end
The reason that there are so many “echo xyz” is for diagnostic purposes to see where it goes awry in the event that something were to happen. (Would clearly have to be run manually on affected computer to avail of this)
Thanks for the script Jacob!
does this work for you as a shutdown script? How do you handle any UAC issues? And how does it handle spawned sub process’s launched from the setup.exe?
Such a great post! Thanks!
We’ve only run into one minor issue – We’re deploying ProPlus 2013 and the shutdown script works perfectly on shutdown (woo hoo!). We actually ended up not changing the config.xml because it kept whining about errors, which maybe is where this issue is coming in. Even though I set most features to do a full install (Word, PP, Excel, Shared Components, Publisher), the first time the end user starts Word (or any other Office application), they get “Please wait while Windows Configures Microsoft Office” It lasts for about 5 minutes.
It only happens the first time you start your first Office 2013 application. After that, they’re all good to go. (not repeatedly, like this: http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/outlook-2013-starts-configuration-every-time-its/b3c619b0-0020-48c6-b800-bf4b764b1cb9).
The five minute wait isn’t too big of a deal – but could I save the user some time by configuring something else in OCT? I’m not really sure if it logs anywhere what exactly it’s configuring.
Thanks!
Thanks Stead!
We have DHCP environment, DC-Server 2008 R2 and Clients – Windows 7 Professional. The DHCP is also user based i.e After user logs in only, the client PC will get IP. In this sceanrio, will the Deploying through GPO work? Even if it works, I want to install batch by batch only i.e 10 PCs at a time.How can I do that?
It should work – if the client machine can process Group Policy on startup – it will install the software.
You would link the GPO to different OUs at a time, limit connections to the share to 10 clients at time, or add machines to the group at a schedule.
Hey Team,
I have a few questions.
1. This should work for upgrading exiting machines that run an older version of office? As well as clean installs?
2. We have both x32 and x64 machines in our environment. How can i utilize this to install the 32 and 64 bit versions respectively.
Thanks so much
Sam
1. Yes. The upgrade settings are controlled in your MSP (setup.exe /admin)
2. Microsoft recommends that you use the 32 bit version of Office unless you have a specific need for the X64 version.
Looks like all XML is being stripped. Sorry for triple posting here.
Whoops, the XML got stripped from my reply. Sorry.
“”
“”
“”
Strip off the quotes.
Mike,
Your XML is invalid. Using config.xml from the Office 2013 install, the minimum valid XML file I could get looked like this:
Office won’t install if the config.xml isn’t valid XML.
I keep getting an error saying the config.xml isn’t valid. Actual error: “The setup configuration file \\server\share\office2013\proplus.ww\config.xml is not valid. Verify this file is formatted correctly and run setup again.”
My config.xml looks like this:
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
So everything is commented out except the install key and the activation. I tried adding a blank one like in the examples above (with just comment characters), but it gets the same results. Looked at permissions for the install files and config.xml and the everyone has full control. Any ideas?
I figured out the issue. The actual text in my XML was fine, but there was some kind of non-visible character or something that messed up the formatting. I had cut and pasted some things from several sources and likely had some format issues from that, but if you looked at the file, you couldn’t see it.
Here’s what I did to fix the bad XML:
Open the file in IE. If you can see the text, then the XML is fine. If you get a blank page (like I was), you have a bad file format. I ended up copying from a different config.xml and edited it after in notepad. But once I realized I could use IE to validate the file format, it got a lot easier. Hope that saves someone some time.
Hi, thanks for the guide.
I have followed all the steps, as a results the shutdown is really slow but when I restart nothing is installed.
I tried to launch the bat manually but I obtain an error related to the worn path.
“network cdrom and ram drives are not supported install paths”
Obviously the installation is on a network path…
Someone can shed some lights about it?
Thanks in advance
Did you set the customization settings in the script?
If you mean shutdown script, yes I have.
I have put my personal network path for installation file inside.
I’m trying to deploy office 2013 with windows server 2012 environment on windows 8.1 computers.
The problem is that apparently I cannot use a network path as a source path because its not supported from office 2013.
Ok I am an idiot, I have put the network path on the installation path inside the Microsoft office customization tool!
tenting now with the right path!
How did your testing go?
Joseph,
Apologies if this is covered elsewhere in comments.
I’m preparing for Office365 AD integration…
How do I change the user’s email address shown in Office365 when you first launch e.g. Word? At the moment it shows:
test-staff@mydomain.local
I have since changed the default UPN for the domain, and updated all users’ accounts’ primary UPN, AND changed their email addresses to this:
test-staff@mycompany.com
How do I get that to show in Office365?
Cheers!
Hi Mat – I couldn’t tell you the answer to that question. I haven’t ran into it yet. When you find out, post back here and let me know!
Hey, im having problems deploying it to my users. They do not have admin rights, is there something else i have to do, to make it work on them?(Window server 2012 with Windows 7 clients)
If you are using this as a shutdown or startup script, your users don’t need administrator rights.
I did follow the entire guide on this page, so i did put the script to run at shutdown. I tried to run the script manually on one of my clients, and ended up with an error(Clients need admin rights to uninstall current version). Its installed the Office 2010 starter edition as standard on all the computers in my domain.
My script looks like this:
setlocal
REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************
REM Get ProductName from the Office product’s core Setup.xml file, and then add “office15.” as a prefix.
set ProductName=Office15.PROPLUS
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=”\\kursserver\office_2013\setup.exe”
REM Set LogLocation to a central directory to collect log files.
set LogLocation=”\\kursserver\office_2013\logfiles”
REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************
IF NOT “%ProgramFiles(x86)%”==”” (goto ARP64) else (goto ARP86)
REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if NOT %errorlevel%==1 (goto End)
REM Check for 32 and 64 bit versions of Office 2013 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
:ARP86
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if %errorlevel%==1 (goto Office) else (goto End)
REM If 1 returned, the product was not found. Run setup here.
:Office
%DeployServer%
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End
Endlocal
To test the script, run it once as an administrator. Does it successfully install?
Cannot get the script to work on startup. If I run the script manually on the end user’s machine, it brings up the CMD prompt, shows a few errors about the name of the Product “Office15.ProPlus” ( this is the version I am using, also was wondering about Office 15 instead of Office 13). Then when I run the .bat file manually, the Office Setup box pops up and asks to “UPGRADE” or “CANCEL”. Any ideas? I thought it should uninstall the 2010 version first without prompting? By the way, I did not edit the XML file at all because I thought that was redundant of the OCT, or am I wrong?
Great post! Question though.. we have two Windows 2008 R2 DC’s in our system…. I downloaded the latest Office 2013 ADMX files to them and copied them to the c:\windows\policydefinitions folder. I could then see them in the GPMC and make changes.. I rebooted a client machine and the settting didn’t apply. However, if I go into RSOP.MSC, I can see the setting under “Extra registry settings” instead of something like “Word 2013”. Is that why the setting isnt taking affect? How do I make it work?
Hey Joe – sorry for the delay in replying.
Have you setup the group policy central store yet?
No worries! Actually yes, I did set that up. I *think* its working just trying to understand it. If users machine RSOP says “extra registry settings” does that simply mean that they would need the ADMX/L files copied to their machine in order to translate the office policies?
I downloaded the admx/l files, copied them to c:\windows\policydefinitions on a DC, then copied that folder to the sysvol area. I didn’t do any ‘cleaning up’ though.. little fuzzy on that aspect
Thank you for the step by step instructions. Everything installs fine, but now EVERY shutdown takes 20 minutes! (even after Office has been installed) Help! It’s driving people crazy, especially me since I do a lot of restarting.
In the script, we check for a registry key to be created – check to make sure that key is created.
Hi Joseph,
Just used this article to start testing deploying office 2013 and removing 2010. After realising i had \\\ instead of \\ for the server setup location all seemed to work very nicely. The only issue I seem to be coming up against is once I started word or excel (possibly other apps haven’t tried all yet), it states that they are not the default program for opening the file extensions. It does give you the options to set them to default on opening the app but i need for them to be the defaults from the get go. I have looked in to setting them in a GPO with open with … but the are 10 just for Word alone and way more for Excel. Is there any way of resetting the file association for all of office via GPO or during the setup process? Thanks very much for this article its been very useful to get me started just got to sort out the tething issues 🙂
Regards,
Guy
What app is set as the default? You can use group policy preferences to set the default
I am in the process of trying this for a school district. We are running into a problem when trying to install with a startup script. We can run the .bat file if I throw it onto a client desktop but something is missing within the GPO I believe or the xml file in proplus.ww. Any help would be greatful.
Meant to copy this in and see if the problem is in here possibly.
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
REM Get ProductName from the Office product’s core Setup.xml file, and then add “office15.” as a prefix.
set ProductName=Office15.PROPLUS
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\my-server\Office2013\setup.exe
REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=\\my-server\Office2013\ProPlus.WW\config.xml
REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\my-server\Office2013\LogFiles
REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************
IF NOT “%ProgramFiles(x86)%”==”” (goto ARP64) else (goto ARP86)
REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if NOT %errorlevel%==1 (goto End)
REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a
64bit OS)
:ARP86
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if %errorlevel%==1 (goto DeployOffice) else (goto End)
REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%\setup.exe /config %ConfigFile%
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End
Endlocal
XML file:
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
Do your computers have read/execute to your deployment share/folder?
That worked! Thanks! I made the adjustment and it deployed to my test group. The only problem I see now is that it did not delete all of the Office2010 folder. Thoughts??
Awesome!!
What is left in the Office2010 folder? Some files that were in use should be fine. You just don’t want to see EXEs.
That the install script will run on a client computer if launched manually. Correct? If so, can you upload your script again?
Hi Joseph
this is your script
REM If 1 returned, the product was not found. Run setup here.
:Office
%DeployServer%
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
this is another script
start /wait %DeployServer%\setup.exe /config %ConfigFile% /adminfile %AdminFile%
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
Should the “%DeployServer%” be “start /wait %DeployServer%\setup.exe /config %ConfigFile% /adminfile %AdminFile% ” ?
Thanks for sharing that tony!
Hi there
Thanks for the great post, I am having trouble with the script, I’m just testing to see if it works by running it after I have logged on, I am getting errors in line 20 char 30, syntax error, so I delete one of the = signs, then I get line 20 char 34 syntax error, any ideas please? 🙁
Is it because I am not running it as a GPO script? Or are there problems in the script?
I’m a bit of a newbie and I do not know much about scripts, any help will be greatly appreciated.
Can you post your script for me to review?
Hi Joseph,
Can this “Deploy Office 2013 with Group Policy/script” be used with terminal servers (Win2008R2 and Win2003R2)? I know normally to install app on terminal server, you have to put the server in install mode, so I don’t know if I am using this gpo/script if I need to do anything else. I plan to put the server in the OU just like the other win7 computers and reboot. Let me know. Thanks
Hey Stew – I couldn’t tell you. I don’t have a terminal server available to test. This KB might help you though: http://support.microsoft.com/kb/2806001
Thank you Joseph for replying and for your site. It’s very helpful and timely. I will let you know what’s the end result with installing on TS.
Not a problem!
Hi Joseph,
When I run the bat file I am noticing the errors. Can you help and tell why the system can’t find the keys? I tried putting quotes around the HKEY part, but that didn’t help. Thanks
C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\
Windows\CurrentVersion\Uninstall\Office15.PROPLUS
ERROR: The system was unable to find the specified registry key or value.
C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr
entVersion\Uninstall\Office15.PROPLUS
ERROR: The system was unable to find the specified registry key or value.
Hey Stew – can you manually check to see if those registry keys exist? What version of office are you installing?
Joseph,
Thanks for responding. I did not find HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
but found the following key followed by alot of GUID key such as {19B4CD07-1919-4002-B28F-A5D2027026E0} but none of them shows any Microsoft Office product key.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
I found HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office14.PROPLUS
I also saw other related such as HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-1000-0000000FF1CE}_Office14.PROPLUS_{0F6C4F72-6084-437B-9B35-F59B09E3C1B0}
I’m trying to install MS Office 2013 ProPlus and want to remove MS Office2010.
Thank you for your assistance.
No problem Stew. Does this machine have Office 2013 installed and Office 2010 removed?
No, it does NOT have Office 2013. It has Office 2010.
Install Office 2013 once on a test machine and run the script. It should find the keys and not install office. If that works, then we know the version checking part is correct.
Thanks very much for this!
It’s all worked perfectly except that it installs Office everytime the PC’s in the group shutdown. Is there anyway of the script or GPO checking if Office is already installed?
Cheers.
Not a problem James!
This script should check to see if Office is installed. It queries HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%. If you are not deploying ProPlus, you will need to change that value under set ProductName=Office15.PROPLUS
Spot on! Changed it to Office15.STANDARD and it’s worked a treat. Cheers.
Glad it worked! Let me know if you have any other questions.
And thank you for subscribing!
Thanks so much!!!
It works for me
Hi Joseph Moody
Thank you so much, I have the same problem and your solution worked. Thanks again
Hi.
Thanks for a great post. I have done this before with 2010, but there we had problems with batch logon scripts and Windows 7. The problem was that it was not waiting for the script to complete before going on with the logon process.
Have this been fixed or is it still advised to use PS script instead?
Knowing that problem, I would run the script as a shutdown script.
Thank you for your instruction.
Regarding the theme: The Office Installation contains a bug which ignores the theme setting.
You have to integrate / install the following update on the client machine:
http://support.microsoft.com/kb/2727096
Then, the theme setting deployed via GPO is working.
Great tip Pago! I haven’t had to mess with that yet but I know I will.
HI Mike!
Thank you – I hoped it helped you. The config.xml and OCT file overlap quite a bit. The OCT file can only be used for deployments of certain Office types, which is why you have the overlap.
You can read a deeper explanation here: http://technet.microsoft.com/en-us/library/cc179195.aspx
Copy my sample config.xml (from above) or copy the one in the link I just provided. Try it out and let me know if you still get that install error.
Excellent post. Why do you need to edit the Config.xml? Isn’t that duplicative after making changes in the OCT? I’m also getting an installer error when running setup.exe and it points to config.xml as having an issue. The file is as follows:
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>
<!– –>