windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  |  windows 10 product key  | Random issue with Office 2016 and Windows 10 not activating - App Layering 4.x - Discussions
Jump to content
x
Upvote if you also have this question or find it interesting.
Learn more

Random issue with Office 2016 and Windows 10 not activating

Nick Panaccio | Enthusiast | 58 | Members | 150 posts

I've got a completely random issue that I'm hoping somebody else has come across before. I have Office 2016 installed in its own App Layer, following the recipe to the letter, using KMS activation. Randomly - not all of the time, and I cannot reproduce it at-will - I will login to the VDI desktop, and a few seconds after the desktop loads will be presented with an Office 2016 message about needing to finish configuration/installation. For the life of me I can't recall the exact message, so I'm going to try and grab the exact verbiage tomorrow, hopefully. Before I even get a chance to verify that both Office and Windows appear to be activated, the VDI begins shutting down, and I'm booted out.

 

The layered image consists of the following:

 

Hypervisor: XenServer 7.1 CU1

OS Layer: Windows 10 x64 1703

Platform Layer: Citrix VDA/PVS 7.15 LTSR

App Layers:

  • vCache (D: volume with pagefile and Event Logs moved onto it)
  • Office 2016 (standard apps minus OneDrive and OneNote; KMS)
  • Trend Micro OfficeScan XG
  • Core Apps (Adobe Reader, Cisco WebEx Meeting, and a few other apps)
  • Admin Tools (RSAT, Notepad++, Firefox 57, and a few other apps)
  • Micromedex and Toxicall [Elastic]

 

Throughout my testing, I did not see this issue once until I started working on that final Micromedex/Toxicall elastically-assigned layer. This layer was the only App Layer where I had to actually join the domain to install the application, and then remove it from the domain before Finalizing the layer. The ELM console did throw warnings about things possibly not working with this layer assigned elastically, but I have been able to use the apps in this layer just fine most of the time.

 

I found a post in another thread from gunthera that says the following:

 

Quote

If your activation problem is that both Windows and Office appear to activate successfully but as soon as you check the status, they say they're unactivated again, and this is App Layering 4.5, open a case.  Support has a patch specifically for a Windows 10/2012/2016 activation issue that was introduced with App Layering 4.5.

 

Assuming that I'm able to verify that this is actually an activation issue with both Windows and Office, would this patch still apply to Windows 10 1703 and App Layering 4.7? If so, where can I find this patch?

 

I'm going to try and grab a screenshot of the actual issue tomorrow, but wanted to throw this out here now while I was thinking about it.

Edited by Nick Panaccio
Changed the title to better reflect the issue

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Rob Zylowski | Scholar | 554 | Citrix Employees | 551 posts

I would guess that sometimes you are logging in to a machine that has just booted and the activation scripts have not run.  There is a setting you can set on the delivery group to delay registration and allow the scripts to run.  When i have time i will look it up for you 

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

Are you referring to this command?

Set-BrokerDesktopGroup -Name “Win10 Ent”  -SettlementPeriodBeforeUse 00:03:00

I'm not sure that's the issue for us, unless I'm misunderstanding the setting. My VM in XenServer can sit idle for 20 minutes before I connect to it via Citrix to launch the VDI, but the error still appears. I was able to catch the issue this morning, and have attached screenshots. Long story short, both Windows and Office are not activated when this happens. So, it sounds like I should at least be looking into the fix that gunthera mentioned in that other post, unless it no longer applies.

Office1.jpg

Office2.jpg

Office3.jpg

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
gunthera | Scholar | 694 | Citrix Employees | 550 posts

What Rob is suggesting is, when you see this, go check C:\Windows\Setup\Scripts\ActivateOffice_log.txt and see when (and whether) our script ran versus when your user logged in.  It will show you both when it ran and whether it succeeded.  Compare that with when your user logged in to see if waiting longer would solve this.  For instance, if the activation always succeeds, but your user logged in before it started, that would suggest a delay would be useful.  Of course, since you say your machine always shuts down when this happens, it might not be possible to capture those files.  Still, if you can induce this when booted in Private mode (or if you publish straight to the Hypervisor outside of PVS), check those files.

 

The patch you found me talking about is definitely not what you're seeing. Also, our builds are always cumulative, so 4.7 definitely includes that fix.

 

