Tag Archives: SharePoint

Unable to run SharePoint 2019 installer when Office 365 is installed on the same machine

I recently spend some days having fun with good old on premise software and it really makes one appreciate infra as a code and provisioning everything in the cloud, fast. ūüôā The problem is that most of the vendors of on prem software have more focus on introducing their cloud offerings and do not want to invest heavily into improving their on-prem installers to accommodate for myriad of edge-cases even if you have support contract of some sort, and if you don’t, then you some times doomed to fight all sorts of obscure errors which can drive crazy any normal person, except for those who strive to convert oneself to a guru in a very narrow and obscure details of proprietary software combinations… Such type of expertise makes one shine on some rare occasions/in the specific niche but amount of efforts one has to spent learning how to fight small strange problems with obscure solution can be demotivating as it is normally all edge and isolated cases which eat up your time to discover solutions which are often not reusable. Well if in process of fighting those you have time and enough of supporting materials to get understanding of how it all works it is one story (good learning/reusable knowledge), but if you are in a get this thing provisioned ASAP mode then you probably revert to fix it by all means without time to think through why fix was needed and what is the best solution – that’s a bad use of precious time, but sometimes there are no other options. Cloud apps and services has their own share of little problems but really cloud really removes bulk of initial setup and provisioning issues – and if there are real problem with that then it is something that vendor will be willing to fix in the most of the cases. This is because to qualify for being cloud software supposed to offer you on-demand self-service provisioning capabilities which have to work with no human intervention beyond “I’m requesting XYZ” from the consumer side. Anyhow that was a bit of self reflection after setting up mix of software on a demo box which involved K2 5.4, SQL 2019, SharePoint 2019 with someone putting RPA software and Office 365 on the same box in parallel – amount of strange errors was higher than normal this time. So just a little blogpost to take a note of couple of problem/solution pairs in case I will run into this again or someone else will run into those.

One of the errors I got was this one – “We’re sorry, Microsoft Office installer encountered a problem because you have these Click-to-Run installer based Office programs installed on your computer”:

This error basically blocks SharePoint 2019 or SharePoint 2019 installer – you can’t nor install nor repair, so for the first time I did removed Office 365 to do a SharePoint 2019 repair, but later on with eager RPA developer putting Office 365 installation back in no time I decided to search a way to avoid removing Office 365 to run SharePoint 2019 language pack installer. To remove this blocking warning you need to locate your Office installation registry subkey, which for x64 bit can be found under the following path:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365BusinessRetail – en-us]

Final part/subkey may vary depending on exact Office version you have, and x86 installation entries can be found under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ subkey. So once you located right registry subkey you will need to add RED_DWORD parameter with name SystemComponent and value of 1 (see screenshot below).

Adding SystemComponent parameter

That should suppress blocking warning and it worked for me in my test environment. Surely MSFT introduced this blocking warning for a reason and you are free to investigate when it is better to avoid removing that warning and seek other ways of solving this. I would in my case it was TEST/DEV environment where developer need an office right on the server which IMO should be avoided in any type of PROD deployment, so this fix was OK for my scenario.

In addition to the above mentioned error, at the final stages of SharePoint 2019 apps environment set up I run into the problem where all was seemingly configured correctly but K2 for SharePoint app page was giving me 404 or other connectivity errors (depending on bindings configuration), to get to that stage I made use of my old blogost and this script (it seems some of the required service apps can only be added with PowerShell), but somehow in my previous write ups I’ve missed or did not mentioned requirement of putting a wildcard into host value of IIS site created for a web app which hosts app catalog. I was sure that it can work with require SNI and a host name (vaguely remembering that it should not be possible :)), especially after looking at another environment where it indeed works that way, but after resolving this problem by switching to * host and no SNI binding, I realized that other environment had SharePoint Routing Web Application which was responsible for magic of making it all work. My only problem is that I did setup that environment either and now not even remember this part of config.

Configure K2 and SharePoint Online integration

Some time ago I posted an article “Configure K2 and SharePoint Online integration” on StarWind Software blog which outlines details about getting your SharePoint online instance up and running and adding K2 for SharePoint app to your app catalog, so if you are interested to know more read on at StarWind Software blog.

