Share via

if exist Office

Salvatore Carofiglio 0 Reputation points
2025-05-27T11:56:40.9266667+00:00

my code:

static bool IsOfficeInstalled()

{

const string officeRegistryKey = @"SOFTWARE\Microsoft\Office\";

using (RegistryKey key = Registry.LocalMachine.OpenSubKey(officeRegistryKey))

{

    return key != null ? true : false;

}

}

turn null

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.