Since you're redirecting your event logs, and I assume they're persistent, go check the System event log to see what process sent the Shutdown message.  There's nothing in our scripts that should be doing that, so I'd be very interested in knowing who actually is shutting down your machine.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts
3 hours ago, gunthera said:

What Rob is suggesting is, when you see this, go check C:\Windows\Setup\Scripts\ActivateOffice_log.txt and see when (and whether) our script ran versus when your user logged in.  It will show you both when it ran and whether it succeeded.  Compare that with when your user logged in to see if waiting longer would solve this.  For instance, if the activation always succeeds, but your user logged in before it started, that would suggest a delay would be useful.  Of course, since you say your machine always shuts down when this happens, it might not be possible to capture those files.  Still, if you can induce this when booted in Private mode (or if you publish straight to the Hypervisor outside of PVS), check those files.

 

The patch you found me talking about is definitely not what you're seeing. Also, our builds are always cumulative, so 4.7 definitely includes that fix.

 

Since you're redirecting your event logs, and I assume they're persistent, go check the System event log to see what process sent the Shutdown message.  There's nothing in our scripts that should be doing that, so I'd be very interested in knowing who actually is shutting down your machine.

 

It appears as though I am, in fact, logging in before activation occurs [according to the log]:

 

Thu 01/18/2018-12:24:22.05- Found Windows 10 will try to copy FromLayer\data.dat file to UEP  
Thu 01/18/2018-12:24:24.74- Wait for SPPSVC to Stop to allow the updates  
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

1/18/2018 12:25:09 PM - Wait for Service 'sppsvc' to get to State Stopped
1/18/2018 12:25:16 PM - Service 'sppsvc' State Stopped
Thu 01/18/2018-12:25:16.33- Copy the files from the layer into the 2.0 directory 
The process cannot access the file because it is being used by another process.
        0 file(s) copied.
The process cannot access the file because it is being used by another process.
        0 file(s) copied.
Thu 01/18/2018-12:25:22.36- Found File OfficeProPlus2016_KMS.txt - Activating OfficeProPlus2016_KMS 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
ERROR CODE: 0xC004E016
ERROR DESCRIPTION: The Software Licensing Service reported that the product key is invalid.
---------------------------------------
---Exiting-----------------------------
ECHO is off.
Thu 01/18/2018-12:25:59.84- Activating Office using ospp.vbs 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
<No installed product keys detected>
---------------------------------------
---------------------------------------
---Exiting-----------------------------

I left the Office dialog box open (3rd screenshot from my previous post), and after about 30 seconds, the VM shut down. We're using a GPO to configure the Event Log path, but I think there's an issue with the System log. It's the only log that doesn't seem to retain any old entries. All I see are new entries, which leads me to believe that it's starting before the GPO can make the change. I can modify the vCache App Layer to point the Event Logs to D: in there to get around the GPO setting later on.

 

I rebooted the VM and let it sit at the login screen [boot time was 12:58:34 PM] for a good 20 minutes. I then logged directly into the VM in XenCenter, and was presented with the same Office error. Here's the log:

Thu 01/18/2018-13:01:47.51- Found Windows 10 will try to copy FromLayer\data.dat file to UEP  
Thu 01/18/2018-13:01:47.54- Wait for SPPSVC to Stop to allow the updates  
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

1/18/2018 1:01:47 PM - Wait for Service 'sppsvc' to get to State Stopped
1/18/2018 1:01:52 PM - Service 'sppsvc' State Stopped
Thu 01/18/2018-13:01:53.60- Copy the files from the layer into the 2.0 directory 
        1 file(s) copied.
The process cannot access the file because it is being used by another process.
        0 file(s) copied.
Thu 01/18/2018-13:01:55.63- Found File OfficeProPlus2016_KMS.txt - Activating OfficeProPlus2016_KMS 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
ERROR CODE: 0xC004E016
ERROR DESCRIPTION: The Software Licensing Service reported that the product key is invalid.
---------------------------------------
---Exiting-----------------------------
ECHO is off.
Thu 01/18/2018-13:01:59.18- Activating Office using ospp.vbs 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
<No installed product keys detected>
---------------------------------------
---------------------------------------
---Exiting-----------------------------

It appears as though another process is holding that second file up. Any ideas here?

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
gunthera | Scholar | 694 | Citrix Employees | 550 posts

