How Microsoft is developing frameworks allowing Linux GUI applications to run with the Windows Subsystem for Linux. My favorite 3rd party Windows application support tools. Understanding the importance of processes and why all operating systems use them. How do all processes use IPC or Interprocess communication protocols to share and communicate with each other? What are handles? This video series is a comprehensive study using powerful tools to lift the hood of the Windows Operating System and allow the tech to understand and troubleshoot applications and services. Keep a good attitude! We will dive into the powerful features of Process Explorer and in doing so learn more about processes, process states, and a better understanding of how programs run in RAM and the page file.
We will cover how to use Process Explorer, Process Hacker, and many other Sysinternal tools but most importantly we will discover how Windows really works and how we can understand our applications and effectively troubleshoot problems. From your PC/laptop to servers this understanding is critical to every IT professional.
Hello, my name is Will Vanderpool and this channel is dedicated to IT students,
IT professionals, and anyone who enjoys learning technical subjects.
Awesome, you're with me and it's Day 6 Troubleshooting Windows Applications. Let's get
started. My career tip for Day 6 is how to advance your career in IT. And in reality,
there's really nothing different in advancing your career in IT than in any other career.
You know, as I reflect on my career, I saw many, many talented, smart, so capable young men leave
our program and go into the workforce in IT and they did not do well. They had seemingly everything
you would ever want and yet they didn't do well. And I saw them 20 years later and they still were
going nowhere. I also saw many, many young men leave our program and go into the field and they
did so well. It's amazing how well they did. They all had very similar characteristics and I'm going
to talk about them. All of the men and women who did well in IT always were people who kept
learning. They never stopped pushing their career, learning, mastering new skills. They also were
people who showed up to work every day on time. Better yet, get to work before you have to.
I can't tell you how important that simple thing is. Very important that you learn people. I mean,
you learn people well. Take some time in your career to read books, study, learn the psychology
of understanding people so that when you run into different types of people, you are at an advantage.
You understand that kind of person. You understand this kind of attitude and this
kind of behavior. It helps you immensely avoid conflict, deal with people in a positive way
rather than reaction. Learning people is so important in this field. If you want to advance
your career, grow up and show some responsibility. I can't tell you how much maturity is a heavily
demanded trait in our field. Do your job without oversight from your supervisor. When I started
teaching, I was 24 years old, and I can tell you my classroom was visited by my administration team
pretty regularly. They would come in and see this young whippersnapper in the classroom,
and they would check to make sure, one, I showed up. Two, I was doing my job and just what was
going on. But over time, especially as my career advanced, I showed up on time. I did my job. I
wasn't out of the classroom. I was doing what I was supposed to do. I saw less and less and less
till towards the end of my career. I may see my boss in the hallway once a week. That tells you
you're doing your job. Show genuine respect for your supervisors. That doesn't mean you have to
agree with them on everything. It doesn't mean you don't have a face-to-face conversation with them.
But listen, they're people too, and they've got a lot on their plate. And being genuine with those
Now, we've talked about Windows apps, and you know how I feel about the Windows Store. We've
talked about Android apps. Both of those, we'll have to just wait and see and see how that really
plays out over time. But this, what's right before you right now, is where the gold is.
Right now, Microsoft supports the Windows subsystem for Linux, and you can download
various command line shells, and they run fine on Windows. But what everybody wants
is the graphical applications that run on Linux to be also to be able to run those graphical
programs on the Windows subsystem for Linux on Windows. That's a mouthful. Right now,
Microsoft is working on a GUI front end to their subsystem for Linux. If they pull that off well,
and we can start running Linux applications as well as Windows applications on one single
platform, it's going to be a goldmine for Linux developers and a great opportunity for Windows
individuals to really take advantage of the wealth of Linux applications that are out there.
This is the most exciting part. So here's an example of the Microsoft Store having the Ubuntu.
So you can download it, and you can see the command line here on the screen. You can take
look at this YouTube video where the developer who's doing a blog post on what they're doing
in Microsoft to allow GUI Linux apps to run in Windows. And here's a block diagram of what
they're doing. They're actually allowing an RDP protocol to talk to a remote desktop connection
that will host Linux GUI applications. So there you go. You've got your Linux desktop,
and this is going to be so cool. Often troubleshooting applications, we'll get an
error message that pops up on the desktop. Sometimes, like this one, it's pretty clear.
It gives us enough information that we can kind of figure out what's going on. But all too often,
the error message pops up, and it's about as helpful. It's not helpful at all. What can be
more puzzling, what application on the desktop running is generating the error message? From
the error message, I can't determine much of anything, except that it's an error message.
But I need to know what application, what process is generating this error message.
Mark Russinovich found himself in those same situations. So he built on the menu bar,
a crosshair icon. You can click it and drag it over any desktop message box, and then it will
pop up Process Explorer, highlighting the process from which the error message is generated.
While we're here on the menu bar, I also did a breakout of all the other items on the menu bar.
You can find those in the slides. Now, when it comes to installing third-party applications
on Windows, one of my most favorite programs and companies is the company NightKnight. Now,
they have a home product, and they have a commercial product. They allow you to come down.
I will slide down here, and we can select from a wide variety of the typical applications that
home users need or want. They've got imaging programs, web browsers, media players. They've
got PDF, the client for online storage. They've got utilities such as TeamViewer. Just a wealth
of tools for many home users, and they give it away for free. Now, I want to tell you,
these companies don't have to give it away. I have a great deal of respect for the leadership
of this company who make this decision, take a great commercial product that they sell,
and give away a portion of their profits and the money that they generate to the public.
That is a great service. They do it well. As I can come down, I'm going to choose Firefox,
and let's do Discord. I'm just picking a couple Dropbox, and I'll just choose Python. Now,
once I've selected these, I can come down. It will go ahead and build a custom installer.
You can see it popped up, and I'll say go ahead, and I'm going to just go ahead and open it,
and it runs the executable, and you can see the installer run. I'll pop the show details,
and you can actually see what's happening with my various third-party applications.
What makes this company so great, not only is their generosity to the public, but they do this
very well. I'm going to go back to their main page, slide down, and you can look at this
list of things that Night Night promises you as you do the installation and use their tool.
These are the very things that you want. In other words, they start working as soon as you run it.
They don't bother you with choices or options. They install the app in their default location.
They don't add any junk, no toolbars, no malware. They install the right bit for your operating
system. They install, if you choose languages, it will install apps with languages. It all works in
the background. They're up to date. They're from the publisher's official site. You can verify
digital signatures and hashes before running anything. They recommend that. This is just a
great product. So here's the end. It's finished. It's installed all of the applications that I
asked. And if you'll notice on my desktop, you begin to see all my icons showing up for that
product. But let's be honest, when we send these laptops and PCs back to our family and friends,
we've only done half the battle because if they're not getting patched, those third-party
applications are not getting patched. They just have a security hazard every day on their desktop.
Another company, I admire the leadership of this company. They sell, it's called Patch My PC. They
have a very nice commercial product that they sell to the enterprise and it allows them to
patch third-party applications that they have in their company. They have a portion of their
product that they give away free. Listen, they don't have to do that. And I really appreciate
when I see leadership of a company that says, we're going to give back to the community. We're
going to take our talents and skills, and they obviously can do this, they sell this product,
and we're going to give it back free to the home user. And the home user desperately needs this.
So you can come over to the tab where it says Home Users, click on that. And here you can just
slide down the Download Patch My PC Updater. We're going to click on that. You can see it gives me a
Save As, and I'm going to go ahead and save that in my Downloads. What I love about this product,
it's a portable app. You don't have to install it. So here's Patch My PC. I'm going to double-click
it. And it goes and scans your PC for every third-party application that it supports. It
does support everything. And it will look at everything that you have on your PC that it
does have the ability to patch. And it will show you, and it'll just say all your apps are up to
date. So 9 of 9 apps are up to date. But if you didn't have an app up to date, you could simply
click the button, and it would start bringing the updates for that application. Super easy to use,
portable, it's free. You may be thinking that processes running in user mode have been around
forever. They have not. In fact, with Microsoft, it wasn't until Windows 2000 that we actually had
our first operating system on a desktop that actually used a process. That was a game-changer.
Remember, processes do not share memory spaces. They're like siloed containers, and they prevent
one application from crashing another application. This stability and reliability was amazing. Now,
threads in a process do share the same memory space, and that's why they crash. That's why
process typically will crash. It's not the process, but the threads inside. Processes also talk to
each other. They're in their own silos, and they talk to each other via IPC, inter-process
communication. Those rigid rules of how to share data from one process to another, how to communicate
from one process to another, is what brings stability to the operating system. Let's take
a look at this diagram because it shows my kernel, my hardware drivers, my HAL.dll, which are all
below the kernel mode. And then above, you have all your services and then your applications that
you're running. And these are all anything in user mode is in a process. My first serious exposure to
Windows was when it launched Windows 3.11 for workgroups. It had separation between user mode
and kernel, but there were no processes, and applications all shared the same memory space.
I could rarely get to lunchtime without having to reboot my PC, usually maybe even twice in the
morning, twice in the afternoon. That was the stability of Windows. Now, Windows is not the
only operating system that uses processes and IPCs, inter-process communication. In fact,
all modern operating systems, Android, iOS, macOS, Linux, they all leverage this type of technology
and this type of design. That design gives them the stability they all enjoy. Processes require
IPC, inter-process communication. If I've got PowerPoint up and I want, and I've got Word up,
and I want to copy some content from Word into PowerPoint, well, there are two different
processes. There is a rigid set of inter-process communications that allow me to copy and paste
without one or both crashing. The IPCs you see in this slide are all supported by Windows. Linux
supports many of these same IPCs. Now, every operating system may not support all the IPCs
that Windows supports, but almost all operating systems will share enough of these IPCs that they
can talk to each other. Let's turn our attention to what are handles, how do they operate in
processes? When threads are run inside of a process, they require things like files, folders,
session information, registry keys, Windows station information, desktop information,
synchronization of objects. Everything that I just mentioned is a handle. When threads claim or say
this file is used in our process or a thread says this folder is used in our process, they can lock
that folder or lock that file so that nobody else can use it. That doesn't mean that all threads do
that, but threads can. So, here's an example. I'm trying to delete a file and notice the error
message. It said this file is opened in another process and it's locked that file. Now, all of you
have experienced handles. You just didn't understand what they were. Let's take a look and see how
Process Explorer allows us to work with processes and threads that have handles on files and folders
that we're trying to work with. So, I've got my application and I've got a document,
save me please from IT, and I have saved it in this location. I saved this document in my
documents and it's called save me please from it.odt. That's the extension. I'm going to go to
Process Explorer and I'm going to come up to the binoculars and I'm going to say find a process
that has a handle or DLL with the words save me. So, that's our document name and we're just going
to say search and it says soffice.bin is the process that has this handle. There's a handle
and it owns that handle. Now, I'm going back to my file system and under documents, I'm going to
create a new folder. So, I'm going to call it secrets. So, now there's a subdirectory under
documents called secrets and I'm going to save my file again. This time I'm going to save it
in the secrets folder. So, I'm going to say put my document in documents subdirectory secrets
and if I look in that location, I can open up this subdirectory. There's my file. Now, that
application now has a handle on my file name and that new folder name that I saved it into. Let's
go back up to my binoculars and this time I'm just going to put in the word secret which is the name
of the folder, not the file, the folder. But because I saved my file in this folder, now this process
has a handle on the folder as well as the file. Let's take a look. Go search and now we see
explore and my process soffice.bin all have a handle to this new folder. Many times as a tech,
you're in a processes registry area and you're trying to modify a registry key and you can't
because that process has a handle to a registry key and has locked it. You can't touch it until
that process gives it up. Now, watch as we move, we close out the application, it's going to release
its handle on the file and that folder called secrets. Then, I'm going to move explore away
from documents secret folder and say put explore on the desktop and it will release its handle
on that folder. So, let's start with the explore. I'm going to move explore to desktop. It's no
longer looking at documents. It's no longer looking at the secrets folder. Then, I'm going to close
out this Word document and we'll go back and say who has a handle on the string called secrets.
Nobody. All of those processes released their handles to those folders and files. Now, you can
go in there and delete unless you don't have rights because handles are resources that processes use,
threads are using. It is very important that you know the handle count of your entire operating
system and the handle count of each and every process. Those are red flags to potential problems.
We used to support a medical program that ran a real basic client software on the PC and the
backend was an SQL server on an older server that we had. And the server would crash and burn
constantly. And every time I would pop up process explorer, I would see the handle count on that one
database would be over 100,000. I could not communicate with the developers that we had
a problem. But as usual, somebody in another department bought this software from a vendor,
threw it at the IT team and said install it and make it work. Nobody sized the server for
this application and it was a disaster.