I am building a desktop application for Windows. I have worked with Electron earlier but it doesn't seem to work on a few Windows systems, also has no support for win7. Which language/framework should be chosen to cover a wide range of Windows versions including 7 or should I stick to Electron only?
Electron is an enormous amount of overhead. Just use C# with Visual Studio and you can build applications for every Windows version since 2002 or so. Developer experience is also way better than pretty much anything else. For a Windows-only app, there's no reason to use anything but Visual Studio.
Here are my suggestions.
C# + .NET Framework: It will work consistently on Windows 7, 8, 10, and even older versions.
Java with Swing Lib: Java is a mature and widely used programming language. The Java Runtime Environment is pre-installed on most Windows computers, so your application will likely "just work" for most users. You can use the Swing library for the UI.
You can avoid Electron by considering the fact that Performance issues, Bigger install size and More bugs and compatibility issues.