SPP starts on-demand, and should shut itself back off when it's done whatever it needs to do, but it's likely the service that is holding that lock open.  But it might be worth trying to get the System log.  When activation works OK, and you look at the ActivateOffice_log.txt file, you see both files copied and the licensing is found, right?

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

Yes, when activation works fine, everything in the log looks as you'd expect it to:

 

Thu 01/18/2018-12:31:53.20- Found Windows 10 will try to copy FromLayer\data.dat file to UEP  
Thu 01/18/2018-12:31:53.21- Wait for SPPSVC to Stop to allow the updates  
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

1/18/2018 12:31:54 PM - Wait for Service 'sppsvc' to get to State Stopped
1/18/2018 12:31:56 PM - Service 'sppsvc' State Running
1/18/2018 12:31:56 PM - Stopping service 'sppsvc' State Running
1/18/2018 12:31:59 PM - Stopping service 'sppsvc' State Running
1/18/2018 12:32:05 PM - Service 'sppsvc' State Stopped
Thu 01/18/2018-12:32:05.12- Copy the files from the layer into the 2.0 directory 
        1 file(s) copied.
        1 file(s) copied.
Thu 01/18/2018-12:32:06.54- Found File OfficeProPlus2016_KMS.txt - Activating OfficeProPlus2016_KMS 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
<Product key installation successful>
---------------------------------------
---Exiting-----------------------------
ECHO is off.
Thu 01/18/2018-12:32:09.90- Activating Office using ospp.vbs 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: d450596f-894d-49e0-966a-fd39ed4c4c64
LICENSE NAME: Office 16, Office16ProPlusVL_KMS_Client edition
LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: WFG99
<Product activation successful>
---------------------------------------
---------------------------------------
---Exiting-----------------------------

I'm logged into the VM right now (doesn't log me off if I go in through the console like it does if I go into through a published desktop), and see only one System event log entry at the time of the most recent failure in the Office batch file, and it just deals with BITS changing from Auto to On-Demand. The log basically looks exactly like the one I posted above. And of course this issue is slightly different - instead of one of the files failing to copy (both were successful), this time it couldn't find a KMS server for activation:

 

Thu 01/18/2018-13:50:49.40- Found Windows 10 will try to copy FromLayer\data.dat file to UEP  
Thu 01/18/2018-13:50:49.42- Wait for SPPSVC to Stop to allow the updates  
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

1/18/2018 1:50:49 PM - Wait for Service 'sppsvc' to get to State Stopped
1/18/2018 1:50:53 PM - Service 'sppsvc' State Stopped
Thu 01/18/2018-13:50:53.04- Copy the files from the layer into the 2.0 directory 
        1 file(s) copied.
        1 file(s) copied.
Thu 01/18/2018-13:50:57.08- Found File OfficeProPlus2016_KMS.txt - Activating OfficeProPlus2016_KMS 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
<Product key installation successful>
---------------------------------------
---Exiting-----------------------------
ECHO is off.
Thu 01/18/2018-13:51:01.70- Activating Office using ospp.vbs 
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: d450596f-894d-49e0-966a-fd39ed4c4c64
LICENSE NAME: Office 16, Office16ProPlusVL_KMS_Client edition
LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: WFG99
ERROR CODE: 0xC004F074
ERROR DESCRIPTION: The Software Licensing Service reported that the product could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information.
To view the activation event history run: cscript OSPP.VBS /dhistorykms
NOTICE: A KB article has been detected for activation failure: 0xC004F074
FOR MORE INFORMATION PLEASE VISIT: http://support.microsoft.com/kb/2870357#Error0xC004F074
---------------------------------------
---------------------------------------
---Exiting-----------------------------

We set the KMS server in the registry via GPO, and running nslookup -type=all _vlmcs._tcp does return the correct KMS server, so I have no idea why it couldn't contact it this time. We appear to be running into every possible issue with this Office activation script.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

For new Office App Layer versions, do you always have to launch RunOptimizer.cmd (selecting Activate MS Office via KMS and the appropriate product, then clicking on Save Settings A-K), Office2013Windows81_PREP.cmd, and then finally C:\Program Files (x86)\Microsoft Office\Office16\OSPPREARM.EXE to re-arm Office?

 

