In this lesson, we're going to learn about receipts and bill of materials.
Now, I think it's easier to just show you what this stuff means as we go along than to try to explain
it up front.
So let's go ahead and do something that that's kind of related to the last lesson.
And so right now, I'm on a terminal to our target machine.
And what are we going to do is let's just pretend I had administrative access to my computer.
And then I went ahead and I deleted Firefox.
So you can see that Firefox disappeared and now it's no longer installed.
Now, Monkey goes and runs in the background again.
And as you can see, it's downloading Firefox sixty six four and then it would then install it as well.
So if I removed it and then it installed it back, is it going to do that for all software.
All right.
Well we can go ahead and find out.
So when, when Firefox comes back then what we're going to do is we know that flash player was also
installed by a monkey and it was a package.
So let's go ahead and launch Firefox.
And I'm going to go to preferences.
And extension's.
And we can see that flashes installed.
All right, so what I'm going to do now is I'm going to remove.
We're going to go ahead and remove Firefox so that or remove Flash so that Firefox can't see it.
So let me go ahead and go back to where we were, and you can see that the plug in isn't there.
All right.
So let's go ahead and let monkey run again.
And nothing, so I remove Flash, but Flash didn't come back.
So what's the difference?
All right, so as we've pointed out many times that we've got copy from disk image installers and we
have package installers.
Now, when you do when you when you use a copy from disk image, you're basically copying a app folder
into your applications folder.
And if we go to contents, you can see that it says applications Firefox DOT app.
So exactly that a drag and drop.
And so monkey knows that that's what.
That that's basically everything that's needed and it seems that it's missing and it goes ahead and
it puts it back into place now, package files and you can tell because we built around with payloads
and scripts, you know, when a vendor does that with, say, they'll be flash player, basically does
the same thing.
Now, if we go to contents, we can see there's nothing in the paths, but we have this receipt.
All right.
So what's the receipt?
Well, let's go ahead and let's go into the VAD DB receipts folder.
And what we're going to do is we're going to remove we're going to remove the adobe receipt.
Now, there's two files with this name and we're going to get to them in a second.
So I'm going to remove that receipt and now I'm going to run manage software update.
And you can see now it sees that flash is gone and now we can go ahead and.
And then Monkey will go ahead and reinstall it.
All right, so it's reinstalled, so I go to Firefox again and I go to preferences.
And extensions, we could see that that flashes back.
OK, so that's the receipt, but what's the bill of materials?
Now, I said that there was two files and so if we do and Les Bohem, that's listing those materials.
And then I go to the name of the receipt and then DOT with an extension of BLM.
And what this is going to do is this we're going to give me a listing of all the files and folders that
the package wrote to my system.
So when we did the uninstalling flash player in the previous section, then Monkey went to the bill
of materials and it knew exactly what files and folders to remove to give you a clean uninstall.
Let's discuss a little bit more about reseats, so if we go to our machine and go to system preferences
and we go to.
We go to the printer now, we've got a printer installed and let's just say I've got administrative
access and I get rid of the printer.
Now, as we discussed earlier, that.
This printer is not going to come back if I go ahead and I run monkey.
It's not going to know that the printer is gone because the printer was installed via a script.
Yes, we used a package to deliver that script, but nonetheless, it was a script that did it.
And so monkies not going to know that that printer is gone.
So let's just say, for example, we rename a computer and we move it someplace else and we need that
install printer job to run again so that it will get the right printer.
Well, we could go ahead and delete the.
The receipt for that printer package and then when we go ahead and run monkey the next time, then it's
going to say, OK, well, I need to go ahead and run the the install printer package because the receipt
is gone.
And since my computer now has a new name on it, then it would then get a different printer or the printer.
OK, so we also have our mobile config profiles and remember, a couple of them were installed.
Well, this one was basically right out of profile manager and there is no script with it.
And so let's go ahead and let's get rid of this one and let's see if Monkey will bring it back.
So we got rid of it, you can see that it's making the changes and let's go ahead and run monkey and
monkey does see that that it's done because this was installed directly by by monkey.
Now, the DLC preferences were installed directly by a monkey.
But remember, the Joint Active Directory, one was embedded in a package.
So if somebody has administrator access and they remove the joint active directory mobile config, the
computer is going to unbind from the domain and then monkeys not going to bring it back.
The only way to get it back on the domain via monkey would be to remove the receipt.