Kaspersky Anti-Virus + Microsoft Windows 10 + Microsoft Office 365 Issue

Recently I had updated three of my household’s Windows 10 machines (one Surface Book 2, one custom built gaming PC, and one ASUS laptop) to the latest stable/release version of Windows (Microsoft Windows April 2018 Update). Each of machines also have a copy of Microsoft Office 365 installed, along with the latest version of Kaspersky Anti-Virus.

What I have found after the Windows 10 April 2018 Update installation; Microsoft Office 365 fails to properly recognise that I have a registered version. I can still use the products in the suite such as Word, Excel and Outlook, but am given 3 days to rectify the problem before the product runs in a limited capacity. I have the correct account logged in, the credentials are correct, and if I try to register and authenticate via the Internet option (phone option is not available) it completely fails. Googling or Binging the error code that is produced does not show any resolution or worthwhile results.

Restarting the machine, restarting any of the Microsoft Office 365 products also does not seem to resolve the problem. Initially I thought that communication to the Microsoft servers was unavailable (sometimes servers go down), but trying to use the product at any time resulted in the register/authenticate prompt to appear on all the machines. So out of sheer desperation and curiosity I thought perhaps I should disable my anti-virus because sometimes they can cause problems with certain applications. Low and behold when I booted up any of the Microsoft Office 365 products the registration/authentication prompt no longer appeared. It appeared that Kaspersky Anti-Virus was blocking or limiting my ability to properly communicate with the Microsoft servers.

Now that Microsoft Office 365 could be restarted without the register/authenticate prompt appearing I decided to re-enable my Kaspersky Anti-Virus, restart my machine and launch the Microsoft Office 365 products. Still no more register/authenticate prompts; great news. Whatever happened between the Windows 10 April 2018 Update, Kaspersky Anti-Virus and Microsoft Office 365; it seemed like it invalidated my copy of Microsoft Office 365. If you encounter the same problem after updating your Windows 10 machine then try the following steps because they worked for me:

  1. Close any open Microsoft Office 365 product you have open.
  2. Disable any anti-virus that you have running (if possible).
  3. Open a Microsoft Office 365 product.
  4. Close the Microsoft Office 365 product.
  5. Turn on your anti-virus.
  6. Restart your Windows 10 machine (this is optional).
  7. Open a Microsoft Office 365 product (the register/authenticate pop up should no longer appear).

Hopefully the above steps helps to resolve your problem.

Returning to C and C++

Since the start of my third year of my Computer Science degree I have not really done much C or C++ programming. My primary programming language at the moment is Java and on the side I am doing some C# work. C++ was the very first programming language that I learnt by myself and during my bachelor’s degree it was the first language along with C that I was taught. There is some stuff that I really like and there is some stuff *cough* pointers *cough* that really annoy me.

With a fairly new laptop (my Surface Book 2), I thought it might be worthwhile to get back into some C and C++ programming. Java and C# are great programming languages but sometimes it is good to go back to your roots and program in a language that is significantly more low level. The attention to detail and level of understanding is significantly higher in C and C++, than Java and C#. If I ever start to feel lazy while programming in Java or C# I think back to how difficult it was to implement some things in C or C++.

I have Visual Studio 2017 installed on my Surface Book 2, but what I really want to do in C and C++ does not require the overhead for the projects that come with using Visual Studio. So instead I am going to use Cygwin (gcc and g++) instead. If you want to use Visual Studio then that is fine but to help others I am going to go into detail about setting up Cygwin so that you can run the gcc and g++ commands to compile and build your C and C++ programs.

Cygwin

Just like on the Cygwin web page “Get that Linux feeling – on Windows“, installing, configuring and using Cygwin is super easy. You can download the 32 or b4 bit versions of Cygwin at the following location. I am going to go over the installation and customization so that you can easily compile and build your C and C++ applications.

Installation Wizard

Once you have downloaded the relevant executable for your OS, run your executable. You should be presented with an installation wizard. Just follow the installation wizard. I used the default settings for the installation. I didn’t change anything and I suggest that you don’t either unless there is a specific reason to. All the paths and command line information presented below assumes the default information.

Note: When you are presented with the following screen on the installation wizard, ignore selecting any package and just press the Next > button. We will be using command prompt to get the necessary gcc and g++ packages.

Cygwin Installation Wizard Select Packages

Continue with the installation wizard and let the dependency download commence. Depending on your download speeds it may take some time to download all the necessary dependencies.

Package Installation