I ask because I added a new version to my Office App Layer, and after launching the Optimizer, did not see Activate MS Office via KMS selected. Even after clicking on Load Previous Optimization.cmd Settings, I was told that no existing optimizations.cmd was found. So, I ran the three items listed above again and then Finalized the layer. I have rebooted this VM four times so far this morning, and so far Office has activated without any issues. I did create a new version of this layer previously, but according to my notes did not perform any of the steps listed above. I can't find anything about Office layer versions that calls out having to do this every single time, so I figured I'd ask here.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
gunthera | Scholar | 694 | Citrix Employees | 550 posts

You should not need to reselect the activation options.  Those are just files in the folder telling us to activate something (OfficeActivate.txt and a specific file telling us which particular Office edition), and those files persist across versions.  You might need to re-run the PREP script, though that would only be if licensing materially changed during an update.  Like the product ID changed.  I believe you would only rearm Office if you ran it.

 

But normally, no, you don't need to do any of that just for making a new version of Office.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

Well then, I have no idea what the hell was going on previously then, which isn't terribly comforting. I'm going to let this current vDisk roll and see if I can get those issues to rear their ugly heads again. If all seems well, assuming it does no harm, I plan on running those same scripts with each Office App Layer version for the sake of consistency.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

For our A/V solution, we have to run Trend Micro's "TCachGen" utility to pre-scan the data. I have chosen to do this after the layered vDisk has been sent to PVS with it in Private mode. Should I be concerned with any of the tasks that run as part of the kmssetup.cmd startup script? I know it creates a lot of "_done.txt" files, as well as runs the OfficeActivate.cmd script, and I want to make sure that I don't need to actually delete anything before shutting down the VM and changing the vDisk back to Standard mode.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Rob Zylowski | Scholar | 554 | Citrix Employees | 551 posts

Hi Nick,

Windows activates every boot always so starting in private mode to run the av hash utility will not affect activation of Windows.  Office Activation does create a done file so since you are starting up in private mode office will be activated then and then it wont activate every boot. It should though go through the process to update the store so it matches the office layer.  If it were me i would probably remove the done files so office activates during boot or you can edit the scripts so they wont create the done files.  I think it should still work though as long as you are making sure PVS rearms office and that the store did actually update.  You can review the officeactivate log when you are in private mode.  It is also worth reviewing both the officeactivate log and the runato.log when you have a server where office or windows is not activated to see what error you are getting.

 

Rob

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts

Thanks, Rob. Which "_Done" files should I be removing when I edit the vDisk in Private mode? Just "OfficeProPlus2016_KMS_Done"? I assume that I should leave "OfficeStoreCopy_Done" there, unless it doesn't matter if it runs a second time. The vDisk is set for KMS licensing in the console, so I should be good there.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Rob Zylowski | Scholar | 554 | Citrix Employees | 551 posts

If the store files We’re correctly copied you should check the log to make sure the store files were copied then you can leave the store copy done file but definitely wanted temove the office done file

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Nick Panaccio | Enthusiast | 58 | Members | 150 posts
12 minutes ago, tmoore728 said:

Has this been resolved?  We are seeing the same issue.  Should we take the steps in CTX128580?

 

I haven't seen the issue come back, so I really don't know what was causing it in the first place. The fact that the VMs could sit at the Windows logon screen for a very long time and still have activation happen after somebody logs in was what really threw me. For Office versions, I only install the updates and then re-arm Office. I have done this from v4.7 through our current 4.10, and activation appears to be working just fine now. Sorry I can't be of more help here.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
tmoore728 | 0 | Members | 9 posts

Where do you re-arm office?  Is it in the layer or in the published image?  I know normally you only re-arm office if you have opened it and we make it a point not to open it so we have never done a re-arm.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more
Rob Zylowski | Scholar | 554 | Citrix Employees | 551 posts

When you create the layer you would do it as the last step before you shutdwon for finalize.  This is not an issue that is "resolved" really has meaning.  Office activation is scripted during boot.  There are several things that can stop it from being activated so you need to do detailed troubleshooting by looking at the activation logs in the scripts folder.  That should lead you to a cause.

Share this post


Link to post
Share on other sites
x
Mark this reply as best answer, if it answered your question.
Learn more
x
Upvote if you found this answer helpful or interesting.
Learn more

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
TOP
×