One thing I was not 100% clear on while writing that article is¬†‚ÄúEnable auto-activation on sites where the app is deployed‚ÄĚ option, which is enabled by default (K2 for SharePoint app > Settings > Manage App Activations).

Based on the setting name wording I was not very clear whether¬†‚ÄúEnable auto-activation on sites where the app is deployed‚ÄĚ setting works for SharePoint online newly created site collections? Especially as I‚Äôve noticed that if I run activation manually there is a step ‚Äúwe need to create a token of your behalf‚ÄĚ which, I assume, requires user input‚Ķ So I had a question whether auto activation is possible for SharePoint Online newly created site collections where K2 app was only deployed?

It was also not very clear what drives/triggers automatic activation and with which frequency it happens.

Luckily enough there are some colleagues who always help ūüôā Below some extra details I’ve learnt only after writing that article.

The function of the Auto-Activation Setting on the Manage App Activation Page designed for strict activation on Site Collection Level (permission wise) and only allow Site Collections to be activated via the App Catalog Level.

When the setting is set to False the below Warning will be presented when the user tries to activate on the Site Collection Level:

This setting will not Auto Activate any new Site Collections created in SharePoint Online. When it set to True/Enabled you can perform activation from site collection level. So the wording “Enable auto-activation on sites where the app is deployed” is really a bit confusing though description above this setting is quite clear (but who reads notes and descriptions? ūüėČ

Essentially this option allows Site Collection Owners activate K2 app on a site collection level manually and when it disabled they won’t be able to do that from the site collection level and it will be possible only via app catalog level from K2 app management page.

But, true auto activation does happen for sub-sites of already activated site collections. But this functionality works only with K2 Five. This functionality was introduced in K2 4.7 but did not work as expected. More information on this can be found in the following KB http://help.k2.com/kb001755

But this subsites auto-activation requires Event Receiver sub-site of the K2 site to be exposed to internet when you use SharePoint Online. When using SharePoint on premise there is no need for any exposure of the K2 site to the internet.

New-SPAppManagementServiceApplication : A SharePoint database named XYZ already exists.

I was configuring SharePoint app catalog service applications the other day using my old scripts for that, and there is one problem I often see when using PowerShell scripts for configuring SharePoint: those work much better as they save your time you may spend on wading through cumbersome GUI, but in case when you need to re-run this script once again (let’s say it failed in the middle as you not updated some of the variables with proper values, or forgot to adjust something in line with your naming convention), you are often in trouble as you need to clear up things created by the script before you will be able to re-run it without errors.

Normally (especially if you fully understand what your script actually does) it is not a big problem, but this time when creating App Management Service Application I run into this error:

New-SPAppManagementServiceApplication : A SharePoint database named SP2013_AppManagementSvc already exists. You must supply another
name for the new database.

Looks like straightforward error which prompts to fire off SSMS and drop DB in question and I think I did it before, but this time there was NO such DB on SQL server yet I keep receiving this error. A bit of Googling showed me that I just have a reference to this DB in Objects table of SharePoint configuration database. So we can use SQL script (GitHub link) to search and if necessary remove it:

--Check if reference to DB exist
SELECT * FROM Objects WHERE name='SP2013_AppManagementSvc';
--Drop DB reference if necessary
DELETE FROM Objects WHERE name='SP2013_AppManagementSvc';

Little quick fix, but as usual in case it is anything like production environment better take DB backup before messing with anything in it.

How to: Install SharePoint 2010 August 2015 CU

On a day to day basis I keep repeating people to always check on with K2 compatibility matrix before installing or upgrading their K2 environments. Very frequently people try to mix K2 with too new Microsoft components which weren’t tested with their version of K2. But there is an opposite issue when Microsoft infrastructure components lag behind in terms of patches/versions fully supported by their release of K2. I know quite a few people still using SharePoint 2010 with K2 4.6.11. So with SharePoint 2010 being an old thing in itself people often skip CUs for this product for some reason which is unknown to me. In this article I want to discuss what is the latest CU for SP 2010 supported by K2 4.6.11 (note that with 4.7 K2 dropped support for SP 2010) and how to install it.

What is the latest CU for SP 2010 supported by K2 4.6.11? As usual you have to check compatibility matrix, but you have to find old one, which will show you this:

And this:

Does it mean that newer CUs will break something/won’t work with K2? Not necessarily, it only means that it won’t be supported because it has not been tested. At the time of release of 4.6.11 latest SP 2010 CU available was¬†August 2015 CU and hence all testing and QA was performed against this CU – K2 cannot guarantee that all will work with newer CUs.

With that knowledge if you are still on SP 2010 it makes sense to make sure you running “newest” supported CU for it. Easiest way to do that is fire off SharePoint Management Shell on your SharePoint server and execute the following command:

(Get-SPFarm).BuildVersion

This will give you your current build:

Having this information look up in SP builds list @¬†Todd Klindt’s SharePoint Admin Blog¬†to translate this into CU and SP levels, for example 15.0.7106.5000 translates into August 2013 CU:

Note that there may be minor last digit discrepancies depending on how you look up for build number. So now I know that my SP 2010 is August 2013 CU and for K2 4.6.11 I can go up to¬†August 2015 CU (download link) from that – let’s try to do it.

First things should go first Рbackup your SharePoint environment. Navigate to Central Administration > Backup and Restore and click Perform a backup Рjust go through the wizard and create full farm backup. It can be good idea to test that your backup can be restored.

Once backup is done an CU file is downloaded launch it, accept license terms and hit “Continue”:

CU installer will check for installed updates and proceed with extracting files and installation of update after that:

Once done it will ask for reboot:

Most frequent mistake in all this process it assuming that after reboot of your SharePoint server you will be running updated SharePoint version. Quick check with (Get-SPFarm).BuilVersion will show you the same build as it was before you started CU installation process. So update is not finished just yet and to complete it you have to locate SharePoint 2010 Products Configuration Wizard in Start Menu:

and run it. Next you just go through the wizard’s steps to complete upgrade:

Warning you got in the very beginning should be taken seriously if you do this on a server used by other people where IIS reset may have undesired impact:

Once all configuration tasks completed you should get confirmation of successful configuration and click Finish button:

After clicking on Finish it will take you to CA main page automatically. In CA you can navigate to Upgrade and Migration > Upgrade Status where you can see confirmation of successful upgrade:

And now it is time to issue (Get-SPFarm).BuildVersion command once again:

First execution of the command on the screenshot was made before running of SharePoint 2010 Products Configuration Wizard and the second after wizard completion Рnow we run build 14.0.7155.5000 which is the latest SharePoint 2010 build officially supported by K2 4.6.11.

How to: enable Document Set in Document Library

I just recently bumped in into this thing – you have to enable Document Sets on a library level before you can actually use it. This little point baffled me a bit when I tried to use Create Document Set SmartWizard in K2 Studio:

It took me a while to switch over too my SharePoint document library to realize that I just can’t create document set there:

Normally the same New Document menu contains an option to create Document Set. Well now it’s clear that “Required field is empty” error is just a clumsy way employed by K2 Studio to tell you that Document Sets disabled for your library.

To enable them you just go to Library Settings > Advanced Settings > Allow management of content types as on screenshots below.

Click on Library Settings button on ribbon:

Click on Advanced Settings:

In advanced settings select Yes for Allow management of content types and hit OK:

Now you also need add Document Set content type using Add from existing site content types link in library settings:

At this point you should be able create document sets in SharePoint just fine:

Yet you still going to have problem with K2 SmarWizard I mentioned initially. Why? Just go to K2 App settings for your library to see the answer:

Just click on Regenerate SmartObjects, go back to K2 Studio and Create Document Set SmartWizard to see things working there:

Voila, we can now see our Document Set enabled library and use SmartWizard to create document sets in it.

Just to recap: To be able to create document sets within SharePoint libraries you have to¬†Allow management of content types¬†in Advanced Settings of this library and add Document Site content type¬†using “Add from existing site content types”¬†link in library settings.