SCCM 2012 Dropbox detection script

Because I’m super fun now, things like this seem important to me. Want to detect an application installed per user rather than per machine in SCCM 2012? Annoyed that Chrome and Dropbox are tricksy little bastards that hide away in c:\users\%username%\appdata\some godawful location? Well be annoyed no more because you can create a device collection with a query like this to detect them.

Dropbox.

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FilePath like "c:\\users\\%roaming%" AND SMS_G_System_SoftwareFile.FileName like "%dropbox%.exe%"

Chrome

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FilePath like "c:\\users\\%appdata%" AND SMS_G_System_SoftwareFile.FileName like "%chrome%.exe%"

Edit the bits in red to be whatever combination of file path and filename you’re after and boom, a collection of machines that fit the criteria. I’ve been deliberately vague here with all the %s but you could be as specific and refined as you like. I’m sure there’re better ways of getting this done, too, but this worked for me.

Exciting stuff.

Responsible

Regrettably, I seem to be becoming a serious-ish adult.

IMG_0112

At least, I think that’s what it is.

IMG_0119

Because the alternative is too unappealing to consider.

IMG_0120

All I know is that I’ve started thinking about things before I do them.

IMG_0121

And considering consequences.

IMG_0122

And – ugh – planning for the future.

IMG_0123

Does that sound adult-y?

IMG_0124

It feels adult-y.

IMG_0125

And I know it sure as hell is killing off some of the things I used to enjoy.

IMG_0126

Not because I don’t enjoy them any more.

IMG_0127

But because the time keeps being spent doing sensible stuff.

IMG_0128

Like cleaning.

IMG_0129

Or looking at houses.

IMG_0130

Instead of drinking.

IMG_0131

And cycling down mountains.

IMG_0132

I mean, that still happens.

IMG_0133

But sometimes it doesn’t because I’m at work.

IMG_0134

Or decorating.

IMG_0135

Decorating.

IMG_0136

I don’t even.

IMG_0137

And I use a calendar now.

IMG_0138

Not to mention a diary.

IMG_0139

Because I have things I need to keep organised.

IMG_0140

I never used to have things I needed to keep organised.

IMG_0141

Or things, I suppose.

Cramp

That’s what cycling up this bloody Welsh pass gave me.

IMG_0013

I’d like to blame the weather for the lack of cycling I’ve done this year.

IMG_0014

Hence the lack of physical fitness.

IMG_0015

But I think it’s more likely down to the fact that I’m a fat lad.

IMG_0016

And some things never change.

 

Photo time

Back before work began taking over my life, I used to have lots of free time to spend bimbling about taking photographs, being odd and getting chased away from intriguing derelict buildings by security guards.

IMG_0001

Well, I think I’m finally getting back to a point where I can do that again.

IMG_0003

More or less.

IMG_0004

I mean, it’s not perfect.

IMG_0005

I get email alerts and shit all the time.

IMG_0006

Which I can ignore, I guess.

IMG_0007

It’s just often better to fix stuff before people notice and start complaining.

IMG_0008

Because man am I intolerant.

IMG_0009

Especially when everything’s going wrong.

IMG_0010

It’s about the third worst time to speak to me.

IMG_0011

Not that there’s an especially good time, I admit.

IMG_0012

But it’s one of the worst.

The Life and Death of Richard the Second

Act 3, Scene 2
The coast of Wales. A castle in view.

KING RICHARD II

No matter where; of comfort no man speak:
Let’s talk of graves, of worms, and epitaphs;
Make dust our paper and with rainy eyes
Write sorrow on the bosom of the earth,
Let’s choose executors and talk of wills:
And yet not so, for what can we bequeath
Save our deposed bodies to the ground?
Our lands, our lives and all are Bolingbroke’s,
And nothing can we call our own but death
And that small model of the barren earth
Which serves as paste and cover to our bones.
For God’s sake, let us sit upon the ground
And tell sad stories of the death of kings;
How some have been deposed; some slain in war,
Some haunted by the ghosts they have deposed;
Some poison’d by their wives: some sleeping kill’d;
All murder’d: for within the hollow crown
That rounds the mortal temples of a king
Keeps Death his court and there the antic sits,
Scoffing his state and grinning at his pomp,
Allowing him a breath, a little scene,
To monarchize, be fear’d and kill with looks,
Infusing him with self and vain conceit,
As if this flesh which walls about our life,
Were brass impregnable, and humour’d thus
Comes at the last and with a little pin
Bores through his castle wall, and farewell king!
Cover your heads and mock not flesh and blood
With solemn reverence: throw away respect,
Tradition, form and ceremonious duty,
For you have but mistook me all this while:
I live with bread like you, feel want,
Taste grief, need friends: subjected thus,
How can you say to me, I am a king?

For some reason, this scene came up in conversation while down the pub and I remembered that I really rather enjoy it. I thought I’d share.