Now one of the very most important components for getting a compiler working outside of using an IDE like Visual Studio is making sure that you have the necessary packages. Open Command Prompt and enter the following in the command line:

setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel

Note: The location of the executable was placed in my Download folder and the command was executed from that directory after I navigated to it.

After you have executed the command, the Cygwin setup should relaunch and it should proceed with the download and installation of the packages that were listed in the command line.

Verification

That is it 🙂

The compiler is installed and you can verify this by launching the Cygwin Terminal and entering in the command:

gcc --version

or

g++ --version

You should see the following displayed on the terminal. The versions of the compilers may be different depending when you install Cygwin and/or if you manually update to an even later version of the compiler (this has not been done here).

Cygwin Terminal Compi;er Versions

To test the compiler out (I’ll be testing the C++ compiler here) we can create a very simple C++ application and use the g++ compiler. The very first C++ program that I ever wrote was a simple Hello World program. What better way to test the installation of the g++ compiler than to use that simple C++ program. Below is the sample code in case you want to start learning C++ and/or you just want to quickly test your compiler but not actually write any code yourself.

#include <iostream>

using namespace std;

int main() {
    cout << "Hello World!" << endl;
    cin.get();
    return 0;
}

Save the above code as HelloWorld.cpp or use your own piece of C++ code and place it in the location of your Cygwin home user directory. By default it should be under C drive, ie. C:\cygwin64\home\<username>.

To compile the C++ code all you need to do is run the following command in the Cygwin Terminal:

g++ HelloWorld.cpp -o HelloWorld

What this will do is create an executable that is called “HelloWorld.exe” that you can then run from either the terminal or straight from the Windows Explorer. If you run the above piece of code in the Cygwin Terminal then the output should match exactly what is shown below; note that the program is waiting on user input before it terminates.

Cpp HelloWorld Terminal Compile And Run

There you go. You now have a Linux like C and C++ compiler installed on Windows and you do not need to have an IDE to compile and build your C or C++ projects. Hopefully this little guide and my desire to go back to C/C++ has fueled your own fire. Enjoy!

Being an Xbox and Windows Insider

After installing a new Xbox OS update on my Xbox One X console, I launched the Xbox Insider application to see what the changes were and if there was any new Quests, Polls, Survey, etc. I noticed that I had been an Xbox Insider for 3 years and 11 months, essentially as soon as there was an option to try the latest features and opt in to new functionality I jumped on it. Along with being an Xbox Insider, I am also a Windows Insider; but I have not been as active in that program in recent months. Checking out the new features and functionality that the teams over at Redmond and around the world working at Microsoft are developing is something that really excites me. I love trying out new gadgets, devices, software, etc. What Microsoft is doing with both their Windows and Xbox platforms, allowing individuals to try new features and provide constructive criticism and feedback is extremely positive and very pro-consumer. It helps ensure that the best product is produced.

However by trying out early builds on either platform is not always fine and dandy. There have been a number of times when simple and basic functionality such as Xbox Live Party Chat did not work at all or installing and/or updating applications completely failed. Luckily to combat this, Microsoft has separated the Insider builds into “Rings” which determine the stability of each build and how new the features you will be getting are. If you are in the Alpha Ring (like I am) then you will get the latest and potentially breaking builds or you could be in the Delta Ring and get a significantly more stable build but not have the newest features. This creates choice for the individual while still allowing them to contribute to the evolution of the platform and assist in bug reporting (something as a software engineer is extremely helpful, the more testers the better). More software companies really need to start providing this feedback process as software is becoming ever increasingly more complex.

Many people will most likely not want to be involved in trying unstable or incomplete builds/features for various reasons. To me though, providing feedback and helping the features become less buggy and complete ready for the masses is rewarding (even though I do not write a single piece of code). To make trying out the new features more enticing and understandable, Microsoft has created Quests and Surveys. Generally if there is new functionality added after an update a new Quest will appear which shows you how to activate and or try it out. It is a very handy way to get your device configured with the new features. The Surveys provide an easy way to communicate how you find the new features (if they even do work as intended) and if there are any issues that you encountered. Reporting bugs and issues is also extremely easy. Each platform as their own Hub that allows you to provide as much detail as possible to help Microsoft resolve your problem, and if others have the same issue then they can piggy back off yours and add further information and diagnostic data.

Overall the entire Insider experience on both platforms has been fun and for someone who is looking to try new features before others, or just wants to help Microsoft out in providing the best possible experience for everyone then the Insider programs are a must. For more information about the Xbox Insiders Program check out the following link. For more information about the Windows Insiders Program check out